JustSERPDocs
GitHub

GitHub Search

One page of GitHub's search for one vertical, as a visitor who is not signed in, answered as the document: `search_information`, `organic_results` (the vertical's fields; a field GitHub does not give a result is absent), `pagination` and the filters.

GET
/v1/github/search

One page of GitHub's search for one vertical, as a visitor who is not signed in, answered as the document: search_information, organic_results (the vertical's fields; a field GitHub does not give a result is absent), pagination and the filters. Verticals: repositories, users, issues, pull requests, commits, topics, discussions, packages, wikis, marketplace and gists. GitHub serves 10 results a page and the first 1,000 (gists: 20 snippets read as 10 results). Code search needs a login and is not offered. snippet is the highlighted fragment with the <em> marks removed; body fields are cut at 20,000 characters. profile_not_found is not given. 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
q*string

The search. GitHub's qualifier syntax is passed as sent (language:ruby stars:>1000 topic:cli, is:pr is:merged, user:paulirish extension:sh for gists).

Length1 <= length <= 1000
type?string

The vertical. issues is issues and pull requests together; gists are searched on gist.github.com.

Default"repositories"
Value in"repositories""users""issues""pull_requests""commits""topics""discussions""packages""wikis""marketplace""gists"
sort?string

By type: repositories stars, forks, help_wanted_issues, updated; users followers, repositories, joined; issues and pull_requests created, updated, comments, reactions, interactions; commits author_date, committer_date; discussions updated, comments, reactions, interactions; packages updated, created, downloads; wikis updated; marketplace updated, created, popularity; gists stars, forks, updated; topics cannot be sorted. A sort the type does not have is 400. Default: GitHub's best match.

order?string

Needs sort, as on GitHub (order without sort is 400).

Default"desc"
Value in"asc""desc"
page?integer

A page is 10 results.

Range1 <= value <= 100
Default1

Response Body

The results, 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?
topic?

Repositories, when the query is a curated topic.

organic_results?array<>

[] for no result. Each result has position and the vertical's fields. repositories: id, name, full_name, link, description, owner, stars, language, language_color, topics, good_first_issue_issues_count, help_wanted_issues_count, visibility, updated_at, is_sponsorable, has_funding_file, has_issues, is_archived, is_mirror. users: login, name, id, link, avatar_url, bio, location, followers, repos, is_sponsorable. issues and pull_requests: id, number, title, snippet, link, state, state_reason, comments, labels, author, created_at, repository (a pull request adds is_pull_request, reviewable_state, merged). commits: sha, subject, message, snippet, link, author_date, authors, committer, repository, verification. topics: id, name, display_name, link, description, stargazer_count, repository_count, aliases, is_curated... discussions: id, number, title, snippet, body, link, comments, author, created_at, updated_at, repository. packages: id, name, link, package_type, downloads, latest_version, visibility, created_at, updated_at, repository. wikis: id, title, snippet, body, link, filename, format, updated_at, repository. marketplace: id, listing_type, name, slug, link, description, primary_category, installation_count, stars, dependents_count, logo, owner_login. gists: id, title, link, description, owner, files_count, forks, comments, stars, updated_at, snippet.

pagination?
language_filters?array<>

Repositories, users, pull requests and gists.

package_type_filters?array<>

Packages.

Example Request
curl -X GET 'https://api.justserp.com/v1/github/search?q=language%3Arust+stars%3A%3E1000&type=repositories&sort=stars&order=desc&page=1'
Example Response
{  "search_metadata": {    "id": "string",    "status": "Success",    "created_at": "string",    "request_url": "string",    "html_url": "string"  },  "search_parameters": {},  "search_information": {    "query": "string",    "total_results": 0,    "page": 0,    "time_taken": 0  },  "topic": {    "name": "string",    "display_name": "string",    "description": "string",    "stargazer_count": 0,    "link": "string",    "is_curated": true  },  "organic_results": [    {      "position": 0,      "id": 0,      "name": "string",      "full_name": "string",      "title": "string",      "link": "string",      "description": "string",      "snippet": "string",      "owner": {},      "stars": 0,      "language": "string",      "language_color": "string",      "topics": [        "string"      ],      "visibility": "string",      "updated_at": "string",      "created_at": "string",      "repository": {}    }  ],  "pagination": {    "current": 0,    "total_pages": 100,    "next": "string"  },  "language_filters": [    {      "name": "string",      "color": "string",      "query": "string",      "count": 0    }  ],  "package_type_filters": [    {      "name": "string",      "query": "string"    }  ]}