Fetch a URL (POST)
Same as GET /v1/fetch but with a JSON request body. **Limits:** request bodies are capped at 512 KB. An oversized body returns a `400` with error code `request_too_large`.
Authorization
AuthorizationRequiredBearer <token>API key. Manage keys from the dashboard at app.bytekit.com.
In: header
Request Body
application/jsonRequiredurlRequiredstring"uri"countrystring"US"Pattern: "^[A-Z]{2}$"timeout_msinteger60000Minimum: 1000Maximum: 60000cache_ttlstring | integerHow long a freshly fetched URL may be served from cache. 0 skips the cache read; cache-eligible fresh results are still written with the default 7-day TTL so later non-zero-TTL callers can HIT. Safety-classified WAF husks remain live-only and are not written. Accepts Nh (hours, up to 168h), Nd (days, up to 7d), or the integer 0. Examples: 0, 48h, 2d. Invalid values receive a 422 validation_error with an actionable message.
"48h"customobjectUser-supplied JSON payload, base64-encoded into the X-Fetch-Custom response header so callers can correlate the response back to caller-side state (job IDs, batch metadata, etc.). Capped at 4096 UTF-8 bytes after JSON serialization. Does NOT affect cache-key inputs — two requests differing only in custom share the same cache slot.
{}Content from upstream.
GET /v1/fetchFetch a URL (GET)
Direct HTTP fetch. Successful responses return the upstream response bytes verbatim; metadata is returned in X-Fetch-* headers. Non-2xx upstream responses use the `upstream_error` JSON envelope with the upstream HTTP status.
Fetch Bulk
Fetch Bulk API — endpoints, requests, and responses.