# Amazon (Brazil) — 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 and browse products on Amazon Brazil (amazon.com.br). Retrieve product details, review summaries, bestseller rankings, current deals, and price analytics.

**Category:** E-commerce | **Website:** [amazon.com.br/](https://amazon.com.br/) | **Docs:** [parse.bot/marketplace/1f272c63-4085-4c35-b264-dd594475383f/amazon-com-br-api](https://parse.bot/marketplace/1f272c63-4085-4c35-b264-dd594475383f/amazon-com-br-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-amazon-com-br-api-1f272c63/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### calculate_category_average_price

Price statistics for products matching a search query on Amazon Brazil. Analyzes the first page of search results and returns average, min, max prices plus product count.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search query for price analysis (e.g. 'notebook', 'smartphone'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-amazon-com-br-api-1f272c63/calculate_category_average_price \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### get_bestsellers

Bestselling products for a category, sorted by Amazon popularity rank. Returns a ranked list from Amazon Brazil search. Omitting category returns general bestsellers.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | No | Category to browse. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-amazon-com-br-api-1f272c63/get_bestsellers \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>"}'
```

### get_deals

Current deals and promotions from Amazon Brazil. Searches for daily deals and includes discount_percent when both current and original price are available.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-amazon-com-br-api-1f272c63/get_deals \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_product_details

Point-lookup for a single product by ASIN. Searches Amazon Brazil for the ASIN and returns the matching result with name, price, rating, review count, URL, and Prime status. Returns stale_input when the ASIN is not found in search results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `asin` | string | Yes | Amazon product ASIN (e.g. 'B0DVMQVVDY'). |

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

### get_product_reviews

Review summary for a product by ASIN. Returns aggregate rating and review count extracted from search results. Individual review text is not available; the reviews array is always empty.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `asin` | string | Yes | Amazon product ASIN (e.g. 'B0DVMQVVDY'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-amazon-com-br-api-1f272c63/get_product_reviews \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"asin":"<string>"}'
```

### search_products

Full-text search over Amazon Brazil products. Returns up to ~48 results per page with pricing, ratings, and Prime eligibility. Pagination via integer page counter; some products may have null prices when Amazon hides pricing behind a click-through. Sort controls result ordering; node_id restricts to a category subtree.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `node_id` | string | No | Category node ID to filter results (e.g. '16209062011' for electronics). |
| `page` | integer | No | Page number for pagination. |
| `query` | string | Yes | Search keyword (e.g. 'notebook', 'fone bluetooth'). |
| `sort` | string | No | Sort order for results. |

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