API Reference
REST API
Programmatic access to your GitLeads data. Pull leads, manage tracked repositories and keywords, and build custom integrations. Available on Pro plan and above.
Authentication
All API requests must include your API key in the Authorization header as a Bearer token.
Find your API key at Dashboard → Settings → API Keys. Keys are scoped to your account and inherit your plan's rate limits.
curl https://api.gitleads.app/v1/leads \ -H "Authorization: Bearer gl_live_xxxxxxxxxxxxxxxxxxxx"
{
"error": "unauthorized",
"message": "Invalid or missing API key"
}Base URL
https://api.gitleads.app/v1
All responses are JSON. All timestamps are ISO 8601 UTC.
Rate Limits
| Plan | Requests / min | Leads / month |
|---|---|---|
| Pro | 60 | 500 |
| Agency | 300 | Unlimited |
Rate limit headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.
Endpoints
/leadsReturns a paginated list of captured leads, sorted by most recent first.
| limit | integer | 20 | Results per page (max 100) |
| cursor | string | — | Pagination cursor from previous response |
| signal_type | string | — | Filter: stargazer | keyword_issue | keyword_pr | keyword_code |
| repo | string | — | Filter by source repo slug (e.g. acme/sdk) |
| since | ISO 8601 | — | Only leads captured after this timestamp |
{
"data": [
{
"id": "lead_abc123",
"signal_type": "stargazer",
"signal_source": "acme-corp/rival-sdk",
"github_username": "jdoe",
"name": "Jane Doe",
"email": "jane@example.com",
"bio": "Staff engineer @ Vercel",
"company": "Vercel",
"location": "San Francisco, CA",
"followers": 1842,
"top_languages": ["TypeScript", "Rust", "Go"],
"captured_at": "2026-04-24T10:31:00Z"
}
],
"next_cursor": "cursor_xyz789",
"has_more": true
}/leads/:idReturns a single lead by ID with full enrichment data.
curl https://api.gitleads.app/v1/leads/lead_abc123 \ -H "Authorization: Bearer gl_live_xxxx"
/tracked-reposReturns all repositories currently being monitored.
{
"data": [
{
"id": "repo_111",
"full_name": "competitor/their-sdk",
"type": "competitor",
"created_at": "2026-04-10T08:00:00Z"
}
]
}/tracked-reposAdd a new repository to monitor. Returns the created tracking record.
{
"full_name": "competitor/their-sdk", // required — owner/repo format
"type": "competitor" // "own" | "competitor" | "ecosystem"
}/tracked-repos/:idRemoves a repository from tracking. Returns 204 No Content on success.
/tracked-keywordsReturns all keyword patterns currently being monitored across GitHub.
/tracked-keywordsAdd a new keyword monitor.
{
"keyword": "looking for a stargazer tracker",
"scan_targets": ["issues", "prs", "discussions", "code"]
// scan_targets defaults to ["issues", "prs", "discussions"] if omitted
}Error Codes
| HTTP Status | error field | Meaning |
|---|---|---|
| 400 | bad_request | Missing or invalid request body |
| 401 | unauthorized | Invalid or missing API key |
| 403 | forbidden | Feature not available on your plan |
| 404 | not_found | Resource does not exist |
| 429 | rate_limited | Too many requests — check Retry-After header |
| 500 | internal_error | Server error — contact support if persistent |