GitHub

Search GitHub repos, conversations, discussions, or code

Search GitHub repositories, conversations (issues + PRs), discussions, or code. Supports GitHub search syntax.

post/api/v1/github/search

Request

  • Base URL: https://glim.sh
  • URL: https://glim.sh/api/v1/github/search
  • Auth: one of:
    • none
    • API key in header x-api-key
    • HTTP bearer
    • API key in query parameter apiKey

Request body

querystring required

Search query in full GitHub search syntax: qualifiers (repo:owner/name, org:/user:, language:, path: with globs, symbol:, content:, is:, stars:>N, label:, sort:stars), boolean AND/OR/NOT with parentheses, "exact strings", and /regex/. kind=repos: minimal distinctive keywords - the project/library name (GOOD: 'rtk', 'react query'; BAD: 'rtk rust token killer' - every extra word must ALL match and buries the real repo; filter with qualifiers, not prose). kind=code: ONE literal code pattern as it appears in files ('useState('), an "exact string", a /regex/, or symbol:name for definitions; narrow with repo:/language:/path:, not extra words. kind=conversations: keywords plus filters (is:issue, label:bug). kind=discussions: keywords plus repo:/org:/author:/is:answered/category: - a separate GitHub index from issues/PRs, so a thread that lives in Discussions is invisible to kind=conversations (and vice versa). category: matches the repo's own category name (Ideas, Q&A) and needs a repo: scope; sort: does not apply. Caution: sort: REPLACES relevance ranking (sort:reactions = most-popular thread mentioning the words anywhere, incl. comments) - omit sort: for best-match. Not supported in code search: license:, enterprise:, is:vendored, is:generated.

kind'repos' | 'conversations' | 'code' | 'discussions'

What to search: 'repos', 'conversations' (issues+PRs), 'discussions' (GitHub Discussions - a separate index from issues/PRs), or 'code' (literal/regex/symbol search across 2.8M+ public GitHub repos). Optional - inferred from the query: is:answered/category: implies discussions, is:/label:/author: implies conversations, path:/symbol:/content://regex/ implies code, stars:/topic:/in:readme implies repos, otherwise repos. type:code / type:repos / type:discussions in the query also works. A conversations search that matches nothing is retried as discussions, so an answer that lives in Discussions is not silently missed.

repostring

Scope to one repository. Accepts 'owner/name', a github.com URL, or a partial 'owner/' (code). Works with any kind; setting it with kind=repos routes the search to conversations, since repo-name search can't scope to one repo. Equivalent to a repo: qualifier in the query (if both are given they must match).

pageinteger

Page number

per_pageinteger

Results per page

Response

Search results

kind'repos' | 'conversations' | 'code' | 'discussions' required

The kind that was searched

total_countnumber required

Matches found (files, for code)

incomplete_resultsboolean required

Whether coverage was cut short

has_moreboolean required

Whether another page exists

next_cursorstring

Pass as page for the next page

noticestring

How the search was interpreted - re-routing, query grouping, degraded coverage. Can mean the query was rewritten.

Changes

No recorded changes to this operation across all 1 revision of this API.