# Mercado Livre Scraper - Brazil (Products, Prices, Sellers) (`analytics_tupiniquim/mercadolivre-scraper`) Actor

Scrape Mercado Livre Brazil by keyword or product URL: prices, discounts, installments, ratings, free shipping, seller name + reputation and full technical specs. Cleaner and deeper than search-only scrapers.

- **URL**: https://apify.com/analytics\_tupiniquim/mercadolivre-scraper.md
- **Developed by:** [Guilherme Teixeira](https://apify.com/analytics_tupiniquim) (community)
- **Categories:** E-commerce, Other, Automation
- **Stats:** 3 total users, 1 monthly users, 69.2% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 1,000 products

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## 🛒 Mercado Livre Scraper — Brasil (o mais completo)

**Extraia produtos, preços, descontos, avaliações, vendedor e reputação do Mercado Livre Brasil — com dados limpos e prontos para usar.** Busque por palavra-chave ou entre direto na página do produto. Sem login, sem cookies, sem dor de cabeça.

> A maioria dos scrapers de Mercado Livre só lê a página de busca e devolve o básico (às vezes com campos vazios e bugs no meio dos dados). **Este actor vai fundo:** além da busca completa, ele abre o produto e traz **vendedor, reputação, ficha técnica, descrição e categoria** — os campos que os outros deixam em branco.

---

### ⚡ Por que escolher este actor

| Recurso | **Este actor** | Scrapers só de busca |
|---|:---:|:---:|
| Preço, desconto, parcelas | ✅ | ✅ |
| Nota / avaliações | ✅ | parcial |
| Frete grátis **e** Mercado Envios **Full** | ✅ | ⚠️ só frete grátis |
| **Nome do vendedor** | ✅ | ❌ (vem vazio) |
| **Reputação do vendedor** (nível 1–5) | ✅ | ❌ |
| **Ficha técnica completa** | ✅ | ❌ |
| **Descrição do produto** | ✅ | ❌ |
| **Caminho de categoria** (breadcrumb) | ✅ | ❌ |
| Unidades vendidas / condição | ✅ | ❌ |
| Múltiplas palavras-chave por execução | ✅ | ⚠️ 1 por vez |
| Schema limpo e consistente | ✅ | ⚠️ nomes bagunçados / bugs |

---

### 🎛️ Opções de entrada

| Campo | Descrição |
|---|---|
| **Modo** | `search` (buscar por palavra-chave) ou `product` (detalhe completo por URL). |
| **Palavras-chave** | Uma ou várias (`iphone 15`, `notebook`, `tênis nike`). |
| **Ordenação** | Mais relevantes, menor preço ou maior preço. |
| **Máx. de produtos** | Limite por palavra-chave. |
| **Máx. de páginas** | Quantas páginas de busca percorrer (~48 produtos/página). |
| **Buscar detalhes completos** | No modo busca, abre cada produto para trazer vendedor, reputação e ficha. |
| **URLs de produto** | Lista de páginas de produto (modo `product`). |
| **Proxy** | Residencial BR (recomendado — o ML usa anti-bot DataDome). |

#### Exemplo de entrada

```json
{
  "mode": "search",
  "keywords": ["notebook", "iphone 15"],
  "sort": "price_asc",
  "maxItems": 100,
  "maxPages": 3,
  "includeProductDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "BR"
  }
}
````

***

### 📤 Dados de saída

**Modo busca** (um registro por produto):
`productId`, `title`, `price`, `originalPrice`, `discount`, `installments`, `installmentsNoInterest`, `rating`, `freeShipping`, `fullShipping`, `categoryId`, `domainId`, `image`, `url`, `keyword`.

**Modo produto** (tudo acima, mais):
`condition`, `soldQuantity`, `reviewCount`, `availability`, `brand`, `sku`, `sellerName`, `sellerId`, `sellerProducts`, `sellerReputationRank` (1–5), `sellerReputation`, `categoryPath`, `questionsCount`, `description`, `attributes` (ficha técnica).

#### Exemplo de saída (modo produto)

```json
{
  "recordType": "product",
  "productId": "MLB1066306849",
  "title": "Mocassim 100% Couro Legítimo Masculino",
  "condition": "Novo",
  "soldQuantity": 1,
  "price": 200.92,
  "originalPrice": 211.49,
  "discount": "4% OFF",
  "currency": "BRL",
  "brand": "Cardena Madera",
  "sellerName": "Cardena Madera",
  "sellerId": 312027913,
  "sellerReputationRank": 5,
  "categoryPath": "Calçados, Roupas e Bolsas > Calçados > Sapatos Sociais e Mocassims > Mocassim",
  "image": "https://http2.mlstatic.com/D_Q_NP_2X_...-E.webp",
  "url": "https://produto.mercadolivre.com.br/MLB-1066306849-..."
}
```

Exportável em **JSON, CSV, Excel e XML**, com acesso via API, cliente Python/JS e MCP.

***

### 💡 Casos de uso

- 📈 Monitoramento e comparação de preços
- 🔍 Pesquisa de mercado e análise de concorrência
- 🛍️ Sourcing para dropshipping (com dados de vendedor e reputação)
- 📊 Gestão e enriquecimento de catálogos

***

### ⚙️ Notas técnicas

- Os dados são lidos do estado renderizado da própria página do Mercado Livre — sem depender de APIs internas instáveis.
- O ML usa proteção anti-bot (**DataDome**). Use **proxy residencial brasileiro** para resultados confiáveis.
- Somente Mercado Livre **Brasil** (`mercadolivre.com.br`).

Este scraper coleta apenas dados **públicos**. Use em conformidade com os termos do Mercado Livre e a legislação aplicável.

# Actor input Schema

## `mode` (type: `string`):

'search' collects products for one or more keywords. 'product' extracts full details (seller, reputation, specs) for specific product URLs.

## `keywords` (type: `array`):

One or more terms to search on Mercado Livre Brasil (e.g. "iphone 15", "notebook"). Used in 'search' mode.

## `sort` (type: `string`):

How to order search results.

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

Upper limit of products collected per keyword in 'search' mode.

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

Maximum result pages to walk per keyword (~48 products per page).

## `includeProductDetails` (type: `boolean`):

When enabled in 'search' mode, each product found is also opened to extract seller, reputation and full specs. Much richer, but slower and more costly.

## `productUrls` (type: `array`):

Mercado Livre product page URLs (e.g. https://produto.mercadolivre.com.br/MLB-1234567890-...). Used in 'product' mode.

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

Mercado Livre uses anti-bot protection (DataDome). Brazilian residential proxies are strongly recommended for reliable results.

## Actor input object example

```json
{
  "mode": "search",
  "keywords": [
    "notebook"
  ],
  "sort": "relevance",
  "maxItems": 50,
  "maxPages": 5,
  "includeProductDetails": false,
  "productUrls": [],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "BR"
  }
}
```

# 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 = {
    "keywords": [
        "notebook"
    ],
    "productUrls": [],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "BR"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("analytics_tupiniquim/mercadolivre-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 = {
    "keywords": ["notebook"],
    "productUrls": [],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "BR",
    },
}

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

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

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

```

