Skip to main content
This is the first of six lessons. Across the course you build one project, a product-catalog tracker for the ScrapingCourse e-commerce demo store, and each lesson adds one Zenrows primitive to it. What you’ll build: a Python script, tracker.py, that downloads the store’s catalog page through Fetch and prints it as HTML and as markdown. What you’ll learn:
  • How a Fetch request is shaped: one endpoint, your API key, the target URL, and parameters.
  • How to read what a request cost and how much concurrency you have left.
  • Why mode=auto is the default way to fetch, and how response_type=markdown changes the output.
Time: about 10 minutes. You need: Python 3.10 or later.

Set up your project

1

Get your API key

Sign up for a free Zenrows account and copy your API key from the dashboard. The free trial includes enough credits for the whole course.
2

Create a project folder

You’ll keep every file from the course in this folder.

Fetch the catalog page

Every Fetch request is a GET to https://api.zenrows.com/v1/ with two parameters: apikey and the url you want. Create tracker.py:
Python (Requests)
Replace YOUR_ZENROWS_API_KEY with your key and run it:
You should see output like this:
Zenrows fetched the page for you and returned the store’s own HTML, all 16 products of the first catalog page included.

Read the response headers

Every response carries headers that tell you what the request did: In Lesson 4, Batch uses that concurrency for you when you scrape many pages at once. The full list is in the Fetch API reference.

Turn on Adaptive Stealth Mode

The demo store answers any client. Real stores often sit behind anti-bot systems or render products with JavaScript, and those need a headless browser, premium proxies, or both. You don’t have to work out which: add mode=auto (Adaptive Stealth Mode) and Zenrows starts with the cheapest configuration that works for the site, escalates when the page needs more, and bills you for the configuration that succeeds. That makes mode=auto the right default for the tracker. Replace the contents of tracker.py with a small fetch() helper that sends it on every call:
Python (Requests)
Run it again. The store is easy to reach, so mode=auto settles on the basic configuration and the cost stays at 1 credit:
mode=auto manages js_render and premium_proxy for you, so leave those two out when you send it. When you want to pin the configuration yourself, drop mode=auto and set them directly, see Adaptive Stealth Mode vs manual configuration.

Get the page as markdown

HTML is great for a parser and noisy for a person or an LLM. Pass response_type=markdown and Zenrows returns the same page as clean markdown. Add these lines to the end of tracker.py:
Python (Requests)
Run the script. The catalog now reads like a document (trimmed):
The store has 188 products spread over 12 catalog pages. Collecting them is the job of the next three lessons.
Do the same from the CLI. With the Zenrows CLI installed (npm install -g @zenrows/cli), this prints the catalog as markdown. The CLI uses mode=auto by default:

Ask your AI agent

With the Zenrows MCP server connected to Claude, Cursor or any MCP client, paste this prompt. Your agent picks the right Zenrows tools and settings on its own.

What you built

tracker.py now has a reusable fetch() helper that sends every request with Adaptive Stealth Mode. You can:
  • Fetch any page with Fetch and read its HTML or markdown.
  • Read X-Request-Cost and the concurrency headers to track spend and capacity.
  • Explain why mode=auto is the default: it picks the configuration per site and bills the one that succeeds.

Next lesson

Lesson 2: Turn a product page into JSON

Skip HTML parsing: get product names, prices and links as JSON with Extract and CSS selectors.