# Repository

Schemas

Code repositories with their owner, description, language, topics, license, stars, forks, watchers, open issues and when they were last pushed to.

## Endpoints

5 endpoints return repositories on GitHub.

- [GETGitHub Pinned Repositories API`/v1/github/pinned_repositories`](https://socialtap.dev/docs/reference/github/pinned-repositories/index.md)
- [GETGitHub Repositories API`/v1/github/repositories`](https://socialtap.dev/docs/reference/github/repositories/index.md)
- [GETGitHub Repository API`/v1/github/repository`](https://socialtap.dev/docs/reference/github/repository/index.md)
- [GETGitHub Repository Search API`/v1/github/search_repositories`](https://socialtap.dev/docs/reference/github/search-repositories/index.md)
- [GETGitHub Trending Repositories API`/v1/github/trending_repositories`](https://socialtap.dev/docs/reference/github/trending-repositories/index.md)

## Schema

Single-item endpoints return this object as `data`; list endpoints return an array of them as `data` with a [`page`](https://socialtap.dev/docs/pagination/index.md) object. The standard [`meta`](https://socialtap.dev/docs/reference/index.md#meta) comes with every response.

| Field | Type | Description |
| --- | --- | --- |
| `platform` | `string` | Platform ID (github, …). |
| `id` | `string` | Platform-native repository ID (string): GitHub's number, which stays the same when the repository is renamed or moves to another owner. |
| `full_name` | `string` | Owner and name as in its link (torvalds/linux): what people call it, though it changes when the repository is renamed or transferred. |
| `name` | `string` | The repository's name without its owner (linux), as its link spells it. |
| `url` | `string` (uri) | Canonical repository page URL. |
| `avatar_url` | `string` (uri) or `null` | The repository's own icon, apart from its owner's avatar; null when it has none. Platform CDN URLs can expire. |
| `description` | `string` or `null` | The repository's short description (GitHub's About), as plain text; null when it has none. |
| `owner` | `object` | The account that owns it: a person or an organization (owner_type). |
| `owner.id` | `string` or `null` | Platform-native account ID; null when only the handle is known. |
| `owner.username` | `string` or `null` | Handle without the @; null when the account has none. |
| `owner.display_name` | `string` or `null` | Display name shown on the profile. |
| `owner.url` | `string` (uri) or `null` | Canonical profile URL. |
| `owner.avatar_url` | `string` (uri) or `null` | Profile picture URL. Platform CDN URLs can expire within hours. |
| `owner.is_verified` | `boolean` or `null` | Platform verification badge; null where the platform has no badge. |
| `owner_type` | `string` or `null` | Whether the owner is a person's account or an organization's (a GitHub organization, a GitLab group, a Bitbucket team); null when the platform does not say. New values may be added.<br>One of `person`, `organization` |
| `homepage_url` | `string` (uri) or `null` | The project's website as its owner set it, as an absolute URL (https:// added to a bare example.com); null when none is set or it is not a web address. |
| `programming_language` | `string` or `null` | The repository's main programming or markup language as the platform names it (Go, C++, Jupyter Notebook), by the size of its files; null when the platform detects none. |
| `topics` | `string[]` | Topic tags its owner filed it under, as written (lowercase, hyphenated); \[\] when none. |
| `license` | `object` or `null` | The license the platform detected in it or its owner declared; null when none is detected or the platform does not say. |
| `license.spdx_id` | `string` or `null` | The license's SPDX identifier (MIT, Apache-2.0); null when it has none (a custom or unrecognized license). |
| `license.name` | `string` or `null` | The license's name as the platform shows it (MIT License; Other for one the platform cannot identify); null when it shows only the identifier. |
| `default_branch` | `string` or `null` | The branch its page shows and pull requests target by default (main, master); null when the repository is empty or the platform does not say. |
| `is_fork` | `boolean` or `null` | A fork of another repository (parent); null when the platform does not say. |
| `parent` | `object` or `null` | The repository it was forked from; null when it is not a fork or the source does not name it (a list of repositories says only is_fork). |
| `parent.id` | `string` or `null` | Platform-native repository ID, as Repository.id; null when the platform names the repository without it. |
| `parent.full_name` | `string` | Owner and name as in its link (torvalds/linux). |
| `parent.url` | `string` (uri) | Canonical repository page URL. |
| `is_archived` | `boolean` or `null` | Archived by its owner: read-only, no longer maintained; null when the platform does not say. |
| `size_bytes` | `integer` or `null` | How much the repository stores on the platform, its history included, in bytes; listed in approximate_fields when the platform states kilobytes. Null when it does not say. |
| `created_at` | `string` (date-time) or `null` | When the repository was created, RFC 3339 UTC (a fork's: when it was forked); null when the platform does not say. |
| `updated_at` | `string` (date-time) or `null` | When anything about the repository last changed as the platform counts it (on GitHub a new star counts), RFC 3339 UTC; pushed_at says when its code did. Null when the platform does not say. |
| `pushed_at` | `string` (date-time) or `null` | When code was last pushed to it, RFC 3339 UTC; null when the platform does not say. |
| `metrics` | `object` | Counts at fetch time; null = hidden or not exposed, 0 = zero. |
| `metrics.star_count` | `integer` or `null` | Accounts that starred it; null when the platform has no stars or hides the count. |
| `metrics.fork_count` | `integer` or `null` | Forks of it on the platform; null when the platform does not state a count. |
| `metrics.watcher_count` | `integer` or `null` | Accounts watching it for notifications (not its stars); null when the platform does not state a count. |
| `metrics.open_issue_count` | `integer` or `null` | Open issues, pull requests not counted (0 when its issue tracker is off); null when the platform does not state it apart from them. Listed in approximate_fields when read from display text ("1.1k"). |
| `metrics.open_pull_request_count` | `integer` or `null` | Open pull requests (merge requests on GitLab); null when the platform does not state a count. |
| `platform_specific` | `object` | Fields only this platform has, under its ID (platform_specific.\<platform>); each null when unknown. |
| `platform_specific.github` | `object` or `null` | A GitHub repository's own fields. |
| `platform_specific.github.node_id` | `string` or `null` | GitHub's GraphQL node ID of the repository; null when the repository's page answered instead of the API. |
| `platform_specific.github.license_key` | `string` or `null` | GitHub's own key for the detected license (mit, apache-2.0, other); null when no license is detected or the repository's page answered. |
| `platform_specific.github.is_disabled` | `boolean` or `null` | True when GitHub disabled the repository (it no longer serves its code); null when the repository's page answered. |
| `platform_specific.github.is_template` | `boolean` or `null` | True when its owner made it a template that new repositories can be generated from. |
| `platform_specific.github.is_mirror` | `boolean` or `null` | True when it is a mirror GitHub keeps in sync with a repository hosted elsewhere. |
| `platform_specific.github.mirror_url` | `string` or `null` | The repository it mirrors, when it is a mirror; null otherwise and when the repository's page answered. |
| `platform_specific.github.is_issues_enabled` | `boolean` or `null` | Whether its issue tracker is on; null when the repository's page answered. |
| `platform_specific.github.is_pull_requests_enabled` | `boolean` or `null` | Whether it takes pull requests (its owner can turn them off); null when not stated. |
| `platform_specific.github.is_discussions_enabled` | `boolean` or `null` | Whether its Discussions forum is on; null when the repository's page answered. |
| `platform_specific.github.is_wiki_enabled` | `boolean` or `null` | Whether its wiki is on; null when the repository's page answered. |
| `platform_specific.github.is_projects_enabled` | `boolean` or `null` | Whether its project boards are on; null when the repository's page answered. |
| `platform_specific.github.is_pages_enabled` | `boolean` or `null` | Whether it publishes a GitHub Pages website; null when the repository's page answered. |
| `platform_specific.github.network_count` | `integer` or `null` | Repositories in its fork network (every fork of its root repository, forks of forks included); null in a list of repositories. |
| `platform_specific.github.source` | `object` or `null` | The root repository of its fork chain (parent is the one it was forked from directly); null when it is not a fork, and in a list of repositories. |
| `platform_specific.github.source.id` | `string` or `null` | Platform-native repository ID, as Repository.id; null when the platform names the repository without it. |
| `platform_specific.github.source.full_name` | `string` | Owner and name as in its link (torvalds/linux). |
| `platform_specific.github.source.url` | `string` (uri) | Canonical repository page URL. |
| `platform_specific.github.period_star_count` | `integer` or `null` | Stars it gained in the trending board's window (today, this week or this month, as asked): what GitHub ranks the board by; null outside the trending board. |
| `platform_specific.github.built_by` | `object[]` | The contributors GitHub's trending board shows for it (Built by, up to five, most active first). Only the trending board shows them: elsewhere it is \[\] and listed in unknown_fields. |
| `platform_specific.github.built_by[].id` | `string` or `null` | Platform-native account ID; null when only the handle is known. |
| `platform_specific.github.built_by[].username` | `string` or `null` | Handle without the @; null when the account has none. |
| `platform_specific.github.built_by[].display_name` | `string` or `null` | Display name shown on the profile. |
| `platform_specific.github.built_by[].url` | `string` (uri) or `null` | Canonical profile URL. |
| `platform_specific.github.built_by[].avatar_url` | `string` (uri) or `null` | Profile picture URL. Platform CDN URLs can expire within hours. |
| `platform_specific.github.built_by[].is_verified` | `boolean` or `null` | Platform verification badge; null where the platform has no badge. |
| `platform_specific.github.language_color` | `string` or `null` | The color GitHub draws programming_language's dot in, as a hex code (#3572A5 for Python); null when the source does not show it or the language has none. |
| `approximate_fields` | `string[]` | JSON paths of values rounded by the platform or parsed from display text (size_bytes from kilobytes, metrics.open_issue_count from "1.1k"). \[\] when all exact. |
| `unknown_fields` | `string[]` | JSON paths of lists whose \[\] means unknown rather than none (a source that cannot see the topics); null already means unknown for every other field. \[\] when every list is known. |

## Item errors

Besides the [request-level errors](https://socialtap.dev/docs/errors/index.md) every endpoint can return, repository endpoints return:

| Code | HTTP | Retry | Meaning | What to do |
| --- | --- | --- | --- | --- |
| `not_found` | 404 | No | The item does not exist or was deleted. On GET /v1/requests/{id}/response: the response was not kept (details.reason says why). | Check the link or ID. Do not retry. |
| `private_or_unavailable` | 403 | No | The item exists but is not public: it is private, age- or region-restricted, or needs a login to view. It shares 403 with forbidden (which is about the key), so branch on the code. | Only public items can be fetched. Do not retry. |

---

[HTML version](https://socialtap.dev/resources/repository/) · [Docs index for AI agents](https://socialtap.dev/llms.txt) · [All docs in one file](https://socialtap.dev/llms-full.txt)
