# Mercado Libre Keyword Rank Tracker (`attherateai/mercadolibre-rank`) Actor

Full Mercado Libre search results per keyword (Brazil (mercadolivre.com.br), Mexico (mercadolibre.com.mx), Argentina (mercadolibre.com.ar), Chile… No-discount estimates: 10/100/1,000 dataset rows = $0.0402/$0.4002/$4.0002, incl. start at default memory. See Pricing for tier rates.

- **URL**: https://apify.com/attherateai/mercadolibre-rank.md
- **Developed by:** [AtTheRate AI](https://apify.com/attherateai) (community)
- **Features:** Limited permissions
- **Stats:** 3 total users, 1 monthly users, 89.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.40 / 1,000 results

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

## Mercado Libre Keyword Rank Tracker

Shows where a product or store ranks for a keyword on five Mercado Libre storefronts (Brazil, Mexico, Argentina, Chile and Colombia), and which sellers hold the "Patrocinado" slots above it. Every search result becomes one row with an absolute position, the seller behind it and the sales count the site publishes on the card.

### Login: optional

No account is needed. Mercado Libre walls the plain-HTTP replay of a session with its account-verification page (`/gz/account-verification`), so the actor reads listings through a real browser on a residential exit in the market's country, which the site serves anonymously.

If Mercado Libre walls the browser too (it can tighten this at any time), you can run as your own logged-in session: log in at https://www.mercadolivre.com.br (or your market's site), export the cookies with **Cookie-Editor** or **EditThisCookie** (**Export → JSON**, or paste the raw `Cookie:` header `name1=value1; name2=value2`) into the optional `sessionCookies` input, and keep the proxy in the account's country (BR, MX, AR, CL or CO). With cookies set the actor holds one sticky exit for the whole run. The field is stored encrypted by Apify, values are never logged (only the count and cookie names), and only cookies for the market's own domain (e.g. `mercadolivre.com.br` for `br`) are used.

If the wall still appears, the run stops with one of two messages: *"… requires a logged-in session … Supply sessionCookies …"* (no cookies were given) or *"… supplied session is logged out / expired — re-export cookies …"* (cookies were attached but the site still walled them; log in again and export a fresh set). Use an account you own and respect Mercado Libre's terms of use.

### What you get

- Absolute rank per keyword: `keyword`, `page` and a `position` that keeps counting across pages.
- `seller` on every result, which turns a rank list into a competitive map on a marketplace where many stores sell the same product.
- `is_sponsored` per result, from the "Patrocinado" advertising component on the card.
- `sold_text`, the site's sales count text for the listing, so a high rank that converts is distinguishable from one that does not.
- Price at the rank the shopper sees: `price`, `original_price` when reduced, and `currency` per market (BRL, MXN, ARS, CLP or COP).
- `shipping` for the delivery promise, `labels` for card badges, and `total_results` from the site's own keyword count.
- Both identifiers: `catalog_id` for the catalogue product and `item_id` for the offer that won the slot.

### Input

Pass keywords, a market and how many result pages to capture.

```json
{
  "keywords": ["shampoo"],
  "locale": "br",
  "pages": 1,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "BR"
  },
  "delayMs": 1200,
  "callsPerSession": 60
}
```

- `keywords` (required): the search terms to rank. Duplicates are ignored.
- `locale`: `br`, `mx`, `ar`, `cl` or `co`. Default `br`.
- `pages`: result pages per keyword, 1 to 10. Search is paged at 48 results.
- `sessionCookies` (optional, secret): your logged-in Mercado Libre cookies, as a Cookie-Editor / EditThisCookie JSON export or a raw `Cookie` header. Only needed if the site walls anonymous browsing; see *Login: optional*.
- `proxyConfiguration`: residential inside the market's own country. Required. The default is BR. Use the country the account belongs to.

### Output

One dataset row per search result position.

```json
{
  "platform": "mercadolibre",
  "locale": "br",
  "keyword": "shampoo",
  "page": 1,
  "position": 1,
  "id": "MLB1234567890",
  "catalog_id": "MLB1234567890",
  "item_id": "MLB9876543210",
  "name": "Shampoo Anticaspa 400ml",
  "price": 39.9,
  "original_price": 59.9,
  "currency": "BRL",
  "rating": 4.7,
  "in_stock": true,
  "is_sponsored": true,
  "seller": "Loja Exemplo",
  "sold_text": "+1 mil",
  "shipping": "Frete grátis",
  "total_results": 128450,
  "product_url": "https://www.mercadolivre.com.br/p/MLB1234567890",
  "captured_at": "2026-09-12T03:00:00.000Z"
}
```

Values above are illustrative: they follow the shape of an anonymous Brazilian residential test run. Field names are exactly what the actor writes. `brand` is null on most rows, and `rating_count` is always null because the card shows only an average.

### Use cases

- Share of search by seller: count your `seller` inside the top N positions per keyword, against `total_results`.
- Ad-slot monitoring: track `is_sponsored` by `seller` to see who bids on your head terms.
- Rank versus sales: pair `position` with `sold_text` to find listings that outrank you without outselling you.
- Price benchmarking at rank, from `price` and `original_price`, across five currencies in one dataset.
- Free-shipping effect on rank, by comparing `shipping` labels across the top positions.

### Notes and limits

- A residential proxy inside the market's country is required. Listings are read in a browser because the site walls plain HTTP; if it walls the browser as well, the run stops with a message naming the wall, never an empty result, and `sessionCookies` from your own logged-in browser is the way past it.
- `pages` is capped at 10 per keyword and search is paged at 48 results, so about 480 positions per keyword.
- Results are deduplicated within a keyword, so a listing repeated across pages is counted once.
- Rank reflects the market's default relevance sort. Filters and custom sorts are not applied.

### FAQ

**Do I need a proxy?** Yes, residential inside the market's country: BR, MX, AR, CL or CO. The input defaults to BR. Without it the site answers with a login wall. If you supply `sessionCookies`, use the account's country.

**How many results can I get?** Up to 10 pages per keyword at 48 results per page, so roughly 480 positions per keyword per market.

**Does it need a login or an API key?** No. It works anonymously through the browser. `sessionCookies` is an optional fallback for when Mercado Libre walls anonymous traffic.

**Can the same product appear twice?** No. Results are deduplicated by listing id within a keyword, so a product repeated across pages keeps its first, best position.

# Actor input Schema

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

Search keywords to rank. Duplicates are ignored.

## `locale` (type: `string`):

Which storefront / locale.

## `pages` (type: `integer`):

Result pages to capture per keyword. Leave at 0 to capture every result page; the run stops as soon as the results end.

## `delayMs` (type: `integer`):

Pause between page fetches.

## `callsPerSession` (type: `integer`):

Re-mint the session after this many page fetches.

## `sessionCookies` (type: `string`):

Optional. The actor works anonymously through a browser on a residential exit in the market's country. Only if Mercado Libre walls you, paste the cookies of YOUR OWN logged-in Mercado Libre browser session: a JSON export from Cookie-Editor / EditThisCookie ("Export as JSON": an array of {name, value, domain, path, expires, httpOnly, secure, sameSite}) or a raw Cookie header ("name1=value1; name2=value2"). Only cookies for the market's own domain (e.g. mercadolivre.com.br) are used. Stored encrypted; values are never logged.

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

On the Apify platform this decides egress. A residential proxy in the storefront's country is required (BR for the default); with sessionCookies, use the account's country — the actor then keeps one sticky exit for the whole run. On our own servers it is ignored and our residential proxy is used.

## Actor input object example

```json
{
  "keywords": [
    "shampoo"
  ],
  "locale": "br",
  "pages": 1,
  "delayMs": 1200,
  "callsPerSession": 60,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "BR"
  }
}
```

# Actor output Schema

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

One row per search result position.

## `summary` (type: `string`):

Counts for the run: what was requested, captured, skipped and failed.

# 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": [
        "shampoo"
    ],
    "pages": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("attherateai/mercadolibre-rank").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": ["shampoo"],
    "pages": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("attherateai/mercadolibre-rank").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 '{
  "keywords": [
    "shampoo"
  ],
  "pages": 1
}' |
apify call attherateai/mercadolibre-rank --silent --output-dataset

```

## MCP server setup

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

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/DS8eoybHPwtV4zPBA/builds/szuuAdnnAVKQ8fQRG/openapi.json
