Fetch a URL (POST)

Same as GET /v1/fetch but with a JSON request body.

POST
/v1/fetch

Authorization

AuthorizationRequiredBearer <token>

API key. Obtain from POST /v1/account/api-keys.

In: header

Request Body

application/jsonRequired
urlRequiredstring
Format: "uri"
formatstring
Value in: "markdown" | "html"
countrystring
Default: "US"Pattern: "^[A-Z]{2}$"
timeout_msinteger
Default: 60000Minimum: 1000Maximum: 60000
cache_ttlstring | integer

How long a freshly fetched URL may be served from cache. 0 disables caching. 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.

Default: "48h"
customobject

User-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.

Default: {}
markdownModestring

Markdown processing mode. Only used when format=markdown.

Value in: "article" | "raw" | "llm"
markdownQuerystring

BM25 query string for relevance-ranked filtering. Only used when format=markdown.

Maximum length: 200
markdownLinksstring

Link rendering style. Only used when format=markdown.

Value in: "inline" | "references" | "none"
markdownCompactboolean

Compact whitespace output. Only used when format=markdown.

markdownFilterImagesboolean

Filter low-signal images. Only used when format=markdown.

markdownIncludeMediaboolean

When true, formats.links and formats.images return ScrapeScoredLink[] / ScrapeScoredImage[] (rich objects) instead of string[], and a top-level tables array is included. Only used when format=markdown.

markdownIncludeWarningsboolean

When true, includes a top-level warnings array of ScrapeWarning objects. Only used when format=markdown.

markdownIncludeStatsboolean

When true, includes a top-level stats object with ScrapeStats (chars, tokens, blocks). Only used when format=markdown.

curl -X POST "https://api.bytekit.com/v1/fetch" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com"
  }'

Content from upstream.

"string"