# AliExpress Mexico Scraper: Product Prices & Search API (`latinamericadata/aliexpress-mexico`) Actor

Scrape AliExpress Mexico search results with verified MXN prices, discounts, ratings, seller names when available, product links and pagination. Export to JSON, CSV or Excel.

- **URL**: https://apify.com/latinamericadata/aliexpress-mexico.md
- **Developed by:** [Latin America Data](https://apify.com/latinamericadata) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 product delivereds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## AliExpress Mexico Scraper and Product Search API

Collect AliExpress product listings for the Mexican market with verified **MXN prices** and **Mexico as the shipping destination**. Use keyword searches for retail price monitoring, competitive research and catalog discovery.

### What you get

- Product title, ID, SKU and original product URL.
- Displayed selling price, original price, currency and discount when present.
- Rating, sales text, seller name and promotion text when the listing exposes them.
- Page, search term, collection timestamp and a separate run summary.
- JSON, CSV and Excel exports through the Apify dataset.

Only products with an identifier, title and verified MXN price are billed. Missing optional fields remain null; stock availability is not inferred from a search listing.

### Quick start

Run a small sample:

```json
{"term":"audifonos","maxItems":3}
```

Collect multiple searches:

```json
{"searchTerms":["teclado mecanico","mouse gamer"],"maxRuntimeSecs":240}
```

There is **no default product or page limit**. The actor follows available search pages until the source ends, your optional limits are reached, the time budget expires or your Apify spending limit is reached. A 240-second runtime budget is the default; raise it up to 7200 seconds for longer searches. Broad searches can produce many results, but source-reported totals are estimates, not a promise that every product can be retrieved.

### Inputs

| Input | Purpose |
|---|---|
| term | Product, brand or category keywords; defaults to audifonos. |
| searchTerms | Optional list of up to 100 searches, replacing term. |
| maxItems | Optional global limit on unique delivered products. |
| maxPages | Optional page limit per search. |
| startPage | First page; defaults to 1. |
| maxRuntimeSecs | Whole-search time budget in seconds. |
| requestTimeoutSecs | Maximum time per request. |

### Price

**USD 0.003 per delivered product**, plus **Apify platform usage paid by the person running the actor**, including compute, storage, data transfer and automatic proxy traffic. For example, 1,000 delivered products cost USD 3 in product fees, plus platform usage. Empty-result and error diagnostics are not billed as products.

### Data quality and limits

AliExpress can show new-buyer offers, minimum variant prices, sponsored results and recommendations. These are the prices displayed in the search listing, not a checkout quote or a guaranteed price for every variant. Promotion text is retained. `is_recommendation` flags the site's explicitly marked SEO recommendations and `search_result_type` preserves the search classification. Not every unrelated recommendation is identifiable from the source. Shipping charges and taxes may differ at checkout.

Results are deduplicated by product ID across pages and terms; the first occurrence is kept. Completed pages are uploaded immediately. A late block or connection failure preserves earlier products and marks the run summary `partial`. Confirmed empty pages produce a non-chargeable `no_results` diagnostic. Access challenges are `blocked`, never empty results. A non-terminal repeated page is reported as an incomplete run, not silently claimed as full coverage.

### Integration

Call this actor from Apify's API, schedules or your automation tools, then read the default dataset. `RUN_SUMMARY` contains completion status, stopping reason, delivered and charged counts, first-result time and request measurements. You never need to configure proxies or browsers.

### Independence

This is an independent data-extraction tool by Latin America Data. It is not affiliated with, endorsed by or an official API of AliExpress or Alibaba. Respect applicable terms and use the collected data responsibly.

# Actor input Schema

## `term` (type: `string`):

Producto, marca o categoria.

## `searchTerms` (type: `array`):

Opcional. Sustituye term. Se eliminan productos duplicados entre busquedas.

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

Opcional. Sin este limite, continua hasta agotar resultados, tiempo o presupuesto.

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

Opcional. No hay un limite de paginas predeterminado.

## `startPage` (type: `integer`):

Primera pagina que se consulta.

## `maxRuntimeSecs` (type: `integer`):

Preserva resultados anteriores cuando se alcanza este presupuesto de tiempo.

## `requestTimeoutSecs` (type: `integer`):

Espera maxima por respuesta del sitio.

## Actor input object example

```json
{
  "term": "audifonos",
  "startPage": 1,
  "maxRuntimeSecs": 240,
  "requestTimeoutSecs": 30
}
```

# Actor output Schema

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

No description

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

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("latinamericadata/aliexpress-mexico").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("latinamericadata/aliexpress-mexico").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 '{}' |
apify call latinamericadata/aliexpress-mexico --silent --output-dataset

```

## MCP server setup

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

```

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/LM5QBiaUSpBQGwDWM/builds/syjaa5eSoQlocwsw5/openapi.json
