GitLeads

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.

Request
curl https://api.gitleads.app/v1/leads \
  -H "Authorization: Bearer gl_live_xxxxxxxxxxxxxxxxxxxx"
Error response (invalid key)
{
  "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

PlanRequests / minLeads / month
Pro60500
Agency300Unlimited

Rate limit headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.

Endpoints

GET/leads

Returns a paginated list of captured leads, sorted by most recent first.

Query parameters
limitinteger20Results per page (max 100)
cursorstringPagination cursor from previous response
signal_typestringFilter: stargazer | keyword_issue | keyword_pr | keyword_code
repostringFilter by source repo slug (e.g. acme/sdk)
sinceISO 8601Only leads captured after this timestamp
Response
{
  "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
}
GET/leads/:id

Returns a single lead by ID with full enrichment data.

curl https://api.gitleads.app/v1/leads/lead_abc123 \
  -H "Authorization: Bearer gl_live_xxxx"
GET/tracked-repos

Returns all repositories currently being monitored.

{
  "data": [
    {
      "id": "repo_111",
      "full_name": "competitor/their-sdk",
      "type": "competitor",
      "created_at": "2026-04-10T08:00:00Z"
    }
  ]
}
POST/tracked-repos

Add a new repository to monitor. Returns the created tracking record.

Request body
{
  "full_name": "competitor/their-sdk",   // required — owner/repo format
  "type": "competitor"                   // "own" | "competitor" | "ecosystem"
}
DELETE/tracked-repos/:id

Removes a repository from tracking. Returns 204 No Content on success.

GET/tracked-keywords

Returns all keyword patterns currently being monitored across GitHub.

POST/tracked-keywords

Add 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 Statuserror fieldMeaning
400bad_requestMissing or invalid request body
401unauthorizedInvalid or missing API key
403forbiddenFeature not available on your plan
404not_foundResource does not exist
429rate_limitedToo many requests — check Retry-After header
500internal_errorServer error — contact support if persistent

Webhook Reference →

Real-time push events for new leads.

← Back to Docs

All documentation sections.