NEWStandard createTask and in.php APIs. Change the address and you are connected.View API docs
GATESOLVER

Web scraping

How do I tell if a page is static or dynamic?

Fetch the page without a browser and search the response for a value you can see on screen. If it is there, the page is static enough to parse; if not, scripts add it later.

The quick test

Pick a distinctive value from the page, such as a price, a product name or a review count. Download the page with curl or Python and search the raw text for that value. Found means the server sends the data in the HTML, and a simple parser will do. Not found means JavaScript rendering fills it in after load, and you need either the request that brings the data or a browser.

curl -s -A "Mozilla/5.0" https://store.example.com/p/aero-kettle | grep -c "Aero Kettle 1.7L"
# 0 means the name is not in the server HTML

Other ways to check

  • View source, not inspect. In the browser, "View page source" shows the HTML the server sent. The inspector shows the DOM after scripts ran. If they differ on your data, the page is dynamic.
  • Disable JavaScript. Turn off scripts in the browser settings or devtools and reload. Whatever disappears was added by scripts.
  • Watch the network panel. Filter by Fetch/XHR and reload. JSON responses that contain your data reveal the endpoint you can call directly.
  • Look for app shells. A body with one empty div id="root" and large script bundles means a client side app.

The middle ground: data in a script tag

Many modern sites are rendered on the server and then "hydrated" in the browser. The visible HTML may be complete, and the same data also sits in a JSON block such as __NEXT_DATA__ or window.__INITIAL_STATE__. These pages are static for scraping purposes, and the JSON block is often the easiest thing to parse. Search the raw HTML for your value; if it shows up inside a script tag rather than in the markup, read that JSON.

What each result means for your scraper

FindingApproach
Data in HTML markupHTTP client plus a parser such as Beautiful Soup or Cheerio
Data in an embedded JSON blockHTTP client, then parse the JSON
Data from a JSON API callCall the API directly with the right headers
Data built by scripts with signed requestsA browser through Playwright, Puppeteer or Selenium

The page on dynamic scraping and the guide to JavaScript heavy sites go deeper into the last two rows.

A trap: blocked responses look empty too

If your raw fetch is missing the data, check that you received the real page. Anti-bot systems often answer scripted clients with a challenge page, a consent wall or a "please enable JavaScript" stub, which also lacks your data. Print the <title> and status code. A Cloudflare "Just a moment" title or a 403 means you hit a check, not a dynamic page. In that case solving the challenge, for example with a Cloudflare Challenge task that returns a clearance cookie, gives you the static HTML after all.

Why the answer matters

Static scraping is cheaper by a wide margin. An HTTP request needs a few kilobytes of memory and returns in a fraction of a second; a browser tab needs hundreds of megabytes and several seconds. Treating a static page as dynamic wastes resources, and treating a dynamic page as static produces empty results. Run the check once per site and note the outcome in your scraper's config so the team does not repeat the investigation.

Pages that are both

Often the main content is static while extras, such as reviews, stock levels or prices per region, load later from separate endpoints. Scrape the static part with an HTTP client and call the extra endpoints directly for the rest. That hybrid keeps most of the speed of static scraping while still getting the dynamic fields.

Common questions

Does view source show the dynamic content?

No. View source shows the server HTML; the inspector shows the DOM after scripts changed it.

Is a single page app always dynamic for scrapers?

Usually, unless it is server rendered or embeds its data in a JSON script block.

Can I scrape a dynamic page without a browser?

Often yes, by calling the JSON endpoints the page uses, which you can find in the network panel.

Why is my data missing even though the page is static?

You may have received a block or challenge page instead. Check the title and status code of the response.

Is Selenium needed for every dynamic site?

No. A browser is a fallback for sites whose data requests cannot be reproduced with plain HTTP.

Keep reading