GitHub Repository API
The GitHub Repository API returns a single public
GitHub
repository as structured JSON. Pass it in the repository parameter as owner/name.
A github.com URL, a deep link into the repository or a clone URL is normalized automatically, and a renamed or
transferred repository resolves to its current name. A repository that is missing, private, deleted or blocked
returns an error.
API Parameters
Repository
-
- Name
-
repository - Required
- Required
- Description
-
The repository to fetch, as
owner/name, e.g.rails/rails. A github.com URL, including deep links such ashttps://github.com/rails/rails/tree/main/activerecord, or a clone URL such asgit@github.com:rails/rails.gitis normalized toowner/name. A renamed or transferred repository resolves to its current name, returned inrepository.full_name. The owner must be 1 to 39 letters, digits, or hyphens and must not be one of GitHub's reserved routes such asorgsortopics. The name must be 1 to 100 letters, digits, hyphens, underscores, or dots. Anything else returns a400.
Engine
-
- Name
-
engine - Required
- Required
- Description
-
Parameter defines an engine that will be used to retrieve real-time data. It must be set to
github_repository.
API key
-
- Name
-
api_key - Required
- Required
- Description
-
The
api_keyauthenticates your requests. Use it as a query parameter (https://www.searchapi.io/api/v1/search?api_key=YOUR_API_KEY) or in the Authorization header (Bearer YOUR_API_KEY).
Zero Data Retention
-
- Name
-
zero_retention - Enterprise Only
- Enterprise Only
- Required
- Optional
- Description
-
Set this parameter to
trueto disable all logging and persistent storage. No request parameters, HTML, or JSON responses are stored or logged. Suitable for high-compliance use cases. Debugging and support may be limited while enabled.
API Examples
Repository
The repository object carries the details GitHub shows on the repository page: the description,
website, topics, primary language, owner, license and default branch, the stars, watchers and
forks, the open issue and pull request counts, published security advisories, the commit, branch,
tag, release and contributor counts, and the "Used by" count of dependent repositories. It also reports whether
the repository is a fork, archived, a template, a mirror or empty, which tabs (issues, pull requests,
discussions, wiki, projects) the page shows, and whether it has a code of conduct, contributing guide, security
policy or citation file. GitHub stops counting open issues and pull requests past 5,000: the count then reads
5001, with is_open_issues_count_capped or
is_open_pull_requests_count_capped set.
Alongside it, the response includes the latest_commit on the default branch with its message as
GitHub renders it, authors, committer and checks state, the latest_release, the languages breakdown with
percentages, the top contributors, the project's funding options (GitHub Sponsors
accounts and other funding links), the files and folders at the repository root (up to 1,000, with
the total in files_count), and the README as
readme with its text, html markup and link. Sections GitHub
does not show for a repository are omitted, and an empty repository returns only the details from its header
with is_empty: true.
https://www.searchapi.org/api/v1/search?engine=github_repository&repository=rails%2Frails
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.org/api/v1/search"
params = {
"engine": "github_repository",
"repository": "rails/rails"
}
response = requests.get(url, params=params)
print(response.text)
{
"search_metadata": {
"id": "search_WMBG04LgyPXTLAQ8pb6NQzqD",
"status": "Success",
"created_at": "2026-10-19T11:42:03Z",
"request_time_taken": 3.7,
"parsing_time_taken": 0.16,
"total_time_taken": 3.86,
"request_url": "https://github.com/rails/rails",
"html_url": "https://www.searchapi.io/api/v1/searches/search_WMBG04LgyPXTLAQ8pb6NQzqD.html",
"json_url": "https://www.searchapi.io/api/v1/searches/search_WMBG04LgyPXTLAQ8pb6NQzqD"
},
"search_parameters": {
"engine": "github_repository",
"repository": "rails/rails"
},
"repository": {
"id": 8514,
"name": "rails",
"full_name": "rails/rails",
"link": "https://github.com/rails/rails",
"description": "Ruby on Rails",
"website": "https://rubyonrails.org",
"topics": [
"activejob",
"activerecord",
"framework",
"html",
"mvc",
"rails",
"ruby"
],
"language": "Ruby",
"language_color": "#701516",
"owner": {
"login": "rails",
"id": 4223,
"type": "Organization",
"link": "https://github.com/rails",
"avatar_url": "https://avatars.githubusercontent.com/u/4223?v=4"
},
"license": {
"name": "MIT License",
"spdx_id": "MIT",
"link": "https://github.com/rails/rails/blob/main/MIT-LICENSE"
},
"default_branch": "main",
"stars": 58849,
"watchers": 2348,
"forks": 25661,
"open_issues_count": 488,
"open_pull_requests_count": 1192,
"security_advisories_count": 26,
"commits_count": 100211,
"files_count": 41,
"branches_count": 89,
"tags_count": 554,
"releases_count": 170,
"contributors_count": 5339,
"used_by_count": 2345089,
"created_at": "2008-04-11T02:19:47Z",
"has_issues": true,
"has_pull_requests": true,
"has_discussions": true,
"has_code_of_conduct": true,
"has_contributing_guide": true,
"has_security_policy": true
},
"latest_commit": {
"sha": "1d11045254f159315040b4e997584b4cd081519c",
"message": "Merge pull request #59151 from mhenrixon/ractor-controller-name\n\nCompute `Metal.controller_name` on `eager_load!`",
"link": "https://github.com/rails/rails/commit/1d11045254f159315040b4e997584b4cd081519c",
"date": "2026-10-19T11:11:55Z",
"authors": [
{
"login": "byroot",
"name": "Jean Boussier",
"id": 44640,
"link": "https://github.com/byroot",
"avatar_url": "https://avatars.githubusercontent.com/u/44640?v=4"
},
"..."
],
"committer": {
"login": "web-flow",
"name": "GitHub",
"id": 19864447,
"link": "https://github.com/web-flow",
"avatar_url": "https://avatars.githubusercontent.com/u/19864447?v=4"
},
"checks": {
"state": "success"
}
},
"latest_release": {
"name": "8.1.4",
"tag": "v8.1.4",
"link": "https://github.com/rails/rails/releases/tag/v8.1.4",
"published_at": "2026-09-24T14:19:52Z"
},
"languages": [
{
"name": "Ruby",
"percentage": 97.4,
"color": "#701516"
},
"..."
],
"contributors": [
{
"login": "rafaelfranca",
"name": "Rafael Mendonça França",
"id": 47848,
"link": "https://github.com/rafaelfranca",
"avatar_url": "https://avatars.githubusercontent.com/u/47848?v=4"
},
"..."
],
"files": [
{
"name": ".devcontainer",
"path": ".devcontainer",
"type": "directory",
"link": "https://github.com/rails/rails/tree/main/.devcontainer"
},
"..."
],
"readme": {
"text": "Welcome to Rails What's Rails? Rails is a web application framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern. Understanding the MVC pattern is key to und...",
"html": "<div class=\"markdown-heading\" dir=\"auto\"><h1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Welcome to Rails</h1><a id=\"user-content-welcome-to-rails\" class=\"anchor\" aria-label=\"Permalink: Welcome to Rails\" href=\"#welcome-to-rails\"><svg d...",
"link": "https://github.com/rails/rails/blob/main/README.md"
}
}
Fork
A fork returns is_fork: true and forked_from, the repository it was forked from.
GitHub does not count or list contributors for forks, so contributors and
contributors_count are omitted.
https://www.searchapi.org/api/v1/search?engine=github_repository&repository=dhh%2Fimpala
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.org/api/v1/search"
params = {
"engine": "github_repository",
"repository": "dhh/impala"
}
response = requests.get(url, params=params)
print(response.text)
{
"search_metadata": {
"id": "search_jGd7bMw38EDulZ0EpmJ8v5YA",
"status": "Success",
"created_at": "2026-10-19T11:42:03Z",
"request_time_taken": 2.63,
"parsing_time_taken": 0.31,
"total_time_taken": 2.94,
"request_url": "https://github.com/dhh/impala",
"html_url": "https://www.searchapi.io/api/v1/searches/search_jGd7bMw38EDulZ0EpmJ8v5YA.html",
"json_url": "https://www.searchapi.io/api/v1/searches/search_jGd7bMw38EDulZ0EpmJ8v5YA"
},
"search_parameters": {
"engine": "github_repository",
"repository": "dhh/impala"
},
"repository": {
"id": 1209887420,
"name": "impala",
"full_name": "dhh/impala",
"link": "https://github.com/dhh/impala",
"description": "🛜 TUI for managing wifi on Linux",
"language": "Rust",
"language_color": "#dea584",
"owner": {
"login": "dhh",
"id": 2741,
"type": "User",
"link": "https://github.com/dhh",
"avatar_url": "https://avatars.githubusercontent.com/u/2741?v=4"
},
"forked_from": "pythops/impala",
"license": {
"name": "GNU General Public License v3.0",
"spdx_id": "GPL-3.0",
"link": "https://github.com/dhh/impala/blob/main/LICENSE"
},
"default_branch": "main",
"stars": 18,
"watchers": 0,
"forks": 0,
"open_pull_requests_count": 0,
"security_advisories_count": 0,
"commits_count": 122,
"files_count": 13,
"branches_count": 2,
"tags_count": 0,
"releases_count": 0,
"created_at": "2026-04-13T22:07:20Z",
"is_fork": true,
"has_pull_requests": true,
"has_projects": true
},
"latest_commit": {
"sha": "fa2c764d1ebfb734d7e29ae9c56368cd63ad5f2a",
"message": "fix: escape special characters when sharing qr code (pythops#141)",
"link": "https://github.com/dhh/impala/commit/fa2c764d1ebfb734d7e29ae9c56368cd63ad5f2a",
"date": "2026-04-12T10:32:39Z",
"authors": [
{
"login": "sermuns",
"name": "Samuel Åkesson",
"id": 30374440,
"link": "https://github.com/sermuns",
"avatar_url": "https://avatars.githubusercontent.com/u/30374440?v=4"
},
"..."
],
"committer": {
"login": "web-flow",
"name": "GitHub",
"id": 19864447,
"link": "https://github.com/web-flow",
"avatar_url": "https://avatars.githubusercontent.com/u/19864447?v=4"
}
},
"languages": [
{
"name": "Rust",
"percentage": 99.7,
"color": "#dea584"
},
"..."
],
"files": [
{
"name": ".cargo",
"path": ".cargo",
"type": "directory",
"link": "https://github.com/dhh/impala/tree/main/.cargo"
},
"..."
],
"readme": {
"text": "TUI for managing wifi 📸 Demo ✨ Features WPA Enterprise (802.1X) Support Station & Access Point Modes QR Code Network Sharing Support hidden networks 💡 Prerequisites A Linux based OS iwd running. nerdfonts (Optional) for icons. Important To ...",
"html": "<div align=\"center\" dir=\"auto\">\n <div class=\"markdown-heading\" dir=\"auto\"><h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"> TUI for managing wifi </h2><a id=\"user-content--tui-for-managing-wifi-\" class=\"anchor\" aria-label=\"Permalink: ...",
"link": "https://github.com/dhh/impala/blob/main/Readme.md"
}
}
Funding and sponsors
funding lists the "Sponsor this project" options from the repository's FUNDING file:
github_sponsors accounts and other links such as Open Collective. Sections the
page does not show, here releases and languages, are omitted. An owner can hide the Releases section, so a
missing latest_release does not mean the repository has no releases.
https://www.searchapi.org/api/v1/search?engine=github_repository&repository=sindresorhus%2Fawesome
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.org/api/v1/search"
params = {
"engine": "github_repository",
"repository": "sindresorhus/awesome"
}
response = requests.get(url, params=params)
print(response.text)
{
"search_metadata": {
"id": "search_QNVPZBKo24jcwR6Lp8y471M9",
"status": "Success",
"created_at": "2026-10-19T11:42:03Z",
"request_time_taken": 4.65,
"parsing_time_taken": 0.21,
"total_time_taken": 4.85,
"request_url": "https://github.com/sindresorhus/awesome",
"html_url": "https://www.searchapi.io/api/v1/searches/search_QNVPZBKo24jcwR6Lp8y471M9.html",
"json_url": "https://www.searchapi.io/api/v1/searches/search_QNVPZBKo24jcwR6Lp8y471M9"
},
"search_parameters": {
"engine": "github_repository",
"repository": "sindresorhus/awesome"
},
"repository": {
"id": 21737465,
"name": "awesome",
"full_name": "sindresorhus/awesome",
"link": "https://github.com/sindresorhus/awesome",
"description": "😎 Awesome lists about all kinds of interesting topics [NOTE: Pull requests are temporarily disabled until I have a chance to catch up with the existing ones]",
"topics": [
"awesome",
"awesome-list",
"lists",
"resources",
"unicorns"
],
"owner": {
"login": "sindresorhus",
"id": 170270,
"type": "User",
"link": "https://github.com/sindresorhus",
"avatar_url": "https://avatars.githubusercontent.com/u/170270?v=4"
},
"license": {
"name": "Creative Commons Zero v1.0 Universal",
"spdx_id": "CC0-1.0",
"link": "https://github.com/sindresorhus/awesome/blob/main/license"
},
"default_branch": "main",
"stars": 521217,
"watchers": 8420,
"forks": 37569,
"open_issues_count": 16,
"open_pull_requests_count": 89,
"security_advisories_count": 0,
"commits_count": 1209,
"files_count": 11,
"branches_count": 2,
"tags_count": 0,
"contributors_count": 621,
"created_at": "2014-07-11T13:42:37Z",
"has_issues": true,
"has_pull_requests": true,
"has_code_of_conduct": true,
"has_contributing_guide": true
},
"latest_commit": {
"sha": "bc98e517ddca672f55f9857d714fc3ea3c3540b2",
"message": "Meta tweaks",
"link": "https://github.com/sindresorhus/awesome/commit/bc98e517ddca672f55f9857d714fc3ea3c3540b2",
"date": "2026-09-02T02:10:45Z",
"authors": [
{
"login": "sindresorhus",
"name": "Sindre Sorhus",
"id": 170270,
"link": "https://github.com/sindresorhus",
"avatar_url": "https://avatars.githubusercontent.com/u/170270?v=4"
},
"..."
],
"committer": {
"login": "sindresorhus",
"name": "Sindre Sorhus",
"id": 170270,
"link": "https://github.com/sindresorhus",
"avatar_url": "https://avatars.githubusercontent.com/u/170270?v=4"
}
},
"contributors": [
{
"login": "sindresorhus",
"name": "Sindre Sorhus",
"id": 170270,
"link": "https://github.com/sindresorhus",
"avatar_url": "https://avatars.githubusercontent.com/u/170270?v=4"
},
"..."
],
"funding": {
"github_sponsors": [
{
"login": "sindresorhus",
"name": "Sindre Sorhus",
"id": 170270,
"link": "https://github.com/sindresorhus",
"avatar_url": "https://avatars.githubusercontent.com/u/170270?v=4"
},
"..."
],
"links": [
{
"platform": "open_collective",
"label": "opencollective.com/sindresorhus",
"link": "https://opencollective.com/sindresorhus"
},
"..."
]
},
"files": [
{
"name": ".github/workflows",
"path": ".github/workflows",
"type": "directory",
"link": "https://github.com/sindresorhus/awesome/tree/main/.github/workflows"
},
"..."
],
"readme": {
"text": "Check out my macOS app Supercharge Elevate your Mac experience My open source work is supported by the community Special thanks to: Fast remote container builds and GitHub Actions runners. What is an awesome list? Contribution guide Creatin...",
"html": "<div align=\"center\" dir=\"auto\">\n\t<a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://github.com/sindresorhus/awesome/blob/main/media/logo.svg\"><img width=\"500\" height=\"350\" src=\"https://github.com/sindresorhus/awesome/raw/main/media/...",
"link": "https://github.com/sindresorhus/awesome/blob/main/readme.md"
}
}
Renamed repository from a URL
The URL is normalized to facebook/react, which GitHub redirects to the repository's current
home. repository.full_name returns the current name, react/react.
https://www.searchapi.org/api/v1/search?engine=github_repository&repository=https%3A%2F%2Fgithub.com%2Ffacebook%2Freact
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.org/api/v1/search"
params = {
"engine": "github_repository",
"repository": "https://github.com/facebook/react"
}
response = requests.get(url, params=params)
print(response.text)
{
"search_metadata": {
"id": "search_75nmM02pVWXimYywgwE4z1Yx",
"status": "Success",
"created_at": "2026-10-19T11:42:03Z",
"request_time_taken": 3.7,
"parsing_time_taken": 0.18,
"total_time_taken": 3.87,
"request_url": "https://github.com/facebook/react",
"html_url": "https://www.searchapi.io/api/v1/searches/search_75nmM02pVWXimYywgwE4z1Yx.html",
"json_url": "https://www.searchapi.io/api/v1/searches/search_75nmM02pVWXimYywgwE4z1Yx"
},
"search_parameters": {
"engine": "github_repository",
"repository": "facebook/react"
},
"repository": {
"id": 10270250,
"name": "react",
"full_name": "react/react",
"link": "https://github.com/react/react",
"description": "The library for web and native user interfaces.",
"website": "https://react.dev",
"topics": [
"declarative",
"frontend",
"javascript",
"library",
"react",
"ui"
],
"language": "JavaScript",
"language_color": "#f1e05a",
"owner": {
"login": "react",
"id": 102812,
"type": "Organization",
"link": "https://github.com/react",
"avatar_url": "https://avatars.githubusercontent.com/u/102812?v=4"
},
"license": {
"name": "MIT License",
"spdx_id": "MIT",
"link": "https://github.com/react/react/blob/main/LICENSE"
},
"default_branch": "main",
"stars": 251358,
"watchers": 6614,
"forks": 51542,
"open_issues_count": 882,
"open_pull_requests_count": 583,
"security_advisories_count": 10,
"commits_count": 21733,
"files_count": 35,
"branches_count": 999,
"tags_count": 180,
"releases_count": 137,
"contributors_count": 1785,
"used_by_count": 30137900,
"created_at": "2013-05-24T16:15:54Z",
"has_issues": true,
"has_pull_requests": true,
"has_code_of_conduct": true,
"has_contributing_guide": true,
"has_security_policy": true
},
"latest_commit": {
"sha": "63d39af36473df4f1d3244902b8fd8fb51e7ab1b",
"message": "[Flight] Strip the full <anonymous>. type name prefix from I/O names (\n\n#37856)\n\nCo-authored-by: zhoubiao188 <zhoubiao188@users.noreply.github.com>",
"link": "https://github.com/react/react/commit/63d39af36473df4f1d3244902b8fd8fb51e7ab1b",
"date": "2026-10-19T11:23:00Z",
"authors": [
{
"login": "zhoubiao188",
"name": "The number one sword cultivator in the south of the sky",
"id": 32508238,
"link": "https://github.com/zhoubiao188",
"avatar_url": "https://avatars.githubusercontent.com/u/32508238?v=4"
},
"..."
],
"committer": {
"login": "web-flow",
"name": "GitHub",
"id": 19864447,
"link": "https://github.com/web-flow",
"avatar_url": "https://avatars.githubusercontent.com/u/19864447?v=4"
},
"checks": {
"state": "success"
}
},
"latest_release": {
"name": "19.3.1 (October 14th, 2026)",
"tag": "v19.3.1",
"link": "https://github.com/react/react/releases/tag/v19.3.1",
"published_at": "2026-10-14T17:06:15Z"
},
"languages": [
{
"name": "JavaScript",
"percentage": 49.5,
"color": "#f1e05a"
},
"..."
],
"contributors": [
{
"login": "sebmarkbage",
"name": "Sebastian Markbåge",
"id": 63648,
"link": "https://github.com/sebmarkbage",
"avatar_url": "https://avatars.githubusercontent.com/u/63648?v=4"
},
"..."
],
"files": [
{
"name": ".claude",
"path": ".claude",
"type": "directory",
"link": "https://github.com/react/react/tree/main/.claude"
},
"..."
],
"readme": {
"text": "React · React is a JavaScript library for building user interfaces. Declarative: React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just th...",
"html": "<div class=\"markdown-heading\" dir=\"auto\"><h1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"><a href=\"https://react.dev/\" rel=\"nofollow\">React</a> · <a href=\"https://github.com/react/react/blob/main/LICENSE\"><img src=\"https://camo.githubus...",
"link": "https://github.com/react/react/blob/main/README.md"
}
}