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.

Schema

Single-item endpoints return this object as data; list endpoints return an array of them as data with a page object. The standard meta comes with every response.

platformstring

Platform ID (github, …).

idstring

Platform-native repository ID (string): GitHub's number, which stays the same when the repository is renamed or moves to another owner.

full_namestring

Owner and name as in its link (torvalds/linux): what people call it, though it changes when the repository is renamed or transferred.

namestring

The repository's name without its owner (linux), as its link spells it.

urlstring uri

Canonical repository page URL.

avatar_urlstring urinullable

The repository's own icon, apart from its owner's avatar; null when it has none. Platform CDN URLs can expire.

descriptionstringnullable

The repository's short description (GitHub's About), as plain text; null when it has none.

ownerobject

The account that owns it: a person or an organization (owner_type).

ShowHide 6 child fields
idstringnullable

Platform-native account ID; null when only the handle is known.

usernamestringnullable

Handle without the @; null when the account has none.

display_namestringnullable

Display name shown on the profile.

urlstring urinullable

Canonical profile URL.

avatar_urlstring urinullable

Profile picture URL. Platform CDN URLs can expire within hours.

is_verifiedbooleannullable

Platform verification badge; null where the platform has no badge.

owner_typestringnullable

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.

One ofpersonorganization

homepage_urlstring urinullable

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_languagestringnullable

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.

topicsstring[]

Topic tags its owner filed it under, as written (lowercase, hyphenated); [] when none.

licenseobjectnullable

The license the platform detected in it or its owner declared; null when none is detected or the platform does not say.

ShowHide 2 child fields
spdx_idstringnullable

The license's SPDX identifier (MIT, Apache-2.0); null when it has none (a custom or unrecognized license).

namestringnullable

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_branchstringnullable

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_forkbooleannullable

A fork of another repository (parent); null when the platform does not say.

parentobjectnullable

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).

ShowHide 3 child fields
idstringnullable

Platform-native repository ID, as Repository.id; null when the platform names the repository without it.

full_namestring

Owner and name as in its link (torvalds/linux).

urlstring uri

Canonical repository page URL.

is_archivedbooleannullable

Archived by its owner: read-only, no longer maintained; null when the platform does not say.

size_bytesintegernullable

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_atstring date-timenullable

When the repository was created, RFC 3339 UTC (a fork's: when it was forked); null when the platform does not say.

updated_atstring date-timenullable

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_atstring date-timenullable

When code was last pushed to it, RFC 3339 UTC; null when the platform does not say.

metricsobject

Counts at fetch time; null = hidden or not exposed, 0 = zero.

ShowHide 5 child fields
star_countintegernullable

Accounts that starred it; null when the platform has no stars or hides the count.

fork_countintegernullable

Forks of it on the platform; null when the platform does not state a count.

watcher_countintegernullable

Accounts watching it for notifications (not its stars); null when the platform does not state a count.

open_issue_countintegernullable

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").

open_pull_request_countintegernullable

Open pull requests (merge requests on GitLab); null when the platform does not state a count.

platform_specificobject

Fields only this platform has, under its ID (platform_specific.<platform>); each null when unknown.

ShowHide 1 child field
githubobjectnullable

A GitHub repository's own fields.

ShowHide 17 child fields
node_idstringnullable

GitHub's GraphQL node ID of the repository; null when the repository's page answered instead of the API.

license_keystringnullable

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.

is_disabledbooleannullable

True when GitHub disabled the repository (it no longer serves its code); null when the repository's page answered.

is_templatebooleannullable

True when its owner made it a template that new repositories can be generated from.

is_mirrorbooleannullable

True when it is a mirror GitHub keeps in sync with a repository hosted elsewhere.

mirror_urlstringnullable

The repository it mirrors, when it is a mirror; null otherwise and when the repository's page answered.

is_issues_enabledbooleannullable

Whether its issue tracker is on; null when the repository's page answered.

is_pull_requests_enabledbooleannullable

Whether it takes pull requests (its owner can turn them off); null when not stated.

is_discussions_enabledbooleannullable

Whether its Discussions forum is on; null when the repository's page answered.

is_wiki_enabledbooleannullable

Whether its wiki is on; null when the repository's page answered.

is_projects_enabledbooleannullable

Whether its project boards are on; null when the repository's page answered.

is_pages_enabledbooleannullable

Whether it publishes a GitHub Pages website; null when the repository's page answered.

network_countintegernullable

Repositories in its fork network (every fork of its root repository, forks of forks included); null in a list of repositories.

sourceobjectnullable

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.

ShowHide 3 child fields
idstringnullable

Platform-native repository ID, as Repository.id; null when the platform names the repository without it.

full_namestring

Owner and name as in its link (torvalds/linux).

urlstring uri

Canonical repository page URL.

period_star_countintegernullable

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.

built_byobject[]

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.

ShowHide 6 child fields
idstringnullable

Platform-native account ID; null when only the handle is known.

usernamestringnullable

Handle without the @; null when the account has none.

display_namestringnullable

Display name shown on the profile.

urlstring urinullable

Canonical profile URL.

avatar_urlstring urinullable

Profile picture URL. Platform CDN URLs can expire within hours.

is_verifiedbooleannullable

Platform verification badge; null where the platform has no badge.

language_colorstringnullable

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_fieldsstring[]

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_fieldsstring[]

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 every endpoint can return, repository endpoints return:

CodeHTTPRetryMeaningWhat to do
not_found404NoThe 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_unavailable403NoThe 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.

Last updated