This example shows how to scrape Carousell listings using the Carousell Listings Scraper actor on Apify — no browser automation or HTML parsing required. The actor handles all the scraping; this repo shows you how to call it from Node.js, pass search parameters, and work with the results.
- Calls the Carousell Listings Scraper actor via the Apify API
- Passes a search URL and proxy configuration as input
- Waits for the actor run to complete
- Fetches results from the run's dataset
- Prints each listing to the console
- Node.js v18 or later
- An Apify account
- An Apify API token
npm installCopy .env.example to .env and add your Apify API token:
cp .env.example .envThen edit .env:
APIFY_TOKEN=your_apify_token_herenpm startimport { 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 = {
"startUrls": [
{
"url": "https://www.carousell.sg/search/?query=iphone&sort_by=3"
}
],
"proxyConfiguration": {
"useApifyProxy": true,
"apifyProxyGroups": [
"RESIDENTIAL"
],
"apifyProxyCountry": "SG"
}
};
// Run the Actor and wait for it to finish
const run = await client.actor("piotrv1001/carousell-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. Each listing returns:
| Field | Description |
|---|---|
listingId |
Unique Carousell listing ID |
url |
Direct URL to the listing |
title |
Listing title |
price |
Listed price (numeric) |
currency |
Currency code (e.g. SGD) |
condition |
Item condition (e.g. Like new, Well used) |
description |
Seller's description text |
seller.username |
Seller's Carousell username |
seller.profileUrl |
Link to seller's profile |
images |
Array of image URLs |
category |
Listing category |
timePosted |
When the listing was posted |
views |
Number of views |
likes |
Number of likes |
scrapedAt |
Timestamp of when data was scraped |
- Price research — track second-hand market prices for electronics, furniture, or fashion across Carousell regions
- Competitive analysis — monitor competitor listings and pricing strategies in specific categories
- Deal alerts — build a pipeline that flags listings below a target price threshold
- Inventory monitoring — track how quickly certain items sell and at what price points
- Market research — aggregate listing data to understand supply and demand trends for specific product categories
Open the Carousell Listings Scraper on Apify
MIT
