GroundsocialDocs

API · GitHub

GET /github/search/repos

Search GitHub repositories by keyword, language, stars and more.

RequestGET /v1/github/search/repos
Operation idgithub.search.repos
Cost1 credit, refunded if the call fails
AuthAPI key: Authorization: Bearer <key> or x-api-key.

Search GitHub repositories by keyword, language, stars and more.

Query parameters

NameTypeRequiredDescription
qstringyesGitHub repository search query. Example: language:rust stars:>5000.
sort"stars" | "forks" | "help-wanted-issues" | "updated"noSort field (default: best match). One of stars, forks, help-wanted-issues, updated.
order"asc" | "desc"nodesc (default) or asc. One of asc, desc.
sincestringnoOnly items on or after this date (YYYY-MM-DD or ISO 8601).
untilstringnoOnly items on or before this date (that whole UTC day for YYYY-MM-DD).
per_pageintegernoItems per page, 1-100 (default 30).
pageintegerno1-indexed page number (default 1).
afterstringnoCursor: the previous page’s next_cursor (instead of page).

Responses

StatusMeaningSchema
200Matching repositories.GitHubRepoSearchResponse
400Invalid input. Nothing was charged.Error
401Missing or invalid API key.Error
402Not enough credits, a spend cap was reached, or payment is required.Error
403The target is private, or the account is suspended.Error
404No public GitHub user, repository or issue by that name.Error
429Too many requests. Wait for Retry-After seconds.Error
503GitHub is temporarily unavailable. Retryable; nothing was charged.Error

GitHubRepoSearchResponse fields

FieldTypeDescription
total_countinteger
incomplete_resultsboolean
itemsGitHubRepo[]
pageinteger1-indexed page this is.
per_pageinteger
has_moreboolean
next_cursorstring | nullPass as after for the next page; null at the end.

Errors use one shape everywhere; see Errors for every code and what to do.