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.
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
Usescroll_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)
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)
Check which steps ran
Addjson_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)
html.
Customize it
Troubleshooting
- A step shows
"success": falsein the report: the selector did not match a visible element. Inspect the rendered page and copy the selector again, or add await_foron 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
waitafter each click, or usewait_forwith 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
waitafter 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.
Related recipes
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.