# Torob — 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 products and compare prices across thousands of sellers on Torob.com, with access to detailed product specs, seller information, and price history. Browse categories, discover similar items, and explore store inventories to find the best deals.

**Category:** E-commerce | **Website:** [torob.com/](https://torob.com/) | **Docs:** [parse.bot/marketplace/d925cf61-d99f-41ad-9765-d68fc7fcfac1/torob-com-api](https://parse.bot/marketplace/d925cf61-d99f-41ad-9765-d68fc7fcfac1/torob-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-torob-com-api-d925cf61/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_categories

Get top-level product categories from Torob's browse page. Returns category names, IDs, and slugs for use in search_products filtering.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-torob-com-api-d925cf61/get_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_price_history

Get historical price data for a product. Returns chart data with price trends over time including labels (dates) and datasets (average price, minimum price).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_uuid` | string | Yes | Product UUID (random_key from search results) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-torob-com-api-d925cf61/get_price_history \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_uuid":"<string>"}'
```

### get_product_details

Get full details for a specific product by its UUID (random_key from search results). Returns product information including name, price, variants, specs, breadcrumbs, and seller count.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_uuid` | string | Yes | Product UUID (random_key from search_products results) |

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

### get_product_sellers

Get list of online sellers and their prices for a specific product. Returns seller name, shop ID, price, availability, shipping info, and store score.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_uuid` | string | Yes | Product UUID (random_key from search_products results) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-torob-com-api-d925cf61/get_product_sellers \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_uuid":"<string>"}'
```

### get_product_specs

Get technical specifications for a product. Returns structured specs organized by category headers and key specs highlighting the most important attributes.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_uuid` | string | Yes | Product UUID (random_key from search_products results) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-torob-com-api-d925cf61/get_product_specs \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_uuid":"<string>"}'
```

### get_search_suggestions

Get autocomplete suggestions for a search query from Torob. Returns suggested search terms with their types.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search query for autocomplete |

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

### get_similar_products

Get products similar to the given product. Returns a list of similar product summaries.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_uuid` | string | Yes | Product UUID (random_key from search results) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-torob-com-api-d925cf61/get_similar_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_uuid":"<string>"}'
```

### get_store_details

Get details about a specific store/seller on Torob including name, address, score, licensing info, and delivery/payment details.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `store_id` | string | Yes | Numeric store ID (from get_product_sellers results shop_id field) |
| `store_slug` | string | No | Store URL slug |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-torob-com-api-d925cf61/get_store_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"store_id":"<string>","store_slug":"<string>"}'
```

### get_store_products

Get products sold by a specific store. Returns paginated product listings for the given store ID.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | No | Search query to filter store products |
| `store_id` | string | Yes | Store ID (from get_product_sellers results shop_id field) |
| `store_slug` | string | No | Store URL slug (not used in API call, kept for compatibility) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-torob-com-api-d925cf61/get_store_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>","store_id":"<string>","store_slug":"<string>"}'
```

### search_products

Search for products by keyword or category on Torob. Returns paginated results with product summaries, prices, and related categories. Supports pagination and sorting.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | string | No | Category ID to filter by (from get_categories results) |
| `page` | integer | No | Page number (0-based) |
| `query` | string | No | Search keyword (Persian or English) |
| `sort` | string | No | Sort order for results. |

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