Authentication
Send your key as a Bearer token. Keys are prefixed so you can't mix them up: dj_test_ returns realistic sample data for free, dj_live_ hits production and spends credits.
curl https://api.dstaq.co/v1/companies/northwindlabs.io \
-H "Authorization: Bearer dj_test_4f9c…"Keep live keys on the server. Each key carries its own scopes, like companies:read or contacts:read, so a leaked key can only do what you allowed.
Endpoints
| Method | Path | Returns |
|---|---|---|
GET | /v1/companies/{domain|id} | One company. include expands datasets. |
GET | /v1/companies | Search companies by firmographic and tech filters. |
GET | /v1/companies/{id}/technologies | A company's tech stack with dates. |
GET | /v1/intent | Companies researching a topic. |
GET | /v1/intent/topics | Search the topic taxonomy. |
GET | /v1/contacts | Search people by company, seniority and department. |
POST | /v1/enrich | Enrich up to 100 domains or emails per call. |
POST | /graphql | Every object above, one query. |
GET | /v1/usage | Credits used this period, by endpoint. |
GraphQL
Ask for exactly the fields you need across datasets in one round trip. You're billed for the objects returned, same as REST.
query {
company(domain: "northwindlabs.io") {
name
employee_count
technologies(status: ACTIVE) { name first_seen_at }
intent(surge: true) { topic score }
contacts(seniority: [VP, DIRECTOR], email_status: VERIFIED) { full_name title email }
}
}Objects
Every object shares the same conventions: snake_case fields, ISO 8601 timestamps in UTC, ISO country codes, and a refreshed_at you can trust. Field-by-field schemas live on each dataset page:
Pagination
List endpoints return up to 100 objects and a next_cursor. Pass it back as cursor until it's null. Cursors are stable for 24 hours, so a long export won't skip or repeat records.
{
"object": "list",
"data": [ { "company_id": "dj_8f2a9c", "name": "Northwind Labs" } ],
"next_cursor": "c_2Hk9",
"has_more": true
}Errors
Errors always return the same shape, with a human message and a machine type. You're never charged for a request that errors.
| Status | error.type | What to do | Billed |
|---|---|---|---|
| 400 | invalid_request | Fix the parameter named in error.param. | No |
| 401 | unauthenticated | Check the key and the Bearer prefix. | No |
| 403 | forbidden | This key lacks the scope. Edit it in the dashboard. | No |
| 404 | not_found | No company or contact matched. | No |
| 402 | credits_exhausted | Free plan limit reached. Upgrade or wait for reset. | No |
| 429 | rate_limited | Wait Retry-After seconds. SDKs do this for you. | No |
| 5xx | api_error | Retry with backoff. We're paged automatically. | No |
{
"error": {
"type": "rate_limited",
"message": "Too many requests. Retry in 2 seconds.",
"retry_after": 2,
"request_id": "req_7Qm2…"
}
}Rate limits
Every response includes X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. The official SDKs read them and back off automatically.
| Plan | Requests / sec | Burst | Concurrent streams |
|---|---|---|---|
| Free | 2 | 10 | — |
| Developer | 10 | 50 | — |
| Pro | 50 | 250 | 2 |
| Scale | 200 | 1,000 | 10 |
| Enterprise | Custom | Custom | Custom |
Caching
Responses carry an ETag. Send it back as If-None-Match and get a 304 Not Modified when nothing changed. Cached and 304 responses within 24 hours cost zero credits.
Versioning
The version lives in the path (/v1). Additive changes, like a new field, ship without notice. Breaking changes ship in a new version, announced at least 12 months before the old one is retired.
FAQ
Yes. Both return the same objects, use the same keys and cost the same credits.
No. Any 4xx or 5xx response is free, including 404s for companies we don't have.
From 2 requests per second on Free to 200 on Scale, with bursts above that. Enterprise limits are custom.
Use a dj_test_ key. It returns realistic sample data with the exact production schema, free and unlimited.