Skip to main content
Some content appears only after a visitor acts: a “Load more” button, an infinite feed, a search box. Add js_instructions to a Fetch request and Zenrows performs those actions in the browser before it returns the page. Uses: Fetch with js_instructions, js_render and json_response

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.

Click a “Load more” button

js_instructions is a JSON array of steps that run in order. Here, two clicks on the button with waits in between load two extra pages of products. css_extractor returns only the product names.
The CLI runs js_instructions in mode=auto, which renders the page and bills it at the JavaScript rendering rate.

Example output

The page starts with 12 products, and each click adds 12 more:

Scroll an infinite feed

Use scroll_y with a pixel distance, followed by a wait so the next batch can load. Repeat the pair once per batch you need.
Python (Requests)
Output: 48 products loaded.

Fill and submit a search field

fill takes a selector and a value. Follow it with a click on the submit button and a wait so the results page loads. Zr-Final-Url tells you where the browser ended up.
Python (Requests)
Output:
When a form submits with a plain GET, like most search boxes, you can also request the results URL directly (/ecommerce/?s=hoodie) and skip the interaction.

Check which steps ran

Add json_response=true and the response becomes JSON with a js_instructions_report: one entry per step, with its success and duration. Use it whenever the result is missing something.
Python (Requests)
Output:
The page HTML is in the same JSON, under html.

Customize it

Troubleshooting

  • A step shows "success": false in the report: the selector did not match a visible element. Inspect the rendered page and copy the selector again, or add a wait_for on the element before acting on it.
  • The item count does not grow after a click: the new items had no time to load. Raise the wait after each click, or use wait_for with a selector of the first new item.
  • A step after a form submit reports failure: the page navigated while the step waited. Use a fixed wait after the submit click, then read the result.
  • The request takes long or times out on your side: long instruction lists add up. Set your HTTP client timeout to 180 seconds or more and keep waits as short as the page allows.

Scrape JavaScript-rendered pages

Render the page and wait for the element you need.

Capture screenshots, PDFs, and files

Capture the page after your interactions.

Scroll and paginate to collect every item

Drive long feeds step by step from a real browser.

Keep the same IP and submit forms

Post form data straight to the target.