Apify actors by saffo

Book Scraper for books.toscrape.com: Titles, Prices and Stock

Book titles, prices, stock and ratings from the category pages of books.toscrape.com, a public sandbox site made for scraping practice.

Run it on Apify Store

Version 0.6 · updated 2026-11-05 · from $0.004 per result, plus $0.04 per run

Sample output of Books Fixture

Book titles, prices, stock and ratings from the category pages of books.toscrape.com, a public sandbox site made for scraping practice.

What it does

Reads category pages of books.toscrape.com, follows their next-page links and saves one result per book: title, price, currency, stock state, star rating and the book's page URL. The data is read live at run time.

books.toscrape.com is a sandbox made for scraping practice, so this actor is a safe, cheap way to try pay-per-event scraping, or to test a data pipeline or an AI agent's tool call before you point it at a real catalogue.

Who it is for

How to use it

  1. Open the actor on Apify Store and go to its Input tab.
  2. Fill in startUrls; every other field has a default (see Input below).
  3. Click Start. The run ends at the limits below, or earlier at the "Maximum cost per run" you set.
  4. When the run ends, open the Output tab: view the results as a table, or export them as JSON, CSV or Excel.

Input

Field Type Default Description
startUrls array required Category pages of books.toscrape.com (the actor follows their next-page links).
maxItems integer 100 Stop after this many results. At most 1000 per run.

Example input:

{}

Output

Each result is one dataset item:

Field Type Description
url string Web address of the item: its own page, or the page it was read from.
title string Title of the item as shown on the page.
price number or null Price as a number, in currency; null when the page shows none.
currency string or null ISO 4217 currency code of price, for example USD.
inStock boolean True when the listing shows the book as in stock.
rating integer or null Star rating (1–5) shown on the listing; null when missing.
fetchedAt string When the page was read (ISO 8601, UTC).

Example output (real items from a test run):

[
  {
    "url": "https://books.toscrape.com/catalogue/sharp-objects_997/index.html",
    "title": "Sharp Objects",
    "price": 47.82,
    "currency": "GBP",
    "inStock": true,
    "rating": 4,
    "fetchedAt": "2026-11-04T21:53:08.784Z"
  },
  {
    "url": "https://books.toscrape.com/catalogue/in-a-dark-dark-wood_963/index.html",
    "title": "In a Dark, Dark Wood",
    "price": 19.63,
    "currency": "GBP",
    "inStock": true,
    "rating": 1,
    "fetchedAt": "2026-11-04T21:53:08.784Z"
  }
]

Download the dataset as JSON, CSV or Excel, or read it through the Apify API.

Pricing

Pay per event: a small fee per run plus a fee per result saved. Platform usage is included in these prices.

Event When it is charged Free plan Bronze plan Silver plan Gold plan Platinum plan Diamond plan
Run started (run-started) Flat fee once per run; covers starting the run. $0.0625 $0.05 $0.045 $0.04 $0.04 $0.04
Result (result-item) One result saved to the dataset. $0.0063 $0.005 $0.0045 $0.004 $0.004 $0.004

Example (lowest plan price): a run that saves 100 results costs $0.04 + 100 × $0.004 = $0.44. That is $4.00 per 1,000 results plus $0.04 per run. You pay only for results saved to the dataset; set "Maximum cost per run" in the run options and the actor stops there.

Limits

The site has 1,000 books in 50 categories; it reads listing pages only, not the book detail pages.

Use with AI agents

AI agents can call this actor as a tool through the Apify MCP server. Add it to an MCP client (Claude Desktop, Cursor, VS Code and others):

{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com/?tools=saffo/books-fixture"
    }
  }
}

Or call it over HTTP and get the results in the response:

curl -X POST "https://api.apify.com/v2/acts/saffo~books-fixture/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
  -d '{}'

FAQ

How much does it cost?

You pay per event: from $0.004 per result plus $0.04 per run. The Pricing section lists the price on every Apify plan. Platform usage is included, and the run stops at the maximum cost per run you set.

Can I use it from an AI agent or my own code?

Yes. Add it to any MCP client through the Apify MCP server, or call the Apify API; the examples under Use with AI agents show both. Results come back as JSON.

How many results can one run return?

Up to 1,000 results from at most 60 pages. For more, split the input over several runs.

Does it collect personal data?

No. It saves only the fields listed under Output and leaves out names, e-mail addresses, phone numbers and profiles of private persons.

Is this real shop data?

No. books.toscrape.com is a demo shop built for scraping practice: its prices and ratings were assigned at random and have no real meaning. Use the actor to try pay-per-event scraping or to test a pipeline, not for market research.

Why are the prices in pounds?

The sandbox lists every book in GBP. The actor saves the price as a number and the currency code next to it, so your code never parses a "£" sign.

Support

Open an issue on the actor's Issues tab.

Changelog

0.6 (2026-11-05)

0.5 (2026-11-05)

0.4 (2026-11-05)

0.1 (2026-11-04)