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=autois the default way to fetch, and howresponse_type=markdownchanges the output.
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
Fetch the catalog page
Every Fetch request is aGET to https://api.zenrows.com/v1/ with two parameters: apikey and the url you want. Create tracker.py:
Python (Requests)
YOUR_ZENROWS_API_KEY with your key and run it:
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: addmode=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)
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. Passresponse_type=markdown and Zenrows returns the same page as clean markdown. Add these lines to the end of tracker.py:
Python (Requests)
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-Costand the concurrency headers to track spend and capacity. - Explain why
mode=autois 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.