# Megamarket — 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 across MegaMarket.ru's catalog, view detailed product information with customer reviews, and explore catalog categories to discover items available on Sber's Russian marketplace. Get real-time search suggestions and product recommendations to help you find exactly what you're looking for.

**Category:** Marketplaces | **Website:** [megamarket.ru/](https://megamarket.ru/) | **Docs:** [parse.bot/marketplace/be1471c5-c8af-4f57-a9ec-51f9e19e4e3b/megamarket-ru-api](https://parse.bot/marketplace/be1471c5-c8af-4f57-a9ec-51f9e19e4e3b/megamarket-ru-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-megamarket-ru-api-be1471c5/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_catalog_menu

Get the catalog category tree/menu hierarchy

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `depth_level` | integer | No | Max depth level of category tree |
| `depth_level_from` | integer | No | Starting depth level |
| `location_id` | string | No | Region ID |
| `parent_id` | string | No | Parent category ID (0 for root) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-megamarket-ru-api-be1471c5/get_catalog_menu \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"depth_level":"<integer>","depth_level_from":"<integer>","location_id":"<string>","parent_id":"<string>"}'
```

### get_product_details

Get detailed product information including all attributes/specs

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `goods_id` | string | Yes | Product goods ID (e.g. '700001132179_254730') |
| `location_id` | string | No | Region ID |
| `merchant_id` | string | No | Merchant ID (auto-extracted from goods_id if contains underscore) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-megamarket-ru-api-be1471c5/get_product_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"goods_id":"<string>","location_id":"<string>","merchant_id":"<string>"}'
```

### get_product_reviews

Get product reviews with pagination and sorting

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `goods_id` | string | Yes | Product goods ID |
| `limit` | integer | No | Number of reviews per page (max 50) |
| `location_id` | string | No | Region ID |
| `offset` | integer | No | Pagination offset |
| `sort_direction` | string | No | Sort direction: ASC, DESC |
| `sort_type` | string | No | Sort by: HELPFULNESS, DATE |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-megamarket-ru-api-be1471c5/get_product_reviews \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"goods_id":"<string>","limit":"<integer>","location_id":"<string>","offset":"<integer>","sort_direction":"<string>","sort_type":"<string>"}'
```

### search_products

Search products by text query with pagination and sorting

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Number of results per page (max 44) |
| `location_id` | string | No | Region ID (50=Moscow) |
| `offset` | integer | No | Pagination offset |
| `query` | string | Yes | Search text query |
| `sorting` | integer | No | Sort order: 0=relevance, 1=price_asc, 2=price_desc, 3=rating, 4=discount |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-megamarket-ru-api-be1471c5/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","location_id":"<string>","offset":"<integer>","query":"<string>","sorting":"<integer>"}'
```

### search_suggest

Get search autocomplete suggestions for a query

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `location_id` | string | No | Region ID |
| `query` | string | No | Search text for suggestions |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-megamarket-ru-api-be1471c5/search_suggest \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"location_id":"<string>","query":"<string>"}'
```
