Skip to main content
Most endpoints take a timeout that sets how long Stophy may work on your call. Your own client has a timeout too, for how long it waits for the answer. Set both, and keep your client’s longer.

Set a deadline

The timeout field is in milliseconds on the endpoints below, except where the table says seconds. A page that needs a browser needs at least 5 seconds. Some pages need 10 to 30 seconds the first time. Do not set a scrape timeout below 5,000 unless you want it to fail fast. This real call asked for a fresh read with a 1-second timeout. It could not finish, and it cost nothing.
Retry with a longer timeout, or wait retryAfterSeconds. See Troubleshooting.

Calls that answer at once

Crawl, batches and agent answer at once with an id. You read the result with their status calls, so your client never waits for the work. A browser task works the same way. Start it, then read it with POST /v1/browser/task/status. Browser work has its own bounds. Results are kept for 24 hours. That covers a scrape, which you can read again with GET /v1/scrape/{id}, and a crawl, a batch or an extract. After that the id answers notFound. See Zero data retention for the shorter time that option gives.

Set your client timeout

Keep your client’s timeout longer than the API deadline plus a few seconds. Most calls answer within 15 seconds. A slow page, a long PDF or a transcript can take up to a minute, and a scrape with the default timeout can take 60 seconds. Set your client timeout to at least 65 seconds, or raise it with the timeout you send. The SDKs wait 70 seconds for each attempt. The TypeScript SDK does not retry a timed-out attempt, because the first call may still be running. The Python SDK does retry it. Before you retry a call after a client timeout, check the first one in GET /v1/logs.