Catalog / Books to Scrape Catalog

Books to Scrape Catalog API

books.toscrape.com

A live, read-only interface to the public Books to Scrape demonstration catalog. Browse all source-published categories, paginate book cards, and retrieve complete book detail pages. The source supports category navigation and pagination only; its pages expose no search, price-range, or sort controls, so those filters are not invented here. Prices and ratings are explicitly demonstration data on the source.

  • shopping
  • books
  • catalog
  • web data
4 endpointsDocs updated

Endpoint health

Loading verification…

CategoriesLoading
BooksLoading

Connect your agent

Connect through MCP so your agent can find this API, read its docs, and call its endpoints.

Setup guide

Add the server from your terminal.

Claude Code · terminal
claude mcp add --transport http agent-data https://agent-data.motie.dev/mcp

In Claude Code, run /mcp, select agent-data, then Authenticate. Sign in to your agent-data account in the browser.

Then ask your agent to use the Books to Scrape Catalog API for your task.

Call it over HTTP

Get an API key

Sign up free, generate an API key, and set it as AGENT_DATA_API_KEY in your environment. Your first 100 calls each month are free.

Returns every category link in the source navigation. The returned slug is the exact value accepted by the `category` filter on GET /books and by GET /categories/{category}. The source navigation publishes category values but no search, price, or sort filter values.

View call pricing
cURL · Categories
curl --request GET --get 'https://3kpkg0jfvk.execute-api.us-east-2.amazonaws.com/prod/074697f3-3e06-4a34-92f6-535e343e3a7b/categories' \
  --header "Authorization: Bearer $AGENT_DATA_API_KEY"

Endpoints

Inputs and response fields for every endpoint in this API.

GETCategories/categories

Returns every category link in the source navigation. The returned slug is the exact value accepted by the `category` filter on GET /books and by GET /categories/{category}. The source navigation publishes category values but no search, price, or sort filter values.

Input

No input parameters.

Response

countinteger
itemsobject[]
items[].namestring
items[].slugstring
items[].books_pathstring
items[].source_urlstring
notes?string[]
source_urlstring

Fields marked ? are optional.

GETCategory detail/categories/{category}

Resolves a category slug returned by GET /categories, follows its source pagination, and returns the exact count computed from the final source page.

Input

categoryRequiredPath · string

Exact source category slug from GET /categories.

Example: poetry_23

Response

categoryobject
category.namestring
category.slugstring
category.books_pathstring
category.source_urlstring
page_sizeinteger
book_countinteger
page_countinteger
last_page_urlstring
first_page_urlstring
GETBooks/books

Returns one source catalog page of book cards. `page` is one-based and follows the source's numbered pages. `category` is optional and must be an exact slug from GET /categories. Category and pagination are the complete set of source-supported browsing controls observed; search, price filtering, and sorting are unavailable on the source. This operation does not fetch each book's detail page; use the returned source_identifier with GET /books/{book_id}.

Input

pageOptionalQuery · integer, min: 1, default: 1

One-based source page number.

Example: 1

categoryOptionalQuery · string | null

Optional exact source category slug returned by GET /categories.

Example: poetry_23

Response

itemsobject[]
items[].price?object
items[].price.amountnumber | null
items[].price.currencystring
items[].price.source_textstring
items[].titlestring
items[].rating?object
items[].rating.labelstring
items[].rating.value?integer | null
items[].category?object
items[].category.namestring
items[].category.slugstring
items[].category.books_pathstring
items[].category.source_urlstring
items[].source_urlstring
items[].availability?object
items[].availability.statusstring
items[].availability.quantity?integer | null
items[].availability.source_textstring
items[].cover_image_url?string | null
items[].source_identifierstring
paginationobject
pagination.pageinteger
pagination.category?string | null
pagination.next_page?integer | null
pagination.page_sizeinteger
pagination.page_countinteger
pagination.total_itemsinteger
pagination.previous_page?integer | null
pagination.returned_countinteger
source_urlstring

Fields marked ? are optional.

GETBook detail/books/{book_id}

Fetches one live source detail page. Pass `source_identifier` from GET /books unchanged; the response includes the breadcrumb/category, cover, description, rating, availability, all product-information table rows, source metadata, and the source's demonstration-data warning.

Input

book_idRequiredPath · string

Exact source_identifier returned by GET /books, not a URL.

Example: a-light-in-the-attic_1000

Response

price?object
price.amountnumber | null
price.currencystring
price.source_textstring
titlestring
rating?object
rating.labelstring
rating.value?integer | null
category?object
category.namestring
category.slugstring
category.books_pathstring
category.source_urlstring
source_urlstring
breadcrumbs?object[]
breadcrumbs[].namestring
breadcrumbs[].source_urlstring
demo_notice?string | null
description?string | null
availability?object
availability.statusstring
availability.quantity?integer | null
availability.source_textstring
review_count?integer | null
cover_image_url?string | null
source_metadata?object
source_identifierstring
product_informationobject
product_information.tax?object
product_information.tax.amountnumber | null
product_information.tax.currencystring
product_information.tax.source_textstring
product_information.upc?string | null
product_information.attributes?object
product_information.availability?object
product_information.availability.statusstring
product_information.availability.quantity?integer | null
product_information.availability.source_textstring
product_information.product_type?string | null
product_information.number_of_reviews?integer | null
product_information.price_excluding_tax?object
product_information.price_excluding_tax.amountnumber | null
product_information.price_excluding_tax.currencystring
product_information.price_excluding_tax.source_textstring
product_information.price_including_tax?object
product_information.price_including_tax.amountnumber | null
product_information.price_including_tax.currencystring
product_information.price_including_tax.source_textstring

Fields marked ? are optional.

Don’t see the endpoint you need?

Ask agent-data to add an endpoint or return more fields. Extensions are free and keep existing endpoints working.