GitHub
Search GitHub repositories, users and issues, and look up users and repositories by name, as typed JSON.
Search GitHub repositories, users and issues, and look up users and repositories by name, as typed JSON.
At a glance
Two GET endpoints under /v1/structured/github/. Each answers { endpoint, url, credits, duration_ms, data }. Each call is charged for the data it moves; a request we could not read is 502 TARGET_FAILED and costs nothing. Public data only, under GitHub's terms for its public API.
Endpoint | What | Typical (estimate) |
|---|---|---|
| Repositories, users or issues matching a query | about 2 million results per credit, up to 100 per call |
| Users and repositories by name | about 1 million per credit, up to 50 per call |
- cURL
- Python
- Node.js
curl -G "https://api.scrapelyserp.com/v1/structured/github/search" \
-H "Authorization: Bearer $SCRAPELY_API_KEY" \
-d type=repositories \
--data-urlencode "query=web scraper language:go" \
-d sort=starsimport os
import requests
HEADERS = {"Authorization": f"Bearer {os.environ['SCRAPELY_API_KEY']}"}
r = requests.get(
"https://api.scrapelyserp.com/v1/structured/github/search",
headers=HEADERS,
params={
"type": "repositories",
"query": "web scraper language:go",
"sort": "stars",
},
timeout=30,
)
r.raise_for_status()
data = r.json()
for r in data["data"]["results"]:
print(r["stars"], r["name"])const res = await fetch(`https://api.scrapelyserp.com/v1/structured/github/search?${new URLSearchParams({
type: 'repositories',
query: 'web scraper language:go',
sort: 'stars',
})}`, {
headers: { Authorization: `Bearer ${process.env.SCRAPELY_API_KEY}` },
signal: AbortSignal.timeout(30_000),
});
if (!res.ok) throw new Error((await res.json()).error.code);
const data = await res.json();
for (const r of data.data.results) console.log(r.stars, r.name);How much you can pull
GitHub limits how much one address may read, so requests are spread across many exits and the limit rarely shows. When an exit is used up, the request moves to another straight away (up to four tries, no waiting), and an exit that has run out is not used again until its allowance returns. Only if every try is throttled does a call fail: it is 502 TARGET_FAILED, uncharged, and can be sent again. In a lookup, a name we could not read is found: null, uncharged, and can be retried; the others are answered and charged as usual. A retry adds a second or two to a call.
A search reaches its first 1,000 results, however large total_results is (page × limit can be at most 1,000): narrow the query with qualifiers such as stars:>500, language:go or created:>2026-01-01. Code search is not offered.
Search
Parameter | Type | Default | Description |
|---|---|---|---|
|
|
| What to search for. |
| string | — | The search terms and qualifiers, e.g. |
| string | — | Repositories: |
|
|
| With |
| integer |
| Results per page, 1–100. |
| integer |
| Page number; |
A repository has name (owner/repo), url, description, language, stars, forks, open_issues, license, topics, archived, fork and dates. A user found by search has only id, login, url and type; look the login up for the profile. An issue has number, title, repository, state, is_pull_request, author, comments, reactions, labels, text (the first 500 characters) and dates. A query that matches nothing returns an empty list; one with invalid qualifiers is 404 NOT_FOUND on query, free.
Full reference → GET /v1/structured/github/search
Lookup
Parameter | Type | Default | Description |
|---|---|---|---|
| string | — | Logins and |
One entry per name, in the order sent, each with lookup (the name as sent), kind (user or repository) and found: true with the fields (a user's followers, following, public_repos, bio, location; a repository's as in search), false when it does not exist, or null when we could not read it (try again). A call where nothing could be read fails free.
Full reference → GET /v1/structured/github/lookup