Playground Sign in Start free
Use case · E-commerce catalog crawling

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.

Free: the site sizer and the quote · 5,000 free credits · no card
Request
POST /crawl
{
  "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"}
Page records
GET /crawl/{id}/pages
{
  "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
}
A crawl bill you can trust

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.

Quote
{
  "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.

Job status
{
  "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.

Page record
{
  "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.

The challenge

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.

Where are the products?

Product URLs hide behind category trees, filters and pagination. Without a sitemap, you have to walk the store to find them.

Filters multiply URLs

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.

Fields, not pages

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 cost you can predict

A catalog crawl that runs away can eat a month of credits. You want the price before you start and a cap that holds.

Where it fits

Three ways to use a catalog crawl.

Price monitoring

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.

What you run
  • discovery: category pages at 1 credit each
  • fields: extract_rules, JSON per product
  • two schedules, set apart
Assortment analysis

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.

What you run
  • one include pattern per category path
  • depth and discovered_from for the tree
  • the title of every category page
Your own parser

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.

What you run
  • the HTML of every product page
  • a tar.gz archive with a manifest
  • a sha256 per page to spot changes
How it works

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. 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.

    Request
    curl -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. 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
    }
    Python
    import 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. 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.

    Request
    URL="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)"
      }
    }
What it costs

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.

Quote
POST /crawl/quote, nothing is read
free
Discover the product URLs
50 category pages × 1 credit
50
Read the product fields
1,000 product pages × 1 credit, extract_rules
1,000
Full catalog
About $0.17 at the Starter rate (Starter: $49 a month for 300,000 credits)
1,050 credits
  • 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.
What you get

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.

FAQ

Questions people ask about crawling a catalog.

How do I scrape all products from a website?
In two steps. First list the product URLs: free from the store's sitemap with a sitemap job, or by crawling the category pages as HTML at 1 credit a page. Then read each product page with the Scrape API's extract_rules, which returns the fields you name as JSON.
Does the crawl extract prices and other product fields?
Not in version 1. A crawl finds and reads pages, as Markdown or HTML with their links; it does not apply an extraction schema. Read the fields with the Scrape API's extract_rules on each product URL, or parse the HTML the crawl returns with your own code.
How do I crawl a catalog bigger than one job?
One job reads up to 2,000 pages (max_pages). Split the catalog by category path, one job per path with an include pattern such as "/category/shoes/**", 2 jobs at a time per account, each under its own max_credits. Each next page of a category is one link deeper, up to 20.
How do I keep filter and sort URLs out of a crawl?
A pattern without ? ignores the query string, so a filter URL such as /category/shoes?color=red matches the same include as its category page. Add exclude patterns with ?, such as "/category/**?color=*" and "/category/**?sort=*", to keep those variants out.
What does a catalog crawl cost?
A category page costs 1 credit as HTML without JavaScript and 5 credits with it, and reading a product with extract_rules costs what the same Scrape API call costs. The sitemap listing and the quote are free, and failed, blocked and robots-skipped pages are not billed. A free quote gives the most a crawl can cost before it starts, and max_credits is a hard cap.
What happens when a store blocks the crawler?
Every page says why it has no content. A refused page is labelled blocked and is not billed, and a store that refuses every page reads as blocked, never as an empty catalog. The crawler honours robots.txt and never solves CAPTCHAs: a bot check is recorded as blocked.
Count a store's pages before you crawl it.
The free sizer lists a site's URLs and quotes the crawl. No card.
Size a site free

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.

Free site sizing · no credit card