# Amzn (Tonga) — 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 Amazon products and retrieve detailed information including pricing, reviews, and specifications, plus discover current best sellers across categories. Get real-time product data to compare options and find trending items on Amazon.

**Category:** E-commerce | **Website:** [amzn.to/](https://amzn.to/) | **Docs:** [parse.bot/marketplace/ba7f7222-2d5d-4b6d-b841-e62d7fd7545b/amzn-to-api](https://parse.bot/marketplace/ba7f7222-2d5d-4b6d-b841-e62d7fd7545b/amzn-to-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-amzn-to-api-ba7f7222/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_best_sellers

Retrieve the current Best Sellers for a given Amazon category. Returns a list of top-selling products with title, price, rating, and image. When a category slug is provided (e.g. 'electronics', 'books'), returns the top 30 items in that category's grid layout. When omitted, returns items from the overall best sellers across multiple categories.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | No | Category slug (e.g. 'electronics', 'books', 'toys-and-games', 'home-garden', 'beauty'). Omitting returns overall best sellers across categories. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-amzn-to-api-ba7f7222/get_best_sellers \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>"}'
```

### get_product_details

Fetch detailed product information for one or more ASINs. Returns title, price, rating, description, and feature bullet points for each product. Multiple ASINs can be provided comma-separated. Products not found are silently skipped.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `asin` | string | Yes | One or more ASINs, comma-separated (e.g. 'B0DCH8VDXF' or 'B0DCH8VDXF,B0GJTFXNRX'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-amzn-to-api-ba7f7222/get_product_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"asin":"<string>"}'
```

### search_products

Search for products on Amazon by keyword. Returns paginated results with product title, price, rating, image URL, and ASIN. Each page returns up to ~20 organic results. Higher page numbers may yield fewer results as Amazon limits deep pagination.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination (1-based). |
| `query` | string | Yes | Search keyword (e.g. 'wireless headphones', 'laptop'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-amzn-to-api-ba7f7222/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>"}'
```
