Find every product page. Then read the fields you need.
To collect a store's catalog, list the product URLs first, then read the fields. A crawl job lists them free from the store's sitemap, or walks the category pages as HTML at 1 credit a page; the Scrape API's extract_rules then reads price and stock as JSON. One job reads up to 2,000 pages, so a large catalog is crawled one category path at a time.
{
"urls": [
"https://books.toscrape.com/catalogue/category/books/mystery_3/index.html"
],
"format": "html",
"page": {"js": false},
"scope": {
"include": ["/catalogue/category/books/mystery_3/**"],
"max_depth": 2,
"max_pages": 10
},
"max_credits": 10
}
→ 202 Accepted
{"job_id": "c_51ab…", "status": "pending"}{
"pages": [
{
"seq": 1,
"url": "https://books.toscrape.com/catalogue/category/books/mystery_3/index.html",
"depth": 0,
"state": "done",
"http_status": 200,
"credits": 1,
"title": "Mystery | Books to Scrape - Sandbox",
"links": [
"https://books.toscrape.com/index.html",
…
"https://books.toscrape.com/catalogue/sharp-objects_997/index.html",
"https://books.toscrape.com/catalogue/in-a-dark-dark-wood_963/index.html",
…
"https://books.toscrape.com/catalogue/category/books/mystery_3/page-2.html"
]
},
{"seq": 2, "url": "…/mystery_3/page-2.html", "depth": 1, "state": "done", …}
],
"next_after": 2,
"has_more": false
}Price the crawl before it starts.
A free quote gives the most a crawl can cost before it starts, and max_credits is a hard cap. Failed, blocked and robots-skipped pages are not billed, and every page has an honest state.
A free quote first
POST /crawl/quote takes the job body and starts nothing. For the 45 posts of our blog it answered 10 credits a page and a ceiling of 450 credits.
{
"estimate": true,
"credits_per_page": 10,
"max_pages": 45,
"credits_ceiling": 450,
"sitemap": {"in_scope_urls": 45}
}A cap that holds
max_credits counts each page once, so a cap equal to the quote's ceiling reads every page. Our 50-credit sample of the same blog stopped at its cap; the pages it never started cost nothing.
{
"stop_reason": "max_credits",
"credits_used": 50,
"max_credits": 50,
"errors": {"stopped": 40}
}An honest state for every page
done, blocked, not_found, timeout, robots, duplicate or stopped, with the reason. A site that refuses everything reads as blocked, never as an empty site.
{
"url": "https://books.toscrape.com/catalogue/the-page-that-moved_999/index.html",
"state": "failed",
"http_status": 404,
"error_class": "not_found",
"error": "Invalid status code from URL: 404"
}Output of our runs on ujeebu.com and books.toscrape.com (November 17, 2026), trimmed; credit figures follow the price list.
Why a catalog is hard to collect.
Reading one product page is easy. Finding all of them, at a cost you know in advance, is the hard part.
Product URLs hide behind category trees, filters and pagination. Without a sitemap, you have to walk the store to find them.
Every filter and sort order is a new address. Keep them out with exclude patterns, or the crawl reads the same products again and again.
A price tracker needs title, price and stock as JSON, not a pile of HTML. The extraction has to run on every product page.
A catalog crawl that runs away can eat a month of credits. You want the price before you start and a cap that holds.
Three ways to use a catalog crawl.
Feed a price tracker the whole catalog.
Discover the product URLs once a week and read price and stock every day. New products show up in the next discovery run, and products that left the category pages drop out of the list.
- discovery: category pages at 1 credit each
- fields: extract_rules, JSON per product
- two schedules, set apart
Map a store's assortment.
Count products per category, spot new lines and gaps. The category tree comes from the crawl's links, depth and discovered_from; the product fields from extract_rules.
- one include pattern per category path
- depth and discovered_from for the tree
- the title of every category page
Keep the HTML, parse it your way.
Add the product pattern to the include list and every product page comes back as HTML in the page records and the archive, at 1 credit a page. Run your own parser over it as often as you like while the results are kept.
- the HTML of every product page
- a tar.gz archive with a manifest
- a sha256 per page to spot changes
Size it, discover the URLs, read the fields.
The crawl finds the pages; extract_rules reads the fields. Version 1 of the crawl does not extract fields itself, so the two steps stay separate, and you can schedule them apart.
- 1
Size the catalog for free
If the store publishes sitemaps, ask for a quote in sitemap mode: it counts the in-scope product URLs without reading a page, for 0 credits. A sitemap job then lists them, up to 2,000 per job. The sandbox store has no sitemap, so this step uses an example store.
Requestcurl -X POST https://api.ujeebu.com/crawl/quote \ -H "ApiKey: $UJEEBU_KEY" -H "Content-Type: application/json" \ -d '{"urls": ["https://shop.example.com/"], "mode": "sitemap", "scope": {"include": ["/products/**"], "max_pages": 1000}}'Response{ "estimate": true, "mode": "sitemap", "credits_per_page": 0, "credits_ceiling": 0, "max_pages": 1000, "sitemap": { "in_scope_urls": 2380, "files_read": 3, "truncated": false, "would_list": 1000 } } - 2
No sitemap? Walk the category pages
Crawl only the category pages, as HTML without JavaScript (1 credit a page on the price list). The html format records every link on the page, so the product URLs come with the category pages you already read: 2 pages and 32 products for the Mystery category. One job reads up to 2,000 pages, so split a large store by category path, and keep filter and sort variants out with exclude patterns.
Scope for a store with filters"scope": { "include": ["/category/shoes/**"], "exclude": ["/category/**?sort=*", "/category/**?color=*"], "max_depth": 10 }Pythonimport re PRODUCT = re.compile( r"^https://books\.toscrape\.com/catalogue/(?!category/)[^/]+/index\.html$") products = set() for page in read_pages(job_id): # GET /crawl/{id}/pages, 50 at a time products.update(u for u in page.get("links", []) if PRODUCT.match(u)) print(len(products)) # 32 - 3
Read the fields with extract_rules
Send each product URL to the Scrape API with extract_rules: CSS selectors in, JSON out. It costs what the same Scrape call costs, 1 credit without JavaScript and 5 credits with it. Re-run this step alone for daily price checks.
RequestURL="https://books.toscrape.com/catalogue/sharp-objects_997/index.html" curl -G https://api.ujeebu.com/scrape \ -H "ApiKey: $UJEEBU_KEY" \ --data-urlencode "url=$URL" \ --data-urlencode 'extract_rules={ "title": {"selector": "h1", "type": "text"}, "price": {"selector": ".product_main .price_color", "type": "text"}, "stock": {"selector": ".product_main .availability", "type": "text"} }'Response{ "success": true, "result": { "title": "Sharp Objects", "price": "£47.82", "stock": "In stock (20 available)" } }
A store with 1,000 products, 20 to a category page.
Prices come from the price list: 1 credit per page as HTML without JavaScript, the same for a Scrape API call with extract_rules.
- With a sitemap, a sitemap listing gives the product URLs for free and the discovery row drops to 0.
- A daily price check repeats only the last row: 1,000 credits a day for this store. The Mystery category from the example above is 34 credits: 2 category pages and 32 products.
- A store that needs JavaScript rendering costs 5 credits a page in both steps, 5,250 credits for the same catalog. Premium and residential proxies cost more.
- Failed, blocked and robots-skipped pages are not billed. max_credits counts each page once, so a cap equal to the quote's ceiling reads every page.
Built for catalog discovery.
Sitemap listing, free
Lists a store's in-scope sitemap URLs with no page calls and no credits, up to 2,000 per job.
Include and exclude rules
* matches inside one path segment and ** across segments. Add ? to a pattern to match the query string, and keep filter and sort URLs out.
Every link on the page
The html format reads every link of a page, up to 300 per record with links_total, so the product links come with the category page.
extract_rules for fields
CSS selectors in, JSON out, on the Scrape API: text, links, images, attributes and tables, at the price of the page call.
Quote and hard cap
POST /crawl/quote prices the job first, and max_credits stops it before a page that would go past your cap.
Blocked means blocked
A refused page is labelled blocked and is not billed. The crawler honours robots.txt and never solves CAPTCHAs.
Questions people ask about crawling a catalog.
How do I scrape all products from a website?
Does the crawl extract prices and other product fields?
How do I crawl a catalog bigger than one job?
How do I keep filter and sort URLs out of a crawl?
What does a catalog crawl cost?
What happens when a store blocks the crawler?
Every product URL. Then every price.
Size the store for free, discover the products at 1 credit a page, and read the fields as JSON. Start with 5,000 free credits, no card.