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

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-rokomari-com-api-362cbadd/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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/parse-rokomari-com-api-362cbadd/get_bestseller_award_page \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-rokomari-com-api-362cbadd/get_book_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-rokomari-com-api-362cbadd/get_books_by_category \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-rokomari-com-api-362cbadd/get_quick_deals \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-rokomari-com-api-362cbadd/list_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-rokomari-com-api-362cbadd/search_books \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>"}'
```
