GitHub Search API

The GitHub Search API lets you programmatically find and filter content across GitHubincluding repositories, code, issues and pull requests, commits, users, topics, and labelsusing a powerful query language with qualifiers (for example by language, stars, forks, org/user, path/filename, label, state, author, or committer).

Operations 7

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /search/code Search for code inside files · GitHub Search Code #
Ask an LLM
“How do I find where a function is defined across GitHub repositories?”
“Can I search file contents for a keyword limited to one language and repo?”
Tell an agent
Search code for {q}.
Find files whose contents match {q}, showing {per_page} results per page.
GET /search/commits Search commits on default branches · GitHub Search Commits #
Ask an LLM
“How can I find commits whose message mentions a bug number?”
“Can I sort commit search results by author date?”
Tell an agent
Search commits matching {q}.
Find commits matching {q}, sorted by {sort} in {order} order.
GET /search/issues Search issues and pull requests · GitHub Search Issues and Pull Requests #
Ask an LLM
“How do I find open issues mentioning a keyword across repositories?”
“Can I sort issue and pull request search results by number of comments or reactions?”
Tell an agent
Search issues and pull requests for {q}.
Find issues and PRs matching {q}, sorted by {sort}.
GET /search/labels Search labels in a repository · GitHub Search Labels #
Ask an LLM
“How do I find issue labels in one repository by name or description?”
“Can I sort matching labels by when they were created?”
Tell an agent
Search labels in repository {repository_id} for {q}.
Find labels matching {q} in repo {repository_id}, sorted by {sort}.
GET /search/repositories Search repositories · GitHub Search Repositories #
Ask an LLM
“What are the most-starred repositories for a given topic or language?”
“Can I sort repository search results by forks or help-wanted issues?”
Tell an agent
Search repositories for {q}.
Find repositories matching {q}, sorted by {sort} in {order} order.
GET /search/topics Search repository topics · GitHub Search Topics #
Ask an LLM
“Which repository topics exist that relate to a keyword?”
“How do I look up topics to tag my repo with?”
Tell an agent
Search topics matching {q}.
Show page {page} of topics that match {q}.
GET /search/users Search users · GitHub Search Users #
Ask an LLM
“How do I find GitHub users by login, name or public email?”
“Can I sort user search results by number of followers?”
Tell an agent
Search users matching {q}.
Find users matching {q}, sorted by {sort}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/github-search-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

github-search-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.1.4
  title: GitHub v3 REST Search API
  description: GitHub's v3 REST API.
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  contact:
    name: Support
    url: https://support.github.com/contact?tags=dotcom-rest-api
  x-github-plan: ghes
  x-github-release: 3.9
servers:
- url: '{protocol}://{hostname}/api/v3'
  variables:
    hostname:
      description: Self-hosted Enterprise Server hostname
      default: HOSTNAME
    protocol:
      description: Self-hosted Enterprise Server protocol
      default: http
tags:


# --- truncated at 32 KB (125 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/openapi/github-search-api-openapi.yml