POST /v1/crawls, output_format, include_patterns)
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.Start a crawl and read every page
A crawl is a background job: start it, wait until it ends, then read its results and each page’s HTML.POST /v1/crawlswith the starturl, yourinclude_patternsand"output_format": "html". Keep thecrawl_id.- Poll
GET /v1/crawls/{crawl_id}untilstatusis no longerrunning. - Read the results, sending each response’s
next_cursorascursoruntil it isnull. - Download each page from its
content_url.
content_url. Each page Crawl opens is one Fetch request in Adaptive Stealth Mode, and max_pages sets how many it opens.
Example output
content_url:
Crawl with the SDKs
ZenRowsCrawlClient wraps the same calls. create starts the crawl, wait polls until it ends, results follows the cursor for you, and content downloads a page’s HTML.
maxPages, includePatterns) and returns fields in the API’s form (crawl_id, content_status). See the Python and Node.js SDK guides.
Crawl from the CLI
--output-format html stores each kept page, and --follow waits until the crawl ends. Then list the URLs, or save everything, HTML included, to one NDJSON file:
CLI
Output (content URLs shortened)
products.jsonl holds url, content_status and the page’s HTML in content. To read one page, run zenrows crawl content <crawl_id> <content_id>. See the CLI guide.
Customize it
Troubleshooting
- The crawl returns few URLs:
include_patternsalso decides which links Crawl opens. Add the paths of the listing or pagination pages that lead to your items, such as/page/or/category/. content_statusreadspending: the crawl is still fetching that page. Wait for the crawl to end, then read the results again from the start.stop_reasonismax_itemsormax_pages: the site holds more. Start a new crawl with higher values.429withtoo_many_crawls: your account’s Crawl and Batch jobs are all running. Wait theRetry-Afterseconds, then start the crawl.status: failedwithseed_unreachable: the start URL didn’t load. Open it in a browser to check it, then start again.
Related recipes
Map every URL on a website
Build a URL inventory and export it as CSV.
Scrape a list of URLs
Feed the URLs you found into one Batch job.
Build a RAG knowledge base from a website
Crawl a site and turn every page into markdown chunks.
Extract data with CSS selectors
Parse each crawled page with BeautifulSoup or Cheerio.