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

## Access

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

## 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.paywithlocus.com/api/wrapped/parse-barnesandnoble-com-api-48c8277f/browse_category \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-barnesandnoble-com-api-48c8277f/get_bestsellers \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-barnesandnoble-com-api-48c8277f/get_book_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-barnesandnoble-com-api-48c8277f/get_book_reviews \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-barnesandnoble-com-api-48c8277f/search_books \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","page":"<integer>","query":"<string>"}'
```
