DEV Community

voiddo
voiddo

Posted on Originally published at voidd0.github.io

AliExpress Scraper: how to get Prices, Sold Counts as JSON or CSV (Python, API, no code)

Scrape AliExpress search results into product rows: product ID, title, sale price, original price, discount, star rating, units sold, Choice and shipping flags, delivery estimate, image and link.

This tutorial shows what the Actor v0iddo/aliexpress-scraper returns, how to run it on the Apify Store without code, and how to call it from Python and cURL.

What data you get

One row per result. Every row can be downloaded as JSON, CSV, Excel or HTML, or read through the API.

Field Label Type Example
productId Product ID text 3256811621288203
title Title text 2026 New Air 3【 Pro3 】 Bluetooth Wireless Earbuds With Heart Rate M...
price Price number 13.52
discountPercent Discount % number 76
rating Stars number 4.9
sold Sold number 4000
choice Choice true/false false
url Product URL URL https://www.aliexpress.com/item/3256811621288203.html
searchTerm searchTerm text wireless earbuds
page page number 1
position position number 1
originalPrice originalPrice number 57.55
currency currency text USD
soldText soldText text 4,000+ sold
freeShipping freeShipping true/false false
ad ad true/false false
image image text https://ae-pic-a1.aliexpress-media.com/kf/Sa57a4580c1274b01988d5df3...

Real rows from a run of the Actor (fields that name people are left out):

[
  {
    "searchTerm": "wireless earbuds",
    "page": 1,
    "position": 1,
    "productId": "3256811621288203",
    "title": "2026 New Air 3【 Pro3 】 Bluetooth Wireless Earbuds With Heart Rate Monitoring, Active Noise Cancellation Headphones, Waterproof for Daily...",
    "price": 13.52,
    "originalPrice": 57.55,
    "discountPercent": 76,
    "currency": "USD",
    "rating": 4.9,
    "sold": 4000,
    "soldText": "4,000+ sold",
    "choice": false,
    "freeShipping": false,
    "ad": false,
    "image": "https://ae-pic-a1.aliexpress-media.com/kf/Sa57a4580c1274b01988d5df3fa8e76cbx.jpg",
    "url": "https://www.aliexpress.com/item/3256811621288203.html"
  },
  {
    "searchTerm": "wireless earbuds",
    "page": 1,
    "position": 2,
    "productId": "3256813268294660",
    "title": "Wireless Earbuds, 40Hrs Bluetooth 5.3 Headphone in Ear with 4 ENC Mics Hi-Fi Stereo Wireless Earphones, LED Display, Touch Control, IP7 W...",
    "price": 11.33,
    "originalPrice": 39.15,
    "discountPercent": 71,
    "currency": "USD",
    "choice": false,
    "freeShipping": true,
    "ad": false,
    "image": "https://ae-pic-a1.aliexpress-media.com/kf/S2e71d7a189b54c1c9695895179e6c900B.jpg",
    "url": "https://www.aliexpress.com/item/3256813268294660.html"
  }
]
Enter fullscreen mode Exit fullscreen mode

No code: run it on the Apify Store

  1. Open the AliExpress Scraper page on Apify.
  2. Fill in the input form. An example input is already filled in.
  3. Press Start, wait for the run to finish, and download the results as JSON, CSV or Excel from the Output tab.

The input that is pre-filled on the Actor page:

{
  "searchTerms": [
    "wireless earbuds"
  ],
  "maxPages": 1,
  "maxItems": 20
}
Enter fullscreen mode Exit fullscreen mode

Ready-made examples

Saved inputs on Apify: run one as it is, or copy it and change the values.

Python (apify-client)

Get your API token in Apify Console under Settings, then Integrations. The Actor id is v0iddo/aliexpress-scraper.

from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run_input = {'searchTerms': ['wireless earbuds'], 'maxPages': 1, 'maxItems': 20}

run = client.actor("v0iddo/aliexpress-scraper").call(run_input=run_input)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
Enter fullscreen mode Exit fullscreen mode

cURL

curl -X POST "https://api.apify.com/v2/acts/v0iddo~aliexpress-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchTerms": ["wireless earbuds"], "maxPages": 1, "maxItems": 20}'
Enter fullscreen mode Exit fullscreen mode

Good to know

  • Prices are in US dollars as shown to a visitor shipping to the United States.
  • Units sold is the figure AliExpress shows, such as 1,000+ sold; soldText keeps the original wording.
  • AliExpress shows at most 60 result pages (about 3,600 products) for one search; give more or narrower search terms to collect more products.

Price

$1.50 per 1,000 results. You pay per result row. There is no separate charge per run. Higher Apify plans pay less per result, down to $1.05 per 1,000.

FAQ

What data does the AliExpress Scraper return?

Each result is one row in an Apify dataset. Fields include productId, title, price, discountPercent, rating, sold, choice, url, and more. The table above shows every field with an example value.

Can I use it without writing code?

Yes. Open the Actor page on Apify, fill in the input form (an example is already filled in), press Start, and download the results as JSON, CSV, Excel or HTML. You can also schedule runs there.

How much does it cost?

$1.50 per 1,000 results. You pay per result row. There is no separate charge per run. Higher Apify plans pay less per result, down to $1.05 per 1,000. A new Apify account gets $5 of platform credit every month.

Links

Top comments (0)