JustSERPDocs
GitHub

GitHub Repository

One GitHub repository's page, answered as the document: `repository`, `latest_commit`, `latest_release`, `contributors`, `files` and `readme`.

GET
/v1/github/repository

One GitHub repository's page, answered as the document: repository, latest_commit, latest_release, contributors, files and readme. A renamed or moved repository resolves to its current name (repository.full_name). A fork adds repository.forked_from; an empty repository answers repository only (is_empty: true). A block GitHub does not show is absent: latest_release for a repository with no releases, used_by_count when the page has no "Used by", contributors for the largest repositories. Not given to a visitor who is not signed in, so not answered: languages, branches_count, funding. A repository that does not exist is 404 profile_not_found. zero_retention is not handled.

Authorization

headerX-API-Key<token>

Your API key.

Query Parameters

cancel_token?string

A name you make up for this request (a UUID is fine), so you can later GET /v1/cancel with it. Only you know it, so only you can cancel. Use a new one for every request, retries included: a cancelled token stays cancelled for a few minutes.

Length1 <= length <= 128
repository*string

owner/name, a github.com address (a deep link such as .../tree/main/src is cut back to the repository) or a clone address ([email protected]:owner/name.git). The owner is 1 to 39 letters, digits or hyphens; the name 1 to 100 letters, digits, hyphens, underscores or dots; another host is 400.

Response Body

The repository, as the document. When the page could not be parsed, the usual envelope.

application/json
  1. response

The first keys of a document-form answer. Unlike DocumentHead there is no search_information unless the engine has one (there is none for the AI engines, Events, Events Details, Facebook, Tripadvisor Place, Trending Now and the Apple engines' places).

search_metadata*
search_parameters*

The parameters the search ran with, defaults filled in; engine is the engine's name.

search_information?
repository?
latest_commit?
latest_release?
contributors?array<>

The avatars the sidebar shows (up to 14).

files?array<>
readme?
Example Request
curl -X GET 'https://api.justserp.com/v1/github/repository?repository=rails%2Frails'
Example Response
{  "search_metadata": {    "id": "string",    "status": "Success",    "created_at": "string",    "request_url": "string",    "html_url": "string"  },  "search_parameters": {},  "search_information": {},  "repository": {    "id": 0,    "name": "string",    "full_name": "string",    "link": "string",    "description": "string",    "website": "string",    "topics": [      "string"    ],    "owner": {      "login": "string",      "id": 0,      "type": "string",      "link": "string",      "avatar_url": "string"    },    "license": {      "name": "string",      "spdx_id": "string",      "link": "string"    },    "default_branch": "string",    "stars": 0,    "watchers": 0,    "forks": 0,    "open_issues_count": 0,    "is_open_issues_count_capped": true,    "open_pull_requests_count": 0,    "is_open_pull_requests_count_capped": true,    "security_advisories_count": 0,    "commits_count": 0,    "files_count": 0,    "tags_count": 0,    "releases_count": 0,    "contributors_count": 0,    "used_by_count": 0,    "created_at": "string",    "has_issues": true,    "has_pull_requests": true,    "has_discussions": true,    "has_wiki": true,    "has_projects": true,    "has_code_of_conduct": true,    "has_contributing_guide": true,    "has_security_policy": true,    "has_citation": true,    "is_fork": true,    "forked_from": {      "full_name": "string",      "link": "string"    },    "is_archived": true,    "is_template": true,    "is_mirror": true,    "is_empty": true,    "visibility": "string"  },  "latest_commit": {    "sha": "string",    "message": "string",    "link": "string",    "date": "string",    "authors": [      {        "login": "string",        "name": "string",        "id": 0,        "link": "string",        "avatar_url": "string"      }    ],    "committer": {      "login": "string",      "name": "string",      "id": 0,      "link": "string",      "avatar_url": "string"    },    "checks": {      "state": "string"    }  },  "latest_release": {    "name": "string",    "tag": "string",    "link": "string",    "published_at": "string"  },  "contributors": [    {      "login": "string",      "name": "string",      "id": 0,      "link": "string",      "avatar_url": "string"    }  ],  "files": [    {      "name": "string",      "path": "string",      "type": "string",      "link": "string"    }  ],  "readme": {    "text": "string",    "html": "string",    "link": "string"  }}