Skip to main content
zenrows fetch retrieves a single page and returns its HTML, Markdown, or plain text. It handles JavaScript rendering and anti-bot protection automatically, so most calls need no extra flags.

Examples

Start with the defaults. Only add --manual --js-render --premium-proxy after a run’s trace (zenrows trace explain <run-id>) shows it’s actually needed, each flag raises cost.

Flags

Retries

zenrows fetch and zenrows extract send each request once by default. Pass --retries <n> (CLI 1.13.0 or later) to retry up to n times after:
  1. A 429, 502, 503 or 504 from the API. None of these is charged.
  2. A failure to connect: a refused connection, a name that did not resolve, a connect timeout or an unreachable network. The request never reached the API.
The CLI never retries:
  1. Its own timeout (--timeout), or any other network error, such as a connection that closed after the request was sent. The API may still finish that request and charge it.
  2. Any status under --original-status, because the API then returns the target site’s own status.
  3. zenrows extract prepare and prepare status.
Before each retry, the CLI waits the API’s Retry-After in whole seconds, from 0.25 s to 30 s. Otherwise it waits a random time from 0.25 s up to 1 s before the first retry, 2 s before the second, and so on, capped at 30 s. A retry starts only if its wait ends within 90 s of the first request. A running request is not cut short, so a command can take longer than that. If a 502, 503 or 504 is still the answer after the retries, the error is FETCH_FAILED, for example “The Zenrows API answered HTTP 503 after 2 retries.”, and it tells you to wait a minute and run the same command again. A 429 keeps its usual error. An invalid value, such as --retries -1, is an INVALID_USAGE error.