> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindcase.co/llms.txt
> Use this file to discover all available pages before exploring further.

# MercadoLibre Listings API

> MercadoLibre listings with title, URL, catalog product ID, brand and price. Search by keyword or country.

`POST /v1/data/mercadolibre/listings/run`

**Pricing:** $0.003 per listing ($3.00 per 1,000).

## Request

Send the inputs under `params`. Only the keys below are accepted; any other key returns `422 invalid_params`.

**query** `string` *required*

Search Query.

**country** `string` *required*

The MercadoLibre country marketplace to search.

Allowed values: `MX` (🇲🇽 Mexico), `AR` (🇦🇷 Argentina), `BR` (🇧🇷 Brazil), `EC` (🇪🇨 Ecuador), `CL` (🇨🇱 Chile), `CO` (🇨🇴 Colombia), `PE` (🇵🇪 Peru), `UY` (🇺🇾 Uruguay), `VE` (🇻🇪 Venezuela).

**maxResults** `integer` (default: 100)

How many listings to return in total. Defaults to 100; use 0 for all.

**condition** `string` (default: any)

Only new, used or refurbished listings. Any (default) keeps all.

Allowed values: `any` (Any (default)), `new` (New), `used` (Used), `refurbished` (Refurbished).

**sortBy** `string` (default: relevance)

Sort By to use. Relevance (default) by default.

Allowed values: `relevance` (Relevance (default)), `price_asc` (Price: low to high), `price_desc` (Price: high to low).

## Example

```bash cURL theme={null}
curl -X POST "https://api.mindcase.co/v1/data/mercadolibre/listings/run?wait=true" \
  -H "Authorization: Bearer $MINDCASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "params": {
    "query": "iphone 15 128gb",
    "country": "MX",
    "maxResults": 10
  }
}'
```

```python Python theme={null}
import os, requests

r = requests.post(
    "https://api.mindcase.co/v1/data/mercadolibre/listings/run",
    params={"wait": "true"},
    headers={"Authorization": f"Bearer {os.environ['MINDCASE_API_KEY']}"},
    json={"params": {
    "query": "iphone 15 128gb",
    "country": "MX",
    "maxResults": 10
}},
)
job = r.json()
rows = job.get("data", [])  # if job["status"] == "running", poll /v1/jobs/{job_id}/results
```

```javascript Node.js theme={null}
const r = await fetch("https://api.mindcase.co/v1/data/mercadolibre/listings/run?wait=true", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MINDCASE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ params: {
  "query": "iphone 15 128gb",
  "country": "MX",
  "maxResults": 10
} }),
});
const job = await r.json();
const rows = job.data ?? []; // if job.status === "running", poll /v1/jobs/{job_id}/results
```

## Response fields

Each row in `data` is one listing, keyed by these fields.

| Field | Name | Type |
| - | - | - |
| `itemId` | Item ID | text |
| `title` | Title | text |
| `productUrl` | Product URL | url |
| `catalogProductId` | Catalog Product ID | text |
| `marketplace` | Marketplace | text |
| `brand` | Brand | text |
| `price` | Price | number |
| `currency` | Currency | text |
| `listPrice` | List Price | number |
| `discountPercent` | Discount Percent | number |
| `conditionalPrice` | Conditional Price | number |
| `conditionalPriceNote` | Conditional Price Note | text |
| `installments` | Installments | object |
| `condition` | Condition | text |
| `soldQuantityApprox` | Sold Quantity Approx | number |
| `rating` | Rating | rating |
| `soldBy` | Sold By | text |
| `officialStore` | Official Store | boolean |
| `officialStoreName` | Official Store Name | text |
| `freeShipping` | Free Shipping | boolean |
| `shipping` | Shipping | text |
| `nextDayDelivery` | Next Day Delivery | boolean |
| `international` | International | boolean |
| `badge` | Badge | text |
| `categoryId` | Category ID | text |
| `domainId` | Domain ID | text |
| `variations` | Variations | object\_array |
| `variationCount` | Variation Count | number |
| `searchRank` | Search Rank | number |
| `mainImage` | Main Image | url |

## Example response

Abridged: long text and lists are shortened.

```json theme={null}
{
  "job_id": "7f3a1c2e-0b9d-4c55-9a51-3f2e8d1b6a40",
  "agent": "mercadolibre/listings",
  "status": "completed",
  "row_count": 1,
  "truncated": false,
  "data": [
    {
      "conditionalPrice": null,
      "rating": 4.9,
      "officialStoreName": "Apple",
      "variations": null,
      "conditionalPriceNote": null,
      "discountPercent": null,
      "variationCount": null,
      "condition": "NewCondition",
      "installments": {
        "quantity": 15,
        "amount": 1081.69,
        "rate": 0,
        "total": 16225.36
      },
      "marketplace": "MX",
      "soldQuantityApprox": 1000,
      "categoryId": "MLM1055",
      "domainId": "MLM-CELLPHONES",
      "brand": "Apple",
      "itemId": "MLM3571336480",
      "badge": "APPLE TIENDA OFICIAL",
      "mainImage": "https://http2.mlstatic.com/D_NQ_NP_952616-MLA95935522561_102025-F.jpg",
      "officialStore": true,
      "nextDayDelivery": false,
      "shipping": "Llega gratis hoy",
      "catalogProductId": "MLM1027172667",
      "international": false,
      "freeShipping": true,
      "searchRank": 1,
      "soldBy": "Apple"
    }
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.