I wanted prices, sold counts, ratings and seller names off AliExpress. A plain HTTP client does not return them. The first response is a shell. The fields show up only after the page runs its own scripts, and the site treats a lot of automated traffic as hostile. Layouts move. A scraper that worked last month comes back empty this month.
Keeping that alive is a second job. I stopped doing it. I run cryptosignals/aliexpress-scraper on Apify. You send a keyword or a list of product URLs. You get JSON back. The current price is on that page, so I am not copying it here.
action is search. query is the keyword. maxItems, country, currency and sort are optional. Sort values the actor accepts: default, total_tranpro_desc, price_asc, price_desc, latest.
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("cryptosignals/aliexpress-scraper").call(run_input={
"action": "search",
"query": "wireless earbuds",
"maxItems": 50,
"sort": "total_tranpro_desc",
"country": "US",
"currency": "USD",
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item["title"], item.get("price"), item.get("soldCount"))
Set action to product and pass urls.
run = client.actor("cryptosignals/aliexpress-scraper").call(run_input={
"action": "product",
"urls": ["https://www.aliexpress.com/item/EXAMPLE.html"],
})
| Field | What it is |
|---|---|
title | Product title |
price | Current price |
originalPrice | List price, when the page has one |
currency | Currency of those prices |
soldCount | Units sold |
starRating | Average rating |
reviewCount | Number of reviews |
sellerRating | Seller feedback rate |
store | Store name |
productUrl | Product page URL |
imageUrl | Main image |
Run it from the Apify page or from the API. Same actor either way. Input reference is the actor's own README, not this post.