# MercadoLibre Scraper MX, AR, CO, CL (`bonpleincapital/mercadolibre-multipais`) Actor

Productos de MercadoLibre en MX, AR, CO y CL: precio, vendedor y envío. Precios con tu token de API.

Licencia: solo uso personal; reventa y redistribución prohibidas.
Creado con ayuda de inteligencia artificial.

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

## Pricing

from $2.10 / 1,000 producto extraídos

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## MercadoLibre Scraper multi-país (MX, AR, CO, CL) por API oficial

**MercadoLibre Scraper multi-país** consulta la API oficial de MercadoLibre en México, Argentina, Colombia y Chile con una sola ejecución. Con tu propio token OAuth obtienes precios normalizados por moneda local (MXN, ARS, COP, CLP), vendedor, envío y reputación; sin token obtienes las categorías públicas sugeridas para cada búsqueda. Pensado para vendedores y analistas de precios en Latinoamérica. Descarga en JSON, CSV o Excel, o úsalo por API.

### ¿Qué puede hacer este Actor?

- Buscar por palabra clave en MercadoLibre MX, AR, CO y CL a la vez.
- **Con token OAuth (opcional):** título, precio actual, moneda, vendedor, envío gratis, nivel MercadoLíder y ventas del vendedor, categoría y enlace.
- **Sin token:** categorías sugeridas (ID, nombre, dominio) de la API pública, útiles para preparar análisis. Estas filas no tienen precio, llevan `fuente: api_publica_categorias` y **no se cobran**.
- Normalizar precios: número con la moneda de cada país (COP y CLP sin decimales).
- Probarlo gratis con los créditos mensuales del plan gratuito de Apify.

### Modo de uso

1. Haz clic en **Try for free** y abre la pestaña **Entrada**.
2. Escribe una o varias búsquedas (por ejemplo «audifonos bluetooth») y elige los países.
3. Para precios y vendedores, pega el token OAuth de tu propia aplicación de MercadoLibre (campo secreto, opcional). Se crea en developers.mercadolibre.com.
4. Define el máximo de resultados (el valor predefinido, 3, da un ejemplo rápido) y pulsa **Start**.
5. Descarga los datos desde **Salida**, o llama al Actor desde la API, Make, Zapier o n8n.

### Entrada y salida en JSON

Entrada de ejemplo:

```json
{
  "queries": ["audifonos bluetooth"],
  "paises": ["MX", "CO"],
  "maxItems": 20,
  "accessToken": "APP_USR-...",
  "incluirDetalleVendedor": true
}
```

Salida de ejemplo (con token):

```json
{
  "pais": "MX",
  "consulta": "audifonos bluetooth",
  "fuente": "api_oficial",
  "titulo": "Audífonos Bluetooth Inalámbricos",
  "url": "https://articulo.mercadolibre.com.mx/...",
  "precio": 299,
  "moneda": "MXN",
  "vendedor": "TIENDA_OFICIAL",
  "envio": "Envío gratis",
  "envioGratis": true,
  "nivelVendedor": "MercadoLíder Gold",
  "ventasVendedor": "10450",
  "categoria": "MLM7533"
}
```

Los campos que MercadoLibre no publica quedan en `null`.

### ¿Cuánto cuesta? How much does it cost? (por 1,000 resultados)

Precio **por evento**: se cobra un evento `result` por cada producto con datos de la API oficial (con token), aproximadamente **0.70 USD por 1,000 resultados**; el precio exacto está en la pestaña **Pricing**. Las filas de categorías sin token no se cobran.

### Preguntas frecuentes

#### ¿Es legal usar este Actor?

Usa la API oficial de MercadoLibre y, si lo aportas, tu propio token; no inicia sesión por ti ni se salta captchas. Tú eres responsable de cumplir los términos de la API y la ley. **Aviso GDPR / protección de datos:** los apodos de vendedores pueden ser datos personales; si los tratas, respeta el RGPD (GDPR) y la ley local aplicable.

#### ¿Por qué sin token no hay precios?

MercadoLibre exige autenticación en su API de búsqueda y bloquea el tráfico automatizado en sus páginas web. Este Actor no intenta eludir esos controles: con token usa la vía oficial; sin token entrega solo lo público.

#### ¿Qué pasa si el token es inválido?

La API responde 401/403; el Actor lo registra, y devuelve las categorías públicas en su lugar.

#### ¿Puedo usarlo por API?

Sí, con la API de Apify y sus clientes de Python y JavaScript.

***

Creado con la ayuda de inteligencia artificial. / Created with the help of artificial intelligence.

# Changelog

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

# Actor input Schema

## `queries` (type: `array`):

Lista de productos a buscar en MercadoLibre, por ejemplo «audifonos bluetooth».

## `paises` (type: `array`):

Países de MercadoLibre a consultar: MX, AR, CO, CL.

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

Se detiene al llegar a este número de productos en total. Un valor bajo sirve para probar barato.

## `accessToken` (type: `string`):

Token OAuth de tu propia aplicación de MercadoLibre. Necesario para precios y vendedores (API oficial). Sin token solo se devuelven categorías públicas sugeridas, sin precio.

## `incluirDetalleVendedor` (type: `boolean`):

Abre la página de cada producto para leer nivel de vendedor (MercadoLíder) y ventas. Es más lento.

## Actor input object example

```json
{
  "queries": [
    "audifonos bluetooth"
  ],
  "paises": [
    "MX"
  ],
  "maxItems": 3,
  "incluirDetalleVendedor": false
}
```

# Actor output Schema

## `results` (type: `string`):

One dataset item per result, shown in the Overview view.

# 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 = {
    "queries": [
        "audifonos bluetooth"
    ],
    "paises": [
        "MX"
    ],
    "maxItems": 3,
    "incluirDetalleVendedor": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("bonpleincapital/mercadolibre-multipais").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 = {
    "queries": ["audifonos bluetooth"],
    "paises": ["MX"],
    "maxItems": 3,
    "incluirDetalleVendedor": False,
}

# Run the Actor and wait for it to finish
run = client.actor("bonpleincapital/mercadolibre-multipais").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 '{
  "queries": [
    "audifonos bluetooth"
  ],
  "paises": [
    "MX"
  ],
  "maxItems": 3,
  "incluirDetalleVendedor": false
}' |
apify call bonpleincapital/mercadolibre-multipais --silent --output-dataset

```

## MCP server setup

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

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/1o2xk1LAgQLjGAv6k/builds/rfUj7rcUU7M5Kmxit/openapi.json
