# Barnesandnoble — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.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 and discover detailed information including metadata, pricing, and customer reviews from Barnes & Noble's catalog. Browse bestsellers by category and access comprehensive book details to find your next read or compare prices and ratings.

**Category:** E-commerce | **Website:** [barnesandnoble.com/](https://barnesandnoble.com/) | **Docs:** [parse.bot/marketplace/48c8277f-66b3-4c51-a1d4-796be3561e10/barnesandnoble-com-api](https://parse.bot/marketplace/48c8277f-66b3-4c51-a1d4-796be3561e10/barnesandnoble-com-api)

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

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/barnesandnoble/`
**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

### Browse category

Browse books by Barnes & Noble web category identifier. Returns books in the specified category ordered by sales rank. Category IDs can be discovered from the site's navigation structure.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | string | Yes | B&N web category identifier (e.g. '2916841'). |
| `category_name` | string | No | Category name for reference (not used in API call). |
| `page` | integer | No | Page number to retrieve. |

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

### Get bestsellers

Fetch current bestseller listings from Barnes & Noble, ordered by sales rank. Returns up to 20 books.

**Estimated cost:** Metered

_No parameters required._

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

### Get book details

Retrieve detailed metadata for a specific book by EAN/ISBN-13, including synopsis, price, author, format, rating, and product URL.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ean` | string | Yes | The 13-digit ISBN (EAN) of the book. |

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

### Get book reviews

Retrieve customer ratings and reviews summary for a specific book via Bazaarvoice. Returns average rating and total review count. Some books may not have reviews, in which case rating is null and count is 0.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ean` | string | Yes | The 13-digit ISBN (EAN) of the book. |

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

### Search books

Search for books by keyword, title, author, or ISBN. Returns paginated results from the Barnes & Noble catalog via their retail search API. Each result includes title, author, EAN, price, format, and URL.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Number of results per page (max 28). |
| `page` | integer | No | Page number to retrieve. |
| `query` | string | Yes | Search keyword, title, author, or ISBN. |

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

## Next steps

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