GitHub Repository Search API
Search public GitHub repositories by keyword and filter by owner, language, stars, forks, topics, license or creation and last-push date. Each result includes the description, primary language and star and fork counts.
- Endpoint
- POST /github/search-repositories
- Price
- 1 credit per request
- SDK
- client.github.searchRepositories()
- MCP tool
- github_search_repositories
curl -X POST "https://api.bridgly.app/github/search-repositories" \ -H "Authorization: Bearer $BRIDGLY_KEY" \ -H "Content-Type: application/json" \ -d '{ "query": "web framework", "language": "TypeScript", "sort": "stars", "count": 10}'import osimport requestsresponse = requests.post( "https://api.bridgly.app/github/search-repositories", headers={"Authorization": f"Bearer {os.environ['BRIDGLY_KEY']}"}, json={ "query": "web framework", "language": "TypeScript", "sort": "stars", "count": 10, },)data = response.json()const response = await fetch("https://api.bridgly.app/github/search-repositories", { method: "POST", headers: { Authorization: `Bearer ${process.env.BRIDGLY_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "query": "web framework", "language": "TypeScript", "sort": "stars", "count": 10 }),});const data = await response.json();import { Bridgly } from "@bridgly/sdk";const client = new Bridgly({ apiKey: "bgly_YOUR_KEY" });const res = await client.github.searchRepositories({ query: "web framework", language: "TypeScript", sort: "stars", count: 10});if (res.type === "success") { console.log(res.data);}What does the GitHub Repository Search API return?
GitHub repository search API: search public repos by keyword, language, stars, forks, topics, license and dates, with description and star and fork counts. Every response has the same envelope: the result in data, plus timeMs and the creditsCost of the call.
Request body
querystring- Free-text search terms, matched against the default fields for this search type, e.g. "web framework".
ownersstring[]- Limit to these owners (users or orgs). Maps to `user:`.
reposstring[]- Limit to these "owner/name" repositories. Maps to `repo:`.
languagestring- Primary language, e.g. "TypeScript". Maps to `language:`.
starsobject- Filter by star count. Provide any of gt / gte / lt / lte; combine a lower and upper bound for a range.
stars.gtnumber · nullable- Strictly greater than this value.
stars.gtenumber · nullable- Greater than or equal to this value.
stars.ltnumber · nullable- Strictly less than this value.
stars.ltenumber · nullable- Less than or equal to this value.
forksobject- Filter by fork count. Provide any of gt / gte / lt / lte; combine a lower and upper bound for a range.
forks.gtnumber · nullable- Strictly greater than this value.
forks.gtenumber · nullable- Greater than or equal to this value.
forks.ltnumber · nullable- Strictly less than this value.
forks.ltenumber · nullable- Less than or equal to this value.
sizeobject- Filter by repository size in KB. Provide any of gt / gte / lt / lte; combine a lower and upper bound for a range.
size.gtnumber · nullable- Strictly greater than this value.
size.gtenumber · nullable- Greater than or equal to this value.
size.ltnumber · nullable- Strictly less than this value.
size.ltenumber · nullable- Less than or equal to this value.
createdobject- Filter by creation date. Provide any of gt / gte / lt / lte as YYYY-MM-DD dates; combine a lower and upper bound for a range.
created.gtstring · nullable- Strictly after this date (YYYY-MM-DD).
created.gtestring · nullable- On or after this date (YYYY-MM-DD).
created.ltstring · nullable- Strictly before this date (YYYY-MM-DD).
created.ltestring · nullable- On or before this date (YYYY-MM-DD).
pushedobject- Filter by date of last push. Provide any of gt / gte / lt / lte as YYYY-MM-DD dates; combine a lower and upper bound for a range.
pushed.gtstring · nullable- Strictly after this date (YYYY-MM-DD).
pushed.gtestring · nullable- On or after this date (YYYY-MM-DD).
pushed.ltstring · nullable- Strictly before this date (YYYY-MM-DD).
pushed.ltestring · nullable- On or before this date (YYYY-MM-DD).
topicsstring[]- Require each of these topics. Maps to `topic:`.
licensestring- SPDX license key, e.g. "mit". Maps to `license:`.
archivedboolean- Filter by archived state. Maps to `archived:`.
visibilityenum- Repository visibility. Maps to `is:public` / `is:private`.
- public | private
forkenum · default exclude- Whether to include forks: "exclude" (default), "include" (`fork:true`), or "only" (`fork:only`).
- exclude | include | only
sortenum · default best-match- Sort field. Defaults to relevance ("best-match").
- best-match | stars | forks | updated | help-wanted-issues
orderenum · default desc- Sort direction. Defaults to "desc".
- desc | asc
countinteger · 1–10 · default 10- Number of results to return (1–10). Defaults to 10.
cursorstring- The previous response's `nextCursor`, to fetch the next page. Omit it for the first page.
Example response
{ "timeMs": 1840, "creditsCost": 1, "data": { "nextCursor": "string", "query": "string", "totalCount": 0, "repositories": [ { "id": "string", "databaseId": 0, "name": "string", "nameWithOwner": "string", "owner": { "username": "string", "id": "string", "url": "string", "avatarUrl": "string" }, "description": "string", "url": "string", "homepageUrl": "string", "isPrivate": true, "isFork": true, "isArchived": true, "isTemplate": true, "primaryLanguage": { "name": "string", "color": "string" }, "stargazerCount": 0, "forkCount": 0, "watcherCount": 0, "openIssuesCount": 0, "diskUsage": 0, "license": { "key": "string", "name": "string", "spdxId": "string", "url": "string" }, "topics": [ "string" ], "createdAt": "string", "updatedAt": "string", "pushedAt": "string" } ] }}What can you build with the GitHub Repository Search API?
Discover libraries
Find the most-starred projects for a language and topic.
Track trending repos
Search for repositories created this month with fast-growing stars.
Survey an ecosystem
Count repositories by license or topic to see where a field is heading.
GitHub Repository Search API questions
How do I find the most starred GitHub repositories for a language?
Set language, for example TypeScript, and sort by stars. Add a keyword or topics to narrow it, and a stars range such as at least 1,000 to skip small projects.
Can I find new open-source projects that are growing fast?
Yes. Limit created to the last few months and sort by stars; the repositories at the top are new and already popular.
Do I need a GitHub token or GitHub’s search syntax?
No. Searches use your Bridgly API key only, and each filter is a plain JSON field rather than a qualifier you type into a query string.
How do I get more than 10 results from a GitHub repository search?
Each call returns up to 10 repositories and a nextCursor. Send it back as cursor to get the next page; it is null when there are no more.
How do I use the GitHub Repository Search API?
Send a POST request to https://api.bridgly.app/github/search-repositories with the filters you want in the JSON body and your API key in the Authorization header. In the TypeScript SDK, call client.github.searchRepositories(). AI agents connected to Bridgly over MCP can call the github_search_repositories tool.
How much does the GitHub Repository Search API cost?
Costs 1 credit per request. Credits cost $2.00 per 1,000 on pay-as-you-go and as low as $1.00 per 1,000 at volume. New accounts on a business email start with 100 free credits, and failed requests are never charged.
More GitHub endpoints
The same API key works on every endpoint. See all GitHub API endpoints.
- GitHub Code Search API→GitHub code search API: search code across public GitHub repositories by keyword, language, file name, extension and path, with file path and repository.
- GitHub Topic Search API→GitHub topics API: search GitHub topics by keyword, with filters for featured, curated and repository count. Each result has its name and description.
- GitHub Commit Search API→GitHub commit search API: search commits across public repositories by message, author, committer, date or SHA, with message, author and repository.
- GitHub Issue Search API→GitHub issues API: search issues by keyword, repo, state, labels, author, assignee, comment count and dates, with title, state, labels and timestamps.
Try the GitHub Repository Search API
100 free credits on business email, no card. Your first call takes a minute.