Dataloom Docs

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

HeaderExampleDescription
X-Gateway-Servicewebsite-insightsThe service that served the request.
X-Gateway-Credit-Cost1Credits charged for this call. 0 whenever the call was free — see billing for what costs nothing.
X-Gateway-Remaining-Credits247Your credit balance as of this response.
X-Gateway-Latency-Ms412End-to-end latency of the call, in milliseconds.
X-RateLimit-Limit5Your 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:

HeaderExampleDescription
Retry-After1Seconds to wait before retrying. Honor it instead of inventing your own backoff.
X-RateLimit-Limit5Your per-second limit.
X-RateLimit-Remaining0Always 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: 5

The machine-readable OpenAPI spec for every Dataloom API lives at /openapi.json; the header contract above is summarized in its top-level description.

On this page