Many modern websites — single-page apps, React or Vue frontends, lazy-loaded content — do not include their data in the initial HTML. The content is only visible after JavaScript runs in the browser.Documentation Index
Fetch the complete documentation index at: https://docs.scrapegraphai.com/llms.txt
Use this file to discover all available pages before exploring further.
How ScrapeGraphAI handles JS pages
ScrapeGraphAI can render JavaScript with a headless browser before extracting content. Enable it withFetchConfig(mode="js") — the default auto mode will also pick the browser when needed.
Use wait for delayed content
If the content loads after a short delay (lazy loading, carousels, infinite scroll), add a wait time (ms) before extraction starts:
Tips for specific scenarios
Infinite scroll / lazy loading
Use thescrolls option in FetchConfig to scroll the page a given number of times before extracting, triggering lazy-loaded items:
crawl.start to follow paginated links automatically.
Login-gated content
If the data requires authentication, pass the required cookies or session tokens viaFetchConfig:
Single Page Applications (SPAs)
SPAs render content client-side after the initial load. Increasingwait usually resolves extraction issues. If not, check whether the data is available through the site’s own API (Network tab in DevTools) — that may be easier to call directly.
Verifying the rendered HTML
To debug, callsgai.scrape() with HtmlFormatConfig (Python) or { type: "html" } (JS) to see the exact HTML delivered after rendering, then compare to the raw HTML.