GitHub Repositories API
List a GitHub user's public repositories, sorted by last push or another order. Each repository includes its description, primary language, star, fork and watcher counts and whether it is a fork or archived.
- Endpoint
- POST /github/list-repositories
- Price
- 1 credit per request
- SDK
- client.github.listRepositories()
- MCP tool
- github_list_repositories
curl -X POST "https://api.bridgly.app/github/list-repositories" \ -H "Authorization: Bearer $BRIDGLY_KEY" \ -H "Content-Type: application/json" \ -d '{ "username": "torvalds", "order": "stars", "count": 10}'import osimport requestsresponse = requests.post( "https://api.bridgly.app/github/list-repositories", headers={"Authorization": f"Bearer {os.environ['BRIDGLY_KEY']}"}, json={ "username": "torvalds", "order": "stars", "count": 10, },)data = response.json()const response = await fetch("https://api.bridgly.app/github/list-repositories", { method: "POST", headers: { Authorization: `Bearer ${process.env.BRIDGLY_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "username": "torvalds", "order": "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.listRepositories({ username: "torvalds", order: "stars", count: 10});if (res.type === "success") { console.log(res.data);}What does the GitHub Repositories API return?
GitHub repositories API: list any user’s public repos with description, language, stars, forks and watchers, sorted by last push, update, name or stars. Every response has the same envelope: the result in data, plus timeMs and the creditsCost of the call.
Request body
usernamestringrequired- GitHub username (login), or the profile link, e.g. "torvalds" or "https://github.com/torvalds".
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.
orderenum · default pushed- Sort order for the repositories. Defaults to "pushed".
- pushed | updated | created | name | stars
Example response
{ "timeMs": 1840, "creditsCost": 1, "data": { "nextCursor": "string", "username": "string", "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 Repositories API?
Portfolio pages
List a developer’s projects with stars and languages on their site.
Assess tech stacks
See which languages a person or organization works in most.
Find popular projects
Sort an owner’s repositories by stars to find their best-known work.
GitHub Repositories API questions
How do I list the public repositories of a GitHub user?
Send the username and an order: pushed, updated, created, name or stars. Each call returns up to 10 repositories; send the nextCursor from the response back as cursor for the rest.
How do I find a user’s most starred repositories?
Set order to stars. The first page then holds their most popular repositories, each with description, language and star, fork and watcher counts.
How do I get all of a user’s GitHub repositories?
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 Repositories API?
Send a POST request to https://api.bridgly.app/github/list-repositories with username in the JSON body and your API key in the Authorization header. In the TypeScript SDK, call client.github.listRepositories(). AI agents connected to Bridgly over MCP can call the github_list_repositories tool.
How much does the GitHub Repositories 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 Starred Repos API→GitHub stars API: list the repositories any GitHub user has starred, with each repo’s owner, description, primary language and star and fork counts.
- GitHub Projects API→GitHub projects API: list any user’s public GitHub Projects boards as JSON, with each project’s title, description, link, open or closed state and dates.
- GitHub User Search API→Find GitHub developers and organizations by location, language, followers and join date. Get bios and repository counts with the GitHub User Search API.
- GitHub Profile API→GitHub user API: get any GitHub profile by username as JSON, with name, bio, company, location, website, followers, repo count and pinned repositories.
Try the GitHub Repositories API
100 free credits on business email, no card. Your first call takes a minute.