# Books to Scrape API

> Books to Scrape returns catalog listings, prices, and stock status as a workflow and API.

Books to Scrape returns the 20 products on the first catalog page, in page order, with no input required. Get first catalog products returns each product’s title, detail page link, displayed price, and stock status.

- Page: https://fous.com/tools/books-to-scrape
- Handle: `@books-to-scrape`
- Category: [Commerce](https://fous.com/tools/category/commerce)
- Source website: https://books.toscrape.com
- Last verified: Oct 7, 2026

## Methods

### Get first catalog products

Operation `get_first_catalog_products`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Get the 20 products shown on the first Books to Scrape catalog page, with each product’s page link, full title, displayed price, and stock status. Prices are synthetic.

**Input**

No input.

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `products` | array |  | The 20 products displayed on the first catalog page, in page order. |
| `products[].name` | string | `"A Light in the Attic"` | Complete product title from its catalog listing. |
| `products[].product_url` | string | `"https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"` | Absolute URL of the book’s detail page. |
| `products[].availability` | string | `"In stock"` | Displayed stock status without extra whitespace. |
| `products[].published_price` | string | `"£51.77"` | Price exactly as displayed, including currency symbol. |

**Example input**

```json
{}
```

**Example output**

```json
{
  "products": [
    {
      "name": "A Light in the Attic",
      "product_url": "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html",
      "availability": "In stock",
      "published_price": "£51.77"
    },
    {
      "name": "Tipping the Velvet",
      "product_url": "https://books.toscrape.com/catalogue/tipping-the-velvet_999/index.html",
      "availability": "In stock",
      "published_price": "£53.74"
    },
    {
      "name": "Soumission",
      "product_url": "https://books.toscrape.com/catalogue/soumission_998/index.html",
      "availability": "In stock",
      "published_price": "£50.10"
    }
  ]
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@books-to-scrape",
  "visibility": "public",
  "operation": "get_first_catalog_products",
  "version": 1,
  "input": {},
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

body = json.loads("{\n  \"api\": \"@books-to-scrape\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_first_catalog_products\",\n  \"version\": 1,\n  \"input\": {},\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=180) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_000),
  body: JSON.stringify({
  "api": "@books-to-scrape",
  "visibility": "public",
  "operation": "get_first_catalog_products",
  "version": 1,
  "input": {},
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/books-to-scrape`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `get_first_catalog_products`: Get first catalog products. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-books-to-scrape https://api.fous.com/mcp/tools/books-to-scrape --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## Use cases

- Review book titles and displayed prices
- Check displayed stock status for listed books
- Collect book detail page links
- Compare the first-page catalog listings

## FAQ

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this Books to Scrape tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. With pay as you go, a credit costs 1¢. Monthly plans cost less per credit.

### Do I need a Books to Scrape account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from books.toscrape.com when you run it. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified on Oct 7, 2026.

### What books appear on the first catalog page?

Get first catalog products returns the 20 listed products in page order, with their full titles.

### What price and stock status are displayed for each book?

Get first catalog products returns each displayed price and stock status. Prices are synthetic.

## Related

- [Shopify API](https://fous.com/tools/shopify.md): Shopify provides public products, prices, and availability from Shopify-powered stores, reflecting storefront information that may be restricted by some stores.
- [Open Library API](https://fous.com/tools/open-library.md): Open Library returns book search results, catalog details, and author works; availability reflects listed editions, not current loan availability, and catalog details may be missing.
- [Amazon API](https://fous.com/tools/amazon.md): Amazon returns publicly shown product listings, prices, details, ratings, reviews, current best sellers, and Today's Deals; availability and content vary by store, location, and access.
- [Google Books API](https://fous.com/tools/google-books.md): Google Books searches books and provides book details, reader ratings, and local ebook prices when available; newest results sort by publication date.
- [Goodreads API](https://fous.com/tools/goodreads.md): Goodreads returns public book searches, matched-book details with variable editions, popular or newest reviews, author books by popularity or date, and up to 100 quotes.
- [OverDrive API](https://fous.com/tools/overdrive.md): Find ebooks and audiobooks at public libraries.
- [Trader Joe's API](https://fous.com/tools/trader-joes.md): Trader Joe's groceries, beverages, flowers, plants, and other products.
- [Project Gutenberg API](https://fous.com/tools/project-gutenberg.md): Project Gutenberg offers free public-domain ebooks and reading materials, with searchable book details and plain text from the most-downloaded matching edition available.
- [All Commerce tools](https://fous.com/tools/category/commerce)
