# Rokomari — 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 explore detailed information about titles, authors, and awards from Rokomari's catalog. Browse bestsellers, categories, quick deals, and discover author profiles all in one place.

**Category:** E-commerce | **Website:** [rokomari.com/](https://rokomari.com/) | **Docs:** [parse.bot/marketplace/362cbadd-2ecc-4cad-984c-9c16786460c0/rokomari-com-api](https://parse.bot/marketplace/362cbadd-2ecc-4cad-984c-9c16786460c0/rokomari-com-api)

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

## Access

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

### Get bestseller award page

Retrieve the list of Rokomari Bestseller Award winners. Returns author names with their IDs and profile URLs. No input parameters required.

**Estimated cost:** Metered

_No parameters required._

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

### Get book details

Fetch full details for a single book including specifications (publisher, ISBN, pages, edition), summary text, and rating. Requires both book_id and slug from search_books results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `book_id` | string | Yes | The book's numeric ID (from search_books results items[*].id) |
| `slug` | string | Yes | The book's URL slug (from search_books results items[*].slug) |

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

### Get books by category

Browse books within a specific category with pagination. Returns books in the given category (60 per page). Requires category_id from list_categories; slug is optional but improves URL readability.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | string | Yes | The category's numeric ID (from list_categories results categories[*].id) |
| `page` | integer | No | Page number for pagination (1-based) |
| `slug` | string | No | The category's URL slug (from list_categories results categories[*].slug) |

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

### Get quick deals

Fetch current quick deals/flash sales with pricing, stock quantities, and discount percentages. Returns active deals with real-time sold/available counts. No input parameters required.

**Estimated cost:** Metered

_No parameters required._

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

### List categories

List all available book categories on Rokomari.com with their IDs, slugs, and display names. Use the returned category_id and slug to browse books via get_books_by_category.

**Estimated cost:** Metered

_No parameters required._

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

### Search books

Full-text search across all books on Rokomari.com. Returns paginated results (60 per page) matching the query against titles and authors. Supports both English and Bengali text queries. Each result includes pricing and a slug+id pair for drilling into details via get_book_details.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination (1-based) |
| `query` | string | Yes | Search keyword (supports English and Bengali text) |

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

## Next steps

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