# Mercado Libre Mexico — 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 on Mercado Libre Mexico, view detailed product information with pricing and offers, browse categories, and research seller details all in one place. Access live marketplace data including product listings, category hierarchies, and current offers to help you find and compare items across Mexico's largest e-commerce platform.

**Category:** Marketplaces | **Website:** [mercadolibre.com.mx/](https://mercadolibre.com.mx/) | **Docs:** [parse.bot/marketplace/0f1cdac4-7024-40df-b728-128a478189f2/mercadolibre-com-mx-api](https://parse.bot/marketplace/0f1cdac4-7024-40df-b728-128a478189f2/mercadolibre-com-mx-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/mercado-libre-mexico/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get categories

Retrieve all product categories from Mercado Libre Mexico organized by department. Returns hierarchical category data including top-level categories with their child subcategories. Each category includes an ID, name, URL, and department grouping.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/mercado-libre-mexico/get-categories \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get category listings

Get product listings for a specific category page on Mercado Libre Mexico. Accepts a category URL (use top-level URLs from get_categories with the www.mercadolibre.com.mx/c/ format for best results). Returns the category title and product listings with pricing and details.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_url` | string | Yes | Full URL of the category page (e.g. https://www.mercadolibre.com.mx/c/computacion). Use top-level category URLs from get_categories for reliable results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/mercado-libre-mexico/get-category-listings \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"category_url":"<string>"}'
```

### Get offers

Retrieve current daily deals and promotions from Mercado Libre Mexico. Returns paginated product listings with pricing, discounts, brands, images, and ratings. Pagination is available via the page parameter.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination (starts at 1). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/mercado-libre-mexico/get-offers \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>"}'
```

### Get product detail

Get full details for a product by its item ID. Extracts title, description, pricing, images, seller, and availability data from the product page.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `item_id` | string | Yes | Product ID (with or without MLM prefix) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/mercado-libre-mexico/get-product-detail \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"item_id":"<string>"}'
```

### Get seller info

Get seller profile and reputation info.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `seller_id` | string | Yes | Seller nickname or ID from product detail |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/mercado-libre-mexico/get-seller-info \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"seller_id":"<string>"}'
```

### Search products

Search for products on Mercado Libre Mexico. Note: Direct search may be blocked by account verification challenges; consider using category listings or offers as an alternative.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/mercado-libre-mexico/search-products \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.