Response headers
What every Dataloom response tells you beyond the body — cost, balance, latency, and your rate budget.
Every response from the Dataloom gateway carries headers that describe what the call cost and what you have left. They are part of the documented contract — read them instead of re-parsing balances out of response bodies.
Headers on every response
| Header | Example | Description |
|---|---|---|
X-Gateway-Service | website-insights | The service that served the request. |
X-Gateway-Credit-Cost | 1 | Credits charged for this call. 0 whenever the call was free — see billing for what costs nothing. |
X-Gateway-Remaining-Credits | 247 | Your credit balance as of this response. |
X-Gateway-Latency-Ms | 412 | End-to-end latency of the call, in milliseconds. |
X-RateLimit-Limit | 5 | Your key's requests-per-second limit — the authoritative number, also reflected in the message of any 429 (see rate limits). |
Responses also include Access-Control-Allow-Origin: *. That makes the
headers inspectable from any HTTP client — it does not make it safe to ship
your API key in browser code (see authentication).
Extra headers on rate-limit rejections
A 429 response carries three additional headers:
| Header | Example | Description |
|---|---|---|
Retry-After | 1 | Seconds to wait before retrying. Honor it instead of inventing your own backoff. |
X-RateLimit-Limit | 5 | Your per-second limit. |
X-RateLimit-Remaining | 0 | Always 0 on a rejection. |
Example
curl -i "https://api.dataloom.dev/website-insights/v2/all-insights?url=github.com" \
-H "Authorization: Bearer $DATALOOM_API_KEY"HTTP/1.1 200 OK
Content-Type: application/json
X-Gateway-Service: website-insights
X-Gateway-Credit-Cost: 1
X-Gateway-Remaining-Credits: 247
X-Gateway-Latency-Ms: 412
X-RateLimit-Limit: 5The machine-readable OpenAPI spec for every Dataloom API lives at
/openapi.json; the header contract above is summarized in
its top-level description.
Dataloom Docs