A minimal Node.js example showing how to scrape Mercado Libre product listings using the Mercado Libre Listings Scraper Apify actor. This repo does not implement a scraper from scratch — it calls a ready-made Apify actor that handles search, pagination, proxies, and parsing for you.
- Calls the
piotrv1001/mercado-libre-listings-scraperApify actor - Passes a list of search queries and proxy configuration as input
- Waits for the run to finish
- Fetches results from the run's default dataset
- Prints each scraped listing to the console
- Node.js 18 or newer
- An Apify account (free tier works)
- Your Apify API token — find it under Settings → Integrations
npm installCopy the example env file and add your token:
cp .env.example .envThen edit .env:
APIFY_TOKEN=your_apify_token_herenpm startYou'll see a link to your dataset in the Apify console plus each listing logged to stdout.
import { ApifyClient } from 'apify-client';
import 'dotenv/config';
// Initialize the ApifyClient with your Apify API token
// Set APIFY_TOKEN in your .env file (copy .env.example to get started)
const client = new ApifyClient({
token: process.env.APIFY_TOKEN,
});
// Prepare Actor input
const input = {
"searchQueries": [
"iphone 15"
],
"proxyConfiguration": {
"useApifyProxy": true,
"apifyProxyGroups": [
"RESIDENTIAL"
]
}
};
// Run the Actor and wait for it to finish
const run = await client.actor("piotrv1001/mercado-libre-listings-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/docsSee sample-output.json for a full example response. Each listing item includes:
id,siteId,title,permalinkprice,currency,originalPrice,discountPercent,installmentscondition,availableQuantity,soldQuantitythumbnailUrl,imageslocation(city, state, country)seller(nickname, official store flag, reputation, power seller status)freeShipping,fullShippingratingAverage,reviewCountattributes(brand, model, capacity, etc.)variations,scrapedAt
- Price monitoring — track competitor prices and discounts across Mercado Libre marketplaces (MLA, MLM, MLB, and more)
- Market research — analyze product availability, seller reputation, and review counts in Latin American e-commerce
- Dropshipping — discover trending products by
soldQuantityand import catalog data into your store - Lead generation — extract official stores and top sellers for outreach
- Data enrichment — pull product attributes, images, and ratings to enrich your own catalog
Open the Mercado Libre Listings Scraper on Apify
- Full guide: How to scrape Mercado Libre product listings
MIT
