# Booksamillion — 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.

> Access Books-A-Million's catalog to retrieve bestseller lists across fiction, nonfiction, manga, YA, and kids' categories, fetch detailed book information and customer reviews, search books by keyword, and look up nearby store locations. Returns structured data including titles, authors, pricing, availability, cover images, and paginated review content.

**Category:** E-commerce | **Website:** [booksamillion.com/](https://booksamillion.com/) | **Docs:** [parse.bot/marketplace/b739c7a3-91c8-400a-82ce-0f4e135f8a6b/booksamillion-com-api](https://parse.bot/marketplace/b739c7a3-91c8-400a-82ce-0f4e135f8a6b/booksamillion-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-booksamillion-com-api-b739c7a3/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_bestsellers

Fetches the overall bestsellers list from Books-A-Million. Returns all books currently featured on the main bestsellers page, across all categories. Single-page response containing the full list.

**Estimated cost:** Metered

_No parameters required._

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

### get_bestselling_fiction

Fetches bestselling fiction books from Books-A-Million. Returns all books currently on the fiction bestsellers list.

**Estimated cost:** Metered

_No parameters required._

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

### get_bestselling_kids

Fetches bestselling Kids books from Books-A-Million. Returns all books currently on the kids' bestsellers list.

**Estimated cost:** Metered

_No parameters required._

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

### get_bestselling_manga

Fetches bestselling manga books from Books-A-Million. Returns all books currently on the manga bestsellers list.

**Estimated cost:** Metered

_No parameters required._

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

### get_bestselling_nonfiction

Fetches bestselling nonfiction books from Books-A-Million. Returns all books currently on the nonfiction bestsellers list.

**Estimated cost:** Metered

_No parameters required._

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

### get_bestselling_ya

Fetches bestselling Young Adult books from Books-A-Million. Returns all books currently on the YA bestsellers list.

**Estimated cost:** Metered

_No parameters required._

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

### get_book_details

Fetches detailed information for a single book given its full Books-A-Million product page URL. Returns title, author, pricing, ISBN, publisher, dimensions, and other metadata. The URL is obtainable from search_books or any bestseller endpoint.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | Full URL of the book detail page on booksamillion.com. Obtainable from search_books or bestseller endpoint results. |

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

### get_book_reviews

Retrieves customer reviews for a book using its ISBN-13. Returns paginated review data from PowerReviews including average rating, review count, and individual reviews with ratings, comments, and reviewer info. The ISBN is obtainable from get_book_details results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `from` | integer | No | Starting index for pagination. |
| `isbn` | string | Yes | ISBN-13 of the book. Obtainable from get_book_details results. |
| `limit` | integer | No | Maximum number of reviews to return per page. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-booksamillion-com-api-b739c7a3/get_book_reviews \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"from":"<integer>","isbn":"<string>","limit":"<integer>"}'
```

### get_new_releases

Fetches new release books from Books-A-Million. Returns all books currently featured on the new releases page.

**Estimated cost:** Metered

_No parameters required._

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

### get_store_locator

Retrieves the nearest physical Books-A-Million store location for a given US ZIP code. Geocodes the ZIP and returns the closest store with address, phone, coordinates, and distance.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `zip` | string | Yes | US ZIP code to search near. Leading zeros preserved. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-booksamillion-com-api-b739c7a3/get_store_locator \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"zip":"<string>"}'
```

### search_books

Search for books by keyword on Books-A-Million. Returns up to 20 results matching the query against titles and authors.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword or phrase. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-booksamillion-com-api-b739c7a3/search_books \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