## CLI example

```bash
echo '{
  "keywords": [
    "notebook"
  ],
  "productUrls": [],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "BR"
  }
}' |
apify call analytics_tupiniquim/mercadolivre-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=analytics_tupiniquim/mercadolivre-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Mercado Livre Scraper - Brazil (Products, Prices, Sellers)",
        "description": "Scrape Mercado Livre Brazil by keyword or product URL: prices, discounts, installments, ratings, free shipping, seller name + reputation and full technical specs. Cleaner and deeper than search-only scrapers.",
        "version": "1.0",
        "x-build-id": "KhIYyK5YO3PMtFosY"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/analytics_tupiniquim~mercadolivre-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-analytics_tupiniquim-mercadolivre-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/analytics_tupiniquim~mercadolivre-scraper/runs": {
            "post": {
                "operationId": "runs-sync-analytics_tupiniquim-mercadolivre-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/analytics_tupiniquim~mercadolivre-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-analytics_tupiniquim-mercadolivre-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "Scraping mode",
                        "enum": [
                            "search",
                            "product"
                        ],
                        "type": "string",
                        "description": "'search' collects products for one or more keywords. 'product' extracts full details (seller, reputation, specs) for specific product URLs.",
                        "default": "search"
                    },
                    "keywords": {
                        "title": "Search keywords",
                        "type": "array",
                        "description": "One or more terms to search on Mercado Livre Brasil (e.g. \"iphone 15\", \"notebook\"). Used in 'search' mode.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "sort": {
                        "title": "Sort order",
                        "enum": [
                            "relevance",
                            "price_asc",
                            "price_desc"
                        ],
                        "type": "string",
                        "description": "How to order search results.",
                        "default": "relevance"
                    },
                    "maxItems": {
                        "title": "Max products per keyword",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Upper limit of products collected per keyword in 'search' mode.",
                        "default": 50
                    },
                    "maxPages": {
                        "title": "Max search pages per keyword",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum result pages to walk per keyword (~48 products per page).",
                        "default": 5
                    },
                    "includeProductDetails": {
                        "title": "Also fetch full product details (search mode)",
                        "type": "boolean",
                        "description": "When enabled in 'search' mode, each product found is also opened to extract seller, reputation and full specs. Much richer, but slower and more costly.",
                        "default": false
                    },
                    "productUrls": {
                        "title": "Product URLs",
                        "type": "array",
                        "description": "Mercado Livre product page URLs (e.g. https://produto.mercadolivre.com.br/MLB-1234567890-...). Used in 'product' mode.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Mercado Livre uses anti-bot protection (DataDome). Brazilian residential proxies are strongly recommended for reliable results."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
