Not every source gives you an API. When the data you need only appears on a web page — a price, a listing, a table — you extract it straight from the page HTML. That is web scraping: fetch the HTML, then pick out the elements you want using CSS selectors.
API vs scraping
| Aspect | API (JSON) | Scraping (HTML) |
|---|---|---|
| Data format | Structured JSON, made for machines | HTML meant for humans; you extract the fields |
| Stability | A versioned contract; changes are announced | Breaks silently when the site markup changes |
| Access | Often needs a key / auth | Usually just fetch the public page |
| Your work | Parse JSON | Write and maintain selectors |
Rule of thumb: if an API exists, use it — it is more stable and more polite to the source. Scrape when there is no API, or the API does not expose what you can plainly see on the page.
The one trap that catches everyone
A plain HTTP fetch (n8n HTTP Request node, Power Query Web.Contents) only sees the raw HTML the server sent — before any JavaScript runs. Many modern sites render their content with JavaScript after load, so the data is visible in your browser but absent from the raw HTML. Confirm with the browser View Page Source (not Inspect): if the data is missing there too, you need a headless-browser tool, not a plain fetch.
Tip · Practice against a real, stable page we host: /samples/store — a product listing with clean class names. Learn the selectors first in the interactive Scraping Lab at /scraping, then extract from that page.