# NextBooks for developers

NextBooks is a searchable catalogue of over a million books from the UCSD Goodreads book graph, with filters, a page for every book, an open API and an MCP server.

Call the same operations over plain HTTP, as MCP tools, or from a page through WebMCP. The base URL is `https://books.ferrite.run`.

## Quickstart

Read something first. This request needs no setup:

```sh
curl -s 'https://books.ferrite.run/api/v1/books'
```

Browse the catalogue or search it by title, 28 books a page in id order, with the website's filters. Use it to find book ids; with no arguments it returns the shelf the home page opens with. Returns each book's id, title and cover, plus next_cursor.

To use NextBooks from an AI assistant, add its MCP server:

```sh
claude mcp add --transport http next-books https://books.ferrite.run/mcp
```

## Authentication and API keys

No API key, account or sign-up is needed: the API is keyless, so the first request you send can be a real one.

## Sandbox

The public address is the sandbox. Every operation is a read of the same catalogue the website shows, no call can change anything, and nothing identifies the caller, so every request here is safe to try. Book `1007` is a good first record to ask for.

The [sandbox page](/sandbox) is the place to start.

## Endpoints

| Operation | Request | What it does |
| --- | --- | --- |
| `list_books` | `GET /api/v1/books` | Browse the catalogue or search it by title, 28 books a page in id order, with the website's filters. Use it to find book ids; with no arguments it returns the shelf the home page opens with. Returns each book's id, title and cover, plus next_cursor. |
| `count_books` | `GET /api/v1/books/count` | Count the books that match a title search and filters. Use it to learn how large a result is before paging through list_books, or to compare two filters. Returns the total. |
| `get_book` | `GET /api/v1/books/{id}` | Read one book's full record. Use it after list_books, or when you already have an id from a book page's address. Returns the title, authors, description, publisher, year, pages, language, ISBN, average rating and rating count; a detail the catalogue lacks is null. |
| `get_catalog` | `GET /api/v1/catalog` | Describe the catalogue being served. Use it to learn how many books and authors are held, or to notice that a new import has replaced the data. Returns the counts, the import's name and the checksums of its source files. |

The [OpenAPI 3.1 document](/openapi.json) describes every parameter and response. The MCP server at `https://books.ferrite.run/mcp` exposes the same operations as tools with the same names.

## Example requests

### `list_books`

```sh
curl -s 'https://books.ferrite.run/api/v1/books'
```

### `count_books`

```sh
curl -s 'https://books.ferrite.run/api/v1/books/count'
```

### `get_book`

```sh
curl -s 'https://books.ferrite.run/api/v1/books/1007'
```

### `get_catalog`

```sh
curl -s 'https://books.ferrite.run/api/v1/catalog'
```

## Conventions

- Rate limits: every response carries `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset`. A `429` also carries `Retry-After`, in seconds.
- Errors: refusals are RFC 9457 `application/problem+json` with a stable `type`, a `detail` written to be read, and a `hint` when there is a next step.
- Versioning: this is version 1.1.0. A change that would break a caller is announced with `Deprecation` and `Sunset` headers at least 90 days ahead.
- Markdown: add `.md` to a page path, or send `Accept: text/markdown`.

## Machine-readable descriptions

- [llms.txt](/llms.txt): orientation for agents
- [OpenAPI](/openapi.json): operations and schemas
- [Agent skills](/.well-known/agent-skills/index.json): installable instructions
- [Agentic Resource Discovery](/.well-known/ard.json): the catalogue of everything here
- [Pricing](/pricing.md)

Questions: see the [contact page](/contact).
