Developers
Public API
Agency and Internal plans. Authenticate with X-Api-Key (or Authorization: Bearer). Rate limit: ~90 requests / minute / account. All responses are JSON.
Auth
Mint a key under Billing → Public API key. The raw key is shown once. Prefix is stored for display.
curl -H "X-Api-Key: sc_…" \ https://serpcheck.trileafhosting.com/api/v1/domains # equivalent curl -H "Authorization: Bearer sc_…" \ https://serpcheck.trileafhosting.com/api/v1/domains
401 unauthorized · 403 plan/feature · 404 unknown domain · 429 rate limited.
Endpoints
GET /api/v1/domains
List domains on the API key’s account.
{
"account": "Acme",
"domains": [
{"id": "…", "hostname": "example.com", "name": "Example"}
]
}
GET /api/v1/domains/{id}/ranks
Latest keyword positions for one domain.
{
"hostname": "example.com",
"keywords": [
{"phrase": "cabin rentals", "position": 4, "delta": 2, "engine": "google", "url": "https://…"}
]
}
GET /api/v1/domains/{id}/movement
Recent gains and losses vs the prior check (digest payload).
GET /api/v1/domains/{id}/history
Recent rank checks (up to 500 rows / 90 days).
{
"hostname": "example.com",
"checks": [
{"phrase": "…", "engine": "google", "device": "desktop", "position": 4, "checked_at": "…"}
]
}
Tenant isolation
API keys are scoped to one account. Domain IDs from other tenants return 404. Postgres RLS also binds app.account_id on request.
Status
Public liveness: GET /health · dependency checks: GET /status (HTML or JSON via Accept).