Why this matters
The DexPaprika REST API sits behind Cloudflare with caching enabled. The behavior is generally invisible if you are a server-side consumer making fresh requests, but a few headers change what your client should do when the origin is briefly unavailable, and the CORS story is incomplete enough to bite browser-side code. This page documents the headers you will see today.Cache-Control
Every successful GET returns aCache-Control header that looks like this:
The practical effect of
stale-if-error=600 is that a brief origin outage does not break your client. If the API is unreachable, your CDN (or a properly configured HTTP cache library) returns the last-good response with Age: <some_number> indicating staleness. The data is not real-time during the outage, but your application keeps working.
For agents and SDK consumers: most HTTP client libraries do not honor stale-if-error by default. If your application needs the resilience this directive promises, use a cache layer that implements it (e.g., a CDN in front of your service, or libraries like cachecontrol for Python, node-cache-control for Node.js).
For LLM tool calls: the MCP layer does not currently cache between calls, so stale-if-error does not protect MCP-driven flows. The underlying REST cache still helps because Cloudflare serves the stale copy upstream of the MCP.
Cf-Cache-Status
A Cloudflare-specific header that tells you whether your request hit the CDN cache:HIT and the data looks old, the cache is doing its job and the response is up to max-age seconds out of date.
Age, Last-Modified
Age is the number of seconds since the cached response was generated. Last-Modified is the absolute timestamp of the underlying resource (when the API determined the snapshot).
Age is the most direct signal: the data is at most Age + max-age seconds old.
CORS
The DexPaprika REST API currently has limited CORS support. Server-side code works without any special handling. Browser-side code that calls the API directly will fail the preflight check. What the API returns today:Access-Control-Allow-OriginAccess-Control-Allow-MethodsAccess-Control-Allow-Headers
- Server-side proxy. Run a small worker (Cloudflare Workers, Vercel Edge, Deno Deploy) that fetches from
api.dexpaprika.comand re-serves with the right CORS headers to your frontend. - DexPaprika MCP. Connect through
mcp.dexpaprika.comfrom an agent runtime that handles the CORS layer for you. - Static export. If your data refreshes infrequently, fetch at build time and serve as static JSON.
X-Api-Plan
Every response carries the plan the request was evaluated against:keyless. A request authenticated with a key returns that key’s plan: free for a free API key, dev, pro or enterprise for a paid one. The same value is returned in the body of GET /usage, alongside credit counts when the request is authenticated on api-pro.dexpaprika.com. Use it to confirm a key is actually being applied: if you set an Authorization header and still see keyless, the key is not reaching the billing gate. Called on api-pro.dexpaprika.com with no Authorization header at all, that host answers 403 with an HTML block page rather than JSON; see upgrading to Pro.
X-Credits-* and RateLimit-*
Every response also reports where you stand against your allowances:x-credits-limit and x-credits-remaining are your credit allowance and what is left of it. x-credits-reset is 0 on keyless and free keys, which count over a rolling 30-day window with no reset moment; on Dev and Pro it holds the end of the billing period. The ratelimit-* trio follows the IETF draft (ratelimit-reset is seconds until the window rolls). For pacing, treat a 429 and its Retry-After as authoritative rather than the value of ratelimit-limit on a 200. The allowances themselves are on Rate limits.
h-hap
You will see this header on every response:Headers not present (today)
Some headers you might expect from a mature API are not currently emitted:Deprecation(RFC 9745) andSunset(RFC 8594): not set. When DexPaprika deprecates an endpoint or field in the future, these will appear with the relevant dates. Until then, deprecation status is documented in the API reference and in the changelog, not in headers.ETag/If-None-Match: not set. UseLast-Modifiedif you need to track resource freshness.
Quick reference
Cache-Control and cache-control. Some intermediaries normalize, others do not.
For error responses (4xx, 5xx), most cache-related headers are absent and cf-cache-status: DYNAMIC is set. The error envelopes themselves are documented in Error handling.