{{API_BASE_URL}} · errors are { "error": { "code": "..." } } + an HTTP statusTwo models, same tenant data:
/api/*) — for agents / server-to-server. Send
Authorization: Bearer lb_at_.... Tokens are capability-scoped./app/*) — for the dashboard. Email/password via
/api/auth/* sets a cookie; /app/* mirrors the bearer routes.Capabilities: discover:write, run:write,
run:read, billing:write. A tenant token created via the
dashboard carries run + billing capabilities.
| Method + path | Session equivalent | Capability | Purpose |
|---|---|---|---|
| POST /api/runs | /app/runs | run:write | start a run {keyword, location, depth?} → {run_id} (202) |
| GET /api/runs/:id | /app/runs/:id | run:read | run status + counts (total / enriched / failed / dead_letters / credits_charged / note) |
| GET /api/runs/:id/results.csv | /app/runs/:id/results.csv | run:read | streamed CSV of the run's enriched businesses |
| GET /api/credits | /app/credits | run:read | credit balance + recent ledger |
| POST /api/checkout | /app/checkout | billing:write | start a Stripe checkout for a pack → {url} |
| POST /api/discover | — | discover:write | discover + persist only (no enrichment) |
1 credit per enriched business; a permanent failure is refunded. Buy from the
dashboard (/ → Buy credits):
| Pack | Credits | Price |
|---|---|---|
| starter | 10,000 | $50 |
| growth | 50,000 | $200 |
| scale | 200,000 | $600 |
64 columns: the core business fields, then Mobile Number,
Phone 1-5 (+ Type + Carrier), Email 1-5 (+ Status), and
Page 1-5 (URL / Title / Meta / Text). Exact order is in the skill file below.
Paste this into a coding agent (Claude Code / Codex / Cursor). The base URL is filled in for this deployment.
# Skip the Gatekeeper — local-business lead discovery & enrichment
Given a niche + city, Skip the Gatekeeper searches Google Maps and enriches each business with
owner name, verified emails, phone line type (mobile/landline/voip) + carrier, social
profiles, and crawled website pages, then returns a CSV.
Base URL: {{API_BASE_URL}}
## Auth
Ask the user for their Skip the Gatekeeper API token (starts with lb_at_). Send it on every call:
Authorization: Bearer lb_at_xxxxxxxx
Never print or log the token.
## Flow (async: start -> poll -> download)
1) Start a run (depth caps businesses, 1-700):
curl -s -X POST "{{API_BASE_URL}}/api/runs" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"keyword":"plumber","location":"Austin, Texas","depth":50}'
-> {"ok":true,"run_id":"01...","status":"queued"}
2) Poll until status is "done" (polling is free):
curl -s "{{API_BASE_URL}}/api/runs/RUN_ID" -H "Authorization: Bearer $API_TOKEN"
-> {"status":"running","total":50,"enriched":31,"failed":0,"credits_charged":31,...}
3) Download the CSV once done:
curl -s "{{API_BASE_URL}}/api/runs/RUN_ID/results.csv" \
-H "Authorization: Bearer $API_TOKEN" -o leads.csv
## Credits
1 credit per enriched business; permanent failures are refunded (net zero).
Check balance: GET {{API_BASE_URL}}/api/credits -> {"balance":1234,...}
If a run's note is "credit_capped", buy more credits from the dashboard.
## Notes
- depth (1-700) caps the run; start small (10-50), then scale. Each enriched business = 1 credit.
- Enrichment is async — poll the run, then fetch the CSV; don't expect results in the POST response.
- Errors: {"error":{"code":"..."}} with status 401 (bad token) / 403 (missing capability) / 422 (location) / 429 (rate limit).
Dashboard: /