Answers you can trust, from Codeables
Every page on Codeables is structured and verified — built so people and the AI agents they rely on can trust it. Explore more from the source behind this answer.
Explore CodeablesWhich browser automation tools can return structured JSON from dynamic pages (JS render + infinite scroll)?
Quick Answer: The best overall choice for turning dynamic, JavaScript-heavy pages into structured JSON is MultiOn’s Agent API + Retrieve. If your priority is a familiar test-automation stack with code-first control, Playwright is often a stronger fit. For a hosted, “no-infra” option with basic JSON extraction, consider Browserless + headless Chrome.
At-a-Glance Comparison
| Rank | Option | Best For | Primary Strength | Watch Out For |
|---|---|---|---|---|
| 1 | MultiOn Agent API + Retrieve | Production apps that need JS render + infinite scroll + JSON arrays out | Native “intent in, JSON out” flow with render/scroll controls | Less low-level DOM scripting than Playwright/Selenium |
| 2 | Playwright | Teams already invested in code-driven browser automation | Full control over DOM, scroll, and custom extraction | You own infra, anti-bot strategy, and brittle selectors |
| 3 | Browserless + headless Chrome | Hosted headless Chrome with simple JSON extraction | Offloads running Chrome at scale | Still need to script actions and extraction logic yourself |
Comparison Criteria
We evaluated each option against the needs behind the slug “which-browser-automation-tools-can-return-structured-json-from-dynamic-pages-js-”:
- Dynamic rendering support: Can it reliably render JS-heavy pages (React, Vue, Next.js) the way a real user’s browser does, including login flows and client-side navigation?
- Infinite scroll + pagination control: Can it keep scrolling or paginating until it gathers enough data, and expose parameters to cap work (e.g., max items, scroll depth)?
- Structured JSON output with minimal glue code: Can it return normalized JSON (ideally arrays of objects) without you building and maintaining a huge layer of brittle selectors and parsing logic?
Detailed Breakdown
1. MultiOn Agent API + Retrieve (Best overall for production JSON from dynamic pages)
MultiOn Agent API + Retrieve ranks as the top choice because it’s built around a simple pattern: send intent (cmd + url), let an AI agent operate a real browser session (with JS rendered and scroll actions), then use Retrieve to return structured JSON arrays of objects—without hand-writing selectors for every layout quirk.
What it does well:
-
Dynamic JS render with remote sessions:
You call:POST https://api.multion.ai/v1/web/browse X_MULTION_API_KEY: YOUR_KEY Content-Type: application/json{ "url": "https://www2.hm.com/en_us/men/products/jeans.html", "cmd": "Open the page and scroll until you’ve loaded enough products." }Under the hood, MultiOn runs a real browser in a secure remote session, not a lightweight HTML fetch. That means client-side rendering, login redirects, and dynamic content behave like a user session, not like a crawler.
-
Retrieve → JSON arrays of objects (with scroll controls):
Once content is loaded, you call the Retrieve surface to convert that rendered page into structured data. The API is explicitly designed to emit JSON arrays of objects, not just raw HTML:renderJs: ensure JS is executed before extraction.scrollToBottom: let the agent keep scrolling to trigger lazy-load / infinite scroll.maxItems: hard-cap how many objects you want back.
You can build flows like:
POST /v1/web/browsewithcmd= “Open H&M men’s jeans and scroll enough to see ~100 products.”session_idreturned.POST /v1/web/retrievewith thatsession_idand a schema-style request like “Return a JSON array of objects with fields: name, price, colors, productUrl, imageUrl. maxItems: 100.”
Output is a structured JSON array that you can persist directly:
[ { "name": "Slim Jeans", "price": 49.99, "colors": ["Dark blue", "Black"], "productUrl": "https://www2.hm.com/...", "imageUrl": "https://image.hm.com/..." }, ... ] -
Sessions + Step mode for multi-step flows:
For complex dynamic pages (think Amazon multi-step checkout or login-gated wishlists), MultiOn usessession_idand Step mode:- First call:
POST /v1/web/browsewithcmdlike “Sign in, go to my saved items, open the Lululemon wishlist.” - You get back a
session_id. - Next call: reuse that
session_idto continue—“Scroll until all wishlist items are visible, then retrieve them as JSON.”
Session continuity is the real unit of reliability here. You don’t need to re-login or maintain your own cookie jar across nodes.
- First call:
Tradeoffs & Limitations:
- Less “selector tinkering,” more intent-based:
If you’re used to Playwright/Selenium where you own every selector and CSS query, MultiOn feels higher level. You describe what you want, then use Retrieve to shape the JSON. You get fewer hard-coded selectors to maintain, but also less low-level micromanagement.
Decision Trigger:
Choose MultiOn Agent API + Retrieve if you want JS-rendered, infinite-scrolled pages turned into JSON arrays of objects with minimal custom scraping logic, and you want to rely on secure remote sessions, native proxy handling, and session_id continuity instead of owning your own Chrome farm.
2. Playwright (Best for code-first control with existing automation stacks)
Playwright is the strongest fit here because it gives you full scripting control over JS rendering, infinite scroll, and element extraction, which is ideal if you already run test suites or automation via Playwright and you’re comfortable owning infra and selectors.
What it does well:
-
Full control over dynamic UIs and scroll:
Playwright runs a real browser (or headless). You can:- Wait for specific network calls to finish.
- Emulate devices and viewports.
- Implement infinite scroll by repeatedly calling
page.evaluate(() => window.scrollTo(...))in a loop until no new items appear.
You can then use
page.$$eval()with CSS selectors to pull fields into a JSON shape:const items = await page.$$eval('.product-item', nodes => nodes.map(node => ({ name: node.querySelector('.product-name')?.textContent?.trim(), price: node.querySelector('.product-price')?.textContent?.trim(), url: node.querySelector('a')?.href })) ); -
Custom JSON extraction logic:
Because you’re writing the code, you can normalize any structure into exactly the JSON schema you want. That’s powerful if every site you touch has different quirks and you want deterministic transformations.
Tradeoffs & Limitations:
-
You own the “browser farm” and brittleness:
From painful experience: with Playwright, your team is responsible for:- Standing up and scaling Playwright workers.
- Handling IP rotation, native proxies, and “tricky bot protection.”
- Maintaining selectors as UIs ship new versions.
- Session continuity: you manage cookies/storage across tasks.
You’ll get structured JSON from dynamic pages, but only by continuously maintaining the scripts. For a handful of flows this is fine; at scale it becomes a platform project.
Decision Trigger:
Choose Playwright if you want maximal control over DOM interactions and you’re okay building/maintaining the infra and selectors that turn dynamic pages into JSON—especially if you already have a Playwright stack and your main ask is “add serialization to JSON.”
3. Browserless + headless Chrome (Best for hosted headless Chrome + basic JSON)
Browserless + headless Chrome stands out for this scenario because it gives you a hosted Chrome instance you can drive with code (Puppeteer/Playwright or HTTP), offloading the work of running browsers at scale while still allowing you to script scroll and extraction into JSON.
What it does well:
-
Hosted dynamic rendering environment:
Browserless runs Chrome for you. You send it scripts (often via Puppeteer or direct APIs), and it:- Renders JS-heavy pages.
- Supports navigation, wait conditions, and screenshots.
- Can execute your infinite-scroll logic.
-
JSON output via your own script:
Similar to Playwright, you inject JavaScript into the page context to map DOM elements into JSON. Browserless doesn’t prescribe your format; you produce JSON by returning objects from the page context.For example:
const products = await page.evaluate(() => { const cards = document.querySelectorAll('.product-card'); return Array.from(cards).map(card => ({ title: card.querySelector('.title')?.textContent?.trim(), price: card.querySelector('.price')?.textContent?.trim() })); });
Tradeoffs & Limitations:
-
You still write and maintain scraping logic:
Browserless gives you the infrastructure, not the “intent → JSON arrays of objects” layer. You still need to:- Script scroll behavior.
- Maintain selectors.
- Normalize JSON per site.
That’s a better fit if you’re constrained by ops (don’t want to run Chrome yourself) but still willing to own scraping code.
Decision Trigger:
Choose Browserless + headless Chrome if you want hosted Chrome for JS-rendered pages and are comfortable writing custom scripts to handle infinite scroll and transform pages into JSON, but don’t want to operate the browser infrastructure yourself.
Final Verdict
If you’re asking which browser automation tools can return structured JSON from dynamic pages (JS render + infinite scroll), you’re really deciding how much of the stack you want to own:
- Use MultiOn Agent API + Retrieve when you want intent in, actions executed in a real browser, and structured JSON arrays of objects out, with
renderJs,scrollToBottom, andmaxItemsas first-class controls andsession_idfor continuity through logins and multi-step flows. - Use Playwright when you need low-level browser control and already have the engineering muscle to maintain scripts, selectors, and infrastructure; JSON is something you add around that.
- Use Browserless + headless Chrome if your core pain is running Chrome at scale, and you’re fine scripting the rest—rendering, scrolling, and conversion to JSON—yourself.
For teams building production apps where browser automation is a feature, not the whole job, pushing the heavy lifting into a platform like MultiOn usually wins on reliability and speed-to-ship.