How we detect a JS-required page
Two signals. First, we attempt a static fetch and look at the response. An almost-empty body (<div id="root"></div>, <div id="__next"></div>, near-zero text content, a script tag fetching main.js) is the obvious tell. Second, we look for known SPA framework markers (data-reactroot, ng-version, __NUXT__) and route those URLs through the headless path automatically. You can also force browser rendering with ?render=js.
Wait strategies
The hardest part of SPA scraping isn't rendering — it's knowing when rendering is "done". We support three strategies: networkidle (wait until network requests stop, default), selector (wait until a specific CSS selector appears in the DOM — pass ?wait_for=h1), and timeout (fixed delay in ms, last resort for poorly-instrumented apps). Most pages settle within 2–4 seconds.