# Bookshop.org — 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 for books by keyword or category, view detailed information like metadata and pricing, discover curated reading lists, and find independent bookstores near you on Bookshop.org. Filter results by format and browse new releases to discover your next read.

**Category:** E-commerce | **Website:** [bookshop.org/](https://bookshop.org/) | **Docs:** [parse.bot/marketplace/cc07f8e2-f776-4687-860b-e08e413757bb/bookshop-org-api](https://parse.bot/marketplace/cc07f8e2-f776-4687-860b-e08e413757bb/bookshop-org-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-bookshop-org-api-cc07f8e2/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_book_details

Retrieve full details for a specific book by its product page URL (obtained from search_books or get_books_by_category results). Returns title, author, price string, full description text, and structured metadata (publisher, pages, dimensions, language, etc.). Requires one page fetch per call.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | The book detail URL from search_books or get_books_by_category results (detail_url field). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bookshop-org-api-cc07f8e2/get_book_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### get_books_by_category

Browse books within a named category on Bookshop.org. Categories map internally to BISAC subject codes. Supports pagination via offset/limit. Returns book summaries with title, author, price, cover image, and detail URL. Prices are in cents (USD).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | Yes | Category slug. Verified values: fiction, nonfiction, romance, fantasy, mystery, sci-fi, ya, kids, popular-books, special-offers, ebooks, pre-order-offers. Other values are attempted as BISAC prefix lookups. |
| `limit` | integer | No | Max results to return per page. |
| `offset` | integer | No | Offset for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bookshop-org-api-cc07f8e2/get_books_by_category \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>","limit":"<integer>","offset":"<integer>"}'
```

### get_bookstore_listings

Find independent bookstore partners near a geographic location. Uses latitude/longitude coordinates and a search radius in miles. Returns store name, address, city, state, and contact information when available.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `lat` | number | No | Latitude of the search center. |
| `lng` | number | No | Longitude of the search center. |
| `radius` | integer | No | Search radius in miles. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bookshop-org-api-cc07f8e2/get_bookstore_listings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"lat":"<number>","lng":"<number>","radius":"<integer>"}'
```

### get_new_books

Retrieve the curated 'New Books' list from Bookshop.org. Returns recently published titles with their authors and detail URLs. The list is editorially curated and typically contains 10-20 books. No input parameters required.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bookshop-org-api-cc07f8e2/get_new_books \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_books

Full-text search over Bookshop.org's catalog by keyword (title, author, or ISBN). Supports pagination via offset/limit and optional format filtering. Returns book summaries including title, author, price, cover image, and detail URL. Prices are in cents (USD). The total is an estimate from the search engine and may exceed actual retrievable results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `format` | string | No | Filter by book format. |
| `limit` | integer | No | Max results to return per page. |
| `offset` | integer | No | Offset for pagination. |
| `query` | string | Yes | Search keyword (title, author, or ISBN). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bookshop-org-api-cc07f8e2/search_books \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"format":"<string>","limit":"<integer>","offset":"<integer>","query":"<string>"}'
```
