# Mercado Libre Search Results Scraper (`devilscrapes/mercadolibre-scraper`) Actor

Scrape Mercado Libre Mexico product search results by keyword. Get normalized rows with title, seller, rating, sale/list price, discount percent, installments, and shipping text — built for price monitoring and catalog research. No login required.

- **URL**: https://apify.com/devilscrapes/mercadolibre-scraper.md
- **Developed by:** [DevilScrapes](https://apify.com/devilscrapes) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 result emitteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

<div align="center">
  <img src=".actor/icon.svg" width="160" alt="Devil Scrapes mark" />

## Mercado Libre Search Results Scraper

**💰 $5.20 / 1 000 results**  ·  pay only for results  ·  no credit card to try

*We do the dirty work so your dataset stays clean.* 😈

Scrape Mercado Libre Mexico product search results by keyword. Get normalized rows with title, seller, rating, sale/list price, discount percent, installments, and shipping text.

</div>

***

### 🎯 What this scrapes

Mercado Libre is the dominant LatAm marketplace, and this Actor searches its .mx search-results pages by keyword, writing one normalized row per organic listing: title, seller, rating, sale/list price, discount percent, installments text, and shipping promise. Built for price monitoring and catalog research on a target that requires a real residential-backed browser to clear.

### 🔥 What we handle for you

- 🛡️ **We clear the challenge once per run** — a dedicated Camoufox context absorbs the proof-of-work check, then every page in the run reuses it.
- 🌐 **We rotate proxies and sessions** through Apify Proxy on every block — fresh session ID, fresh exit IP.
- 🔁 **We retry with exponential backoff** and rotate to a fresh context on recoverable refusals.
- 🧱 **We fail loud, not silent** — a hard block surfaces a clear status message instead of a quietly empty dataset.
- 🧊 **We keep the dataset clean** — Pydantic-validated rows, ISO-8601 timestamps, stable IDs.
- 💰 **Pay-Per-Event pricing** — you only pay for results that hit your dataset. No data, no charge.

### 💡 Use cases

- **Price monitoring** — track competitor and marketplace price or discount changes on target products over time.
- **Catalog research** — build a normalized dataset of listings for a category or keyword for market sizing and assortment analysis.
- **Competitor price tracking** — watch specific sellers' pricing, discount depth, and installment terms.
- **Deal and discount hunting** — surface the listings with the steepest discount percentages for arbitrage or resale.
- **Dropshipping sourcing** — vet MX supplier candidates on price, shipping promise, and seller reputation before you commit to a listing.

### ⚙️ How to use it

1. Click **Try for free** at the top of the page.
2. Fill in the input form — most fields have sensible defaults.
3. Click **Start**. Output streams into the run's dataset.
4. Export from **Storage → Dataset** as JSON, CSV, or Excel — or fetch via the API.

### 📥 Input

| Field | Type | Required | Default | Notes |
|---|---|:--:|---|---|
| `query` | `string` | **yes** | 'laptop' | Search keyword to look up on Mercado Libre Mexico. Required, non-empty. |
| `tld` | `string` | no | 'mx' | Mercado Libre country domain. Only .mx (Mexico) is supported in v1. |
| `maxItems` | `integer` | no | 100 | Hard cap on dataset rows for this run. Defaults above one page (48 rows) so pagination is always exercised. |
| `maxPages` | `integer` | no | 3 | Page cap for pagination (48 rows/page), hard-capped at 9 — the proven depth ceiling. |
| `proxyConfiguration` | `object` | no | {'useApifyProxy': True, 'apifyProxyGroups': \['RESIDENTIAL']} | Apify Proxy configuration. Defaults to RESIDENTIAL — required, not optional, for this target. |

#### Example input

```json
{
  "query": "laptop",
  "tld": "mx",
  "countryCode": "MX",
  "maxItems": 100
}
```

### 📤 Output

Every row is one dataset item.

| Field | Type | Notes |
|---|---|---|
| `itemId` | `string` | Mercado Libre item identifier, e.g. MLM1234567890. |
| `title` | `string` | Listing title, verbatim from the search-result card. |
| `seller` | `string` | Seller/store name shown on the card. |
| `rating` | `['number', 'null']` | Average review rating (0-5), null if absent. |
| `listPrice` | `['number', 'null']` | Previous (pre-discount) price; null when not discounted. |
| `salePrice` | `number` | Current listed price. |
| `discountPercent` | `['integer', 'null']` | Discount percentage; null when not discounted. |
| `installmentsText` | `['string', 'null']` | Verbatim installment-payment text. |
| `shippingText` | `['string', 'null']` | Verbatim shipping-promise text. |
| `itemUrl` | `string` | Canonical product URL, tracking fragment stripped. |
| `currency` | `string` | Currency code for the TLD searched, e.g. MXN. |
| `query` | `string` | Echoes the query input for this row. |
| `page` | `integer` | 1-indexed source page this row was scraped from. |
| `scrapedAt` | `string` | ISO-8601 UTC wall-clock time of row extraction. |

#### Example output

```json
{
  "itemId": "MLM1234567890",
  "title": "Hp Omnibook Core Ultra 7 32gb Ram 1tb Ssd Laptop Gamer",
  "seller": "Global-Laptops",
  "rating": 4.6,
  "listPrice": 30960.0,
  "salePrice": 24799.0,
  "discountPercent": 19,
  "installmentsText": "15 meses sin intereses de $1,653",
  "shippingText": "Llega gratis mañana",
  "itemUrl": "https://www.mercadolibre.com.mx/hp-omnibook-.../p/MLM1234567890",
  "currency": "MXN",
  "query": "laptop",
  "page": 1,
  "scrapedAt": "2026-09-19T00:00:00Z"
}
```

### 💰 Pricing

Pay-Per-Event — you pay only when these events fire:

| Event | USD | What it is |
|---|---:|---|
| `actor-start` | $0.2 | One-off warm-up charge per run |
| `result` | $0.005 | Per dataset item |

Example: 1 000 results at the rates above ≈ **$5.20**. No subscription, no minimum, no card to start — Apify gives every new account $5 of free credit.

### 🚧 Limitations

- `.mx` (Mexico) only in v1 — other Mercado Libre country domains aren't supported yet.
- Search-results rows only — no product detail pages, images, Q\&A, or full reviews.
- No public JSON API path exists anymore; Mercado Libre retired it, so this Actor is browser-only by necessity.
- Sponsored listings and recommendation carousels are excluded — organic results only.
- Depth capped at page 9 (offset 385) — the proven ceiling; not marketed as unlimited.
- No seller storefronts, price-history tracking, or keyword-less browsing.

### ❓ FAQ

**Why does this need a browser instead of a fast API call?**

Mercado Libre retired its public JSON search API — it returns a 403 on every proxy tier we've tested, so a direct HTTP call simply does not work anymore. The HTML search pages are additionally fronted by a proof-of-work challenge that only clears from a real, adequately-resourced browser on a residential exit. We run that browser and absorb the challenge once per run so your dataset arrives clean without you touching any of it.

**Which Mercado Libre country domains are supported?**

`.mx` (Mexico) only in v1. Other country domains — Argentina, Brazil, Colombia, and the rest — need their own recon and aren't wired up yet.

**Are sponsored or ad listings included?**

No. We extract only from the organic result-grid anchors and drop sponsored placements and recommendation-carousel items, so every row is a real organic search match.

**What happens if my search has zero results?**

The run succeeds with zero rows and a status message naming the query. A narrow search that genuinely matches nothing is not a failure, and there's no per-row charge when there are no rows to charge for.

**How current is the data?**

Every row is scraped live at run time and stamped with an ISO-8601 UTC `scrapedAt` timestamp — there's no cache or stale snapshot anywhere in the pipeline.

**How deep can I paginate?**

Up to page 9 (offset 385), the proven depth ceiling for this target. `maxPages` is hard-capped there in v1 — we don't market depth we haven't measured.

### 💬 Your feedback

Spotted a bug, hit a weird edge case, or need a new field? Open an
issue on the Actor's **Issues** tab on Apify Console — we ship
fixes weekly and we read every report.

***

<div align="center">

Built by **[Devil Scrapes](https://apify.com/DevilScrapes)** 😈 — a small fleet of
opinionated public-data Actors. Honest pricing, real engineering, zero fine print.

</div>

# Changelog

This Actor's version history is a separate document: https://apify.com/devilscrapes/mercadolibre-scraper/changelog.md

# Actor input Schema

## `query` (type: `string`):

Search keyword to look up on Mercado Libre Mexico (listado.mercadolibre.com.mx). Required, non-empty.

## `tld` (type: `string`):

Mercado Libre country domain to search. Only `.mx` (Mexico) is supported in v1 — other TLDs need their own anti-bot recon before they're added.

## `countryCode` (type: `string`):

Proxy country pin, must match `tld` (`mx` -> `MX`). Left configurable for forward-compatibility with future TLDs.

## `maxItems` (type: `integer`):

Hard cap on dataset rows for this run. Deliberately defaults above one page (48 rows) so a default run always exercises pagination. Pagination stops as soon as either Max items or Max pages is hit, whichever comes first.

## `maxPages` (type: `integer`):

Page cap for pagination (48 rows/page). Hard-capped at 9 — the proven-clean depth ceiling (offset 385) from the 2026-09-19 recon. Defaults to enough pages to cover Max items.

## `proxyConfiguration` (type: `object`):

Apify Proxy configuration. Defaults to RESIDENTIAL — the 2026-09-19 cloud recon measured datacenter/no-proxy tiers soft-blocked 100% of the time against Mercado Libre's proof-of-work challenge, while RESIDENTIAL cleared. RESIDENTIAL is required here, not optional.

## Actor input object example

```json
{
  "query": "laptop",
  "tld": "mx",
  "countryCode": "MX",
  "maxItems": 100,
  "maxPages": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

All dataset items as JSON.

## `datasetItemsCsv` (type: `string`):

Same data exported to CSV.

## `datasetView` (type: `string`):

Open the run dataset in the Console.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "query": "laptop",
    "tld": "mx",
    "countryCode": "MX",
    "maxItems": 100,
    "maxPages": 3,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("devilscrapes/mercadolibre-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "query": "laptop",
    "tld": "mx",
    "countryCode": "MX",
    "maxItems": 100,
    "maxPages": 3,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("devilscrapes/mercadolibre-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "laptop",
  "tld": "mx",
  "countryCode": "MX",
  "maxItems": 100,
  "maxPages": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call devilscrapes/mercadolibre-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devilscrapes/mercadolibre-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/hk9RBiUYZBFgj3jdH/builds/PbZZNT95o5zFTwZwD/openapi.json
