# Kobo — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and browse millions of eBooks and audiobooks from Kobo, discover bestsellers and daily deals across different categories, and get detailed information about specific books and authors. Find free eBooks, explore category collections, and use autocomplete to quickly locate titles that interest you.

**Category:** Marketplaces | **Website:** [kobo.com/](https://kobo.com/) | **Docs:** [parse.bot/marketplace/a18bf61d-9eba-4b77-a08d-72ee5655bde9/kobo-com-api](https://parse.bot/marketplace/a18bf61d-9eba-4b77-a08d-72ee5655bde9/kobo-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/kobo/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Autocomplete

Get search suggestions for books, authors, and series based on a partial query string. Returns up to 30 suggestions grouped by type (author, title, series).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search query for autocomplete suggestions (e.g. 'harry', 'lord', 'python') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/kobo/autocomplete \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### Get bestselling ebooks

Retrieve the current list of best-selling eBooks from Kobo. Returns a single page of top sellers with title, author, price info, slug, and URL.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/kobo/get-bestselling-ebooks \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get book details

Retrieve full details for a specific book by its slug. Supports both eBooks and Audiobooks — tries ebook path first, then audiobook. The slug can be obtained from search results or category listings.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `book_slug` | string | Yes | Book slug identifier from search results or URLs (e.g. 'python-programming-11', 'the-night-we-met-17') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/kobo/get-book-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"book_slug":"<string>"}'
```

### Get books by category

Browse books within a specific category/genre. Category slugs can be obtained from the get_ebook_categories endpoint. Returns a single page of books in that category.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_slug` | string | Yes | Category slug from get_ebook_categories (e.g. 'fiction-literature', 'romance-2', 'sci-fi-fantasy', 'mystery-suspense', 'nonfiction', 'fiction-ya', 'kids-1', 'biography-memoir', 'business-finance', 'comics-graphic-novels') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/kobo/get-books-by-category \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"category_slug":"<string>"}'
```

### Get daily deals

Retrieve current daily deals and promotions on Kobo. Returns a single page of discounted titles.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/kobo/get-daily-deals \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get ebook categories

List all available eBook top-level categories and their slugs. Use the returned slugs with get_books_by_category to browse within a genre.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/kobo/get-ebook-categories \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get free ebooks

Retrieve the list of currently free eBooks available on Kobo. Returns a single page of free titles.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/kobo/get-free-ebooks \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Search books

Full-text search across Kobo's ebook and audiobook catalog. Returns paginated results with pricing, ratings, and metadata. Some broad queries may redirect to a category listing page, in which case results are parsed from that listing.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination |
| `query` | string | Yes | Search keyword (e.g. 'python programming', 'romance', 'harry potter') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/kobo/search-books \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.