# 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. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-kobo-com-api-a18bf61d/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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/parse-kobo-com-api-a18bf61d/autocomplete \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-kobo-com-api-a18bf61d/get_bestselling_ebooks \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-kobo-com-api-a18bf61d/get_book_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-kobo-com-api-a18bf61d/get_books_by_category \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-kobo-com-api-a18bf61d/get_daily_deals \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-kobo-com-api-a18bf61d/get_ebook_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-kobo-com-api-a18bf61d/get_free_ebooks \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-kobo-com-api-a18bf61d/search_books \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>"}'
```
