Skip to main content
Many pages ship an empty shell and fill it with JavaScript after load. Send them to Fetch with js_render=true and wait_for set to the element you need, and you get the HTML after the content has arrived. Uses: Fetch with js_render, wait_for, wait and block_resources

Ask your AI agent

With the Zenrows MCP server connected to Claude, Cursor or any MCP client, paste this prompt. Your agent picks the right Zenrows tools and settings on its own.

Render the page and wait for the content

The product grid on this page is filled by a background call after the page loads. js_render=true runs the page in a browser, and wait_for=.product-name holds the capture until the first product name is in the DOM. css_extractor then returns only the names and prices as JSON.
Drop css_extractor to get the full rendered HTML instead. From the CLI, the same render and wait print the rendered products as markdown. --wait-for runs in manual mode with --js-render:
CLI

Example output

Wait a fixed time instead

When there is no single element to wait for, for example a chart that animates in, add wait in milliseconds. Zenrows waits that long after the page loads before capturing it.
Python (Requests)
Output: 12 products. Prefer wait_for when you can name an element: it returns as soon as the element appears, while wait always spends the full time.

Block resources to render faster

Images, fonts and stylesheets rarely matter for data. block_resources skips them during the render, which makes the page load faster. Keep script, xhr and fetch unblocked when the content arrives through JavaScript.
Python (Requests)
Output: 12 products, the same data with fewer downloads.

Customize it

Troubleshooting

  • The response comes back but the data is empty: the capture happened before the content loaded. Add wait_for with a selector that appears once the content is in, like .product-name here.
  • 422 after adding wait_for: the selector never appeared. Open the page in your browser, inspect the element and copy a selector from the rendered DOM, not from the page source. See Wait for selector.
  • mode=auto returns the page before the late content loads: the page answered fast on its first try. Use js_render=true with wait_for for that page, so the capture waits for the content.
  • Part of the page is missing with block_resources: a blocked resource type carries the content. Remove xhr, fetch or script from the list.
  • wait or wait_for has no effect: both apply to rendered requests. Add js_render=true to the same request.

Click, fill, and scroll before you scrape

Load more items, scroll a feed or submit a search first.

Capture the network requests behind a page

Read the JSON behind the page instead of its HTML.

Scrape pages protected by anti-bot systems

Let Adaptive Stealth Mode pick the right configuration per page.

Capture screenshots, PDFs, and files

Save the rendered page as an image or a PDF.