waitFor gives a slow page more time, mobile reads the phone version, fastMode skips the browser, and blockAds controls what loads. The waitFor wait runs after the page loads and before any browser actions.
Make a request
Get an API key in the Quickstart. This page draws its quotes with JavaScript after it loads. The request waits 2 seconds and reads the phone version.Read the response
The quotes are in the Markdown, so the page finished loading before it was read. This real response is cut after the first quote.Options
To wait for an element instead of a fixed time, add a
wait action with a selector.
Choose between them
- Use
waitForwhen content appears a moment after the page loads. Start near 2,000 and raise it only if the page still comes back thin. - Use
fastModefor pages that are plain HTML. A page that needs a browser, or that refuses a plain request, comes back as an error instead of being tried again.fastModeis ignored when the call already needs a browser: withactions,screenshot,waitFor,mobile,profile,networkorbranding. - Use
blockAds: falseonly when you need the ads or trackers to load, for example to read what an ad slot shows.
Limits and errors
waitForabove 60,000 returns400 invalidRequest.waitForwithout an API key returns401 apiKeyRequired.- Waits count toward
timeout. A page that needs a browser needs at least 5 seconds. See Timeouts and errors. - A read that waits, or runs in a browser, costs the same as any other page.
Price
$1 per 1,000 pages. Waiting,mobile, fastMode and blockAds add nothing.
Related
- Browser actions wait for an element, click and scroll.
- Screenshot takes a picture of the rendered page.
- Timeouts and errors sets how long a read may take.
- Scrape overview lists every format and option.