Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AliExpress Products, Variants, Reviews & Sellers Scraper — Python Example

Scrape AliExpress products by keyword, category or URL in Python — one clean row per product with every SKU variant and its live stock, shipping cost and delivery dates for your country, full specs, reviews and the seller's profile. No login, no affiliate API approval, no API key.

Apify Actor Python 3.10+ License: MIT

Working Python project around the AliExpress Scraper API Apify actor — 82 documented output fields, 50 delivery countries, 43 currencies, 20 languages, and up to 2,000 reviews per product.

What this does

AliExpress has no practical public API for bulk product data. The affiliate/dropshipping API is gated behind partner approval and returns a narrow slice of fields — no variant-level stock, no review text, no shipping quotes for a specific destination. For price monitoring, product research, dropshipping and review mining, scraping the public site is the working path.

This actor is a real unofficial AliExpress API: it collects the same publicly visible data a shopper in your target country sees, and returns it as structured JSON. It handles the anti-bot layer, per-region pricing and currency, SKU-matrix expansion with live stock, shipping-quote resolution per destination, and review pagination with filters.

One row = one product (no record soup)

Most scrapers scatter a single product across several record types and leave you to join them by ID. This one doesn't. Every row is one product, and everything belonging to it lives in a named field on that row:

  • skus — every purchasable variant with its own price, original price, live stock, availability and image
  • variantProperties — the option groups (Color, Size…) and their values
  • shipping — cost, carrier, delivery window, ETA dates, tracking, plus every alternative option
  • store — the seller: ratings, positive-feedback rate, years active, follower count, service scores
  • reviews — that product's reviews, as a list
  • reviewsSummary — the star breakdown plus recurring review themes with mention counts
  • specifications / specificationsFlat — specs as pairs, and as one flat object that exports cleanly to CSV

One product is one object you can hand straight to your code. Rows are written the moment each product is complete, so results start appearing within seconds and stopping a run early keeps everything already collected.

Use cases

  • Dropshipping product research — sort by orders sold, filter by price and ship-from country, and get per-variant stock so you never list a SKU that's out of stock.
  • Price and discount monitoring — track price, originalPrice and discountPercent per product per region on a schedule.
  • Variant/stock intelligence — real runs have returned 252 variants on a single listing, each with its own price and live stock level.
  • Shipping feasibility — cost, carrier, delivery window in days and ETA dates for your destination country, plus every alternative option.
  • Review mining — up to 2,000 reviews per product with 4 filters (all, buyer photos, follow-up, local) and 2 sort orders, plus aggregated themes like "good sound" ×240.
  • Seller due diligence — positive-feedback rate, years active, service scores, follower count, local-warehouse flag — included with product details at no extra charge.
  • Sourcing cross-check — compare AliExpress retail pricing against Alibaba wholesale ladders for the same product.

Requirements

  • Python 3.10+
  • A free Apify account — includes $5/month in credits (≈ 2,500 products from search, or 5,000 reviews)
  • No AliExpress account, cookies, or affiliate/dropshipping API approval

Quick start

git clone https://github.com/pro100chok/aliexpress-products-reviews-scraper-python.git
cd aliexpress-products-reviews-scraper-python
pip install -r requirements.txt
cp .env.example .env
# paste your APIFY_API_TOKEN
python main.py

main.py runs a dropshipping-screen pipeline: searches AliExpress for "wireless earbuds" sorted by orders sold with full details enabled, filters out anything whose shipping window to Germany exceeds 14 days, then reports each survivor's variant stock levels and seller positive-feedback rate.

Three scrape modes

scrapeType Input field What you get
search searchQueries, or startUrls (search / category URLs) One row per product found — price, discount, orders sold, rating, delivery estimate, promo badges.
productDetails productUrls (URLs or bare product IDs) The same rows, filled out: every variant, live stock, shipping options, specs, gallery, seller.
reviews productUrls (URLs or bare product IDs) One row per product with its reviews attached as a list.

Which product inputs are accepted?

All of these work in productUrls — bare IDs, any regional domain, any tracking suffix:

3256810343908999
https://www.aliexpress.com/item/3256810343908999.html
https://www.aliexpress.us/item/3256810343908999.html
https://de.aliexpress.com/item/3256810343908999.html
https://www.aliexpress.com/item/3256810343908999.html?spm=a2g0o.productlist.0.0

You can also mix search URLs, category URLs and product URLs in startUrls — product pages are detected automatically and scraped as full details, everything else is paginated as a listing.

How it works

  1. You pick a scrapeType and supply keywords, listing URLs, or product URLs/IDs.
  2. region, currency and locale are applied to every request, so prices, shipping quotes and delivery ETAs come back for your actual target market.
  3. Listing pages are walked up to maxPages per keyword (60 products per page, up to 60 pages), with sortBy, minPrice / maxPrice, filters, shipFromCountry and categoryId narrowing the set.
  4. With includeProductDetails on, each product page is opened for its SKU matrix, live stock, shipping options, specs and seller profile.
  5. With includeReviews on, reviews are paginated per product under reviewsFilter / reviewsSort up to maxReviewsPerProduct.
  6. Listings that hit anti-bot pressure keep retrying for up to maxRetryMinutes (default 15) instead of failing the run.
  7. maxItems is a hard ceiling — the run stops the moment it's hit, so you never pay for more than you asked for.

Example: best sellers that ship to Germany

import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_API_TOKEN"])

run = client.actor("pro100chok/aliexpress-scraper").call(run_input={
    "scrapeType": "search",
    "searchQueries": ["wireless earbuds"],
    "sortBy": "orders",
    "maxPrice": 20,
    "includeProductDetails": True,
    "region": "DE",
    "currency": "EUR",
    "locale": "de_DE",
    "maxItems": 40,
})

for p in client.dataset(run["defaultDatasetId"]).iterate_items():
    ship = p.get("shipping") or {}
    store = p.get("store") or {}
    print(f"{p.get('price'):>7} {p.get('currency')}  "
          f"⭐ {p.get('rating')}  {p.get('ordersCount') or 0:>7} sold  "
          f"{ship.get('deliveryDaysMax') or '?':>3}d  "
          f"{store.get('positiveRate') or '?'}%  {p.get('title', '')[:44]}")

Example output (trimmed — a full row carries 70+ fields)

{
  "type": "product",
  "productId": "3256806779925038",
  "productUrl": "https://www.aliexpress.com/item/3256806779925038.html",
  "title": "Digital Display Bluetooth Earphones with Mic TWS E6S Wireless Earbuds",
  "price": 0.99,
  "originalPrice": 6.81,
  "discountPercent": 85,
  "currency": "USD",
  "rating": 4.9,
  "reviewsCount": 13677,
  "ordersCount": 100000,
  "ordersCountExact": 120058,
  "stockTotal": 4049,
  "maxPerBuyer": 1,
  "isChoice": true,
  "skuCount": 5,
  "variantProperties": [
    { "name": "Color", "values": ["WHITE", "Blue", "green", "black", "Pink"] }
  ],
  "skus": [
    {
      "skuId": "12000038883449394",
      "attributes": [{ "name": "Color", "value": "green" }],
      "price": 0.99,
      "originalPrice": 6.81,
      "stock": 4,
      "available": true,
      "image": "https://ae-pic-a1.aliexpress-media.com/kf/S69c665aed7f84b1393dea408af0ae0205.jpg"
    }
  ],
  "shipping": {
    "cost": 1.99,
    "free": false,
    "provider": "AliExpress Selection Standard Shipping",
    "shipsFrom": "China",
    "shipsTo": "US",
    "deliveryDaysMin": 6,
    "deliveryDaysMax": 10,
    "deliveryEtaMin": "Aug. 09",
    "deliveryEtaMax": "Aug. 13",
    "tracking": true
  },
  "store": {
    "name": "Stone's Store",
    "storeId": "1103573332",
    "sellerId": "2678280160",
    "country": "China",
    "yearsActive": 2,
    "positiveRate": 100.0,
    "scoreCommunication": 4.8,
    "scoreAsDescribed": 5.0,
    "followers": 26131
  },
  "reviewsSummary": {
    "average": 4.9,
    "positiveRate": 92.8,
    "withPhotos": 633,
    "highlights": [{ "text": "good sound", "count": 240, "sentiment": "positive" }]
  },
  "specificationsFlat": { "Material": "ABS,Plastic", "Battery Capacity[mAh]": "1200" },
  "coupons": [{ "text": "$2.00 off on $18.00", "promotionId": "5000000213006678" }],
  "searchQuery": "wireless earbuds",
  "position": 1,
  "region": "US",
  "scrapedAt": "2026-08-04T09:12:41Z"
}

Input parameters

Parameter Type Default Description
scrapeType string search search, productDetails, reviews.
searchQueries string[] Keywords, one per line.
startUrls object[] [] Search, category or product URLs — mixed freely.
productUrls string[] [] Product URLs or bare product IDs.
maxItems integer 100 Hard cap on dataset rows (= max products).
maxPages integer 2 Listing pages per keyword. 60 products/page, up to 60 pages.
maxConcurrency integer 6 Parallel requests.
maxRetryMinutes integer 15 How long to keep retrying a blocked listing before giving up.
sortBy string default default, orders, newest, priceAsc, priceDesc.
minPrice / maxPrice integer Price band, in the selected currency.
filters string[] [] Quick filters (free shipping, 4★+, etc.).
shipFromCountry string Restrict to items shipping from a given country (e.g. local warehouses).
categoryId string Scope a search to one AliExpress category ID.
includeProductDetails boolean false Variants, live stock, shipping, specs, seller.
includeReviews boolean false Attach reviews to each product row.
maxReviewsPerProduct integer 20 Up to 2,000.
reviewsFilter string all all, withPhotos, additional, localReviews.
reviewsSort string default default, newest.
includeDescription boolean false Full product description text.
includeSearchInsights boolean false Keyword-level insights report per query.
region string US 50 delivery countries — drives price, shipping and ETA.
currency string USD 43 currencies.
locale string en_US 20 languages.
proxyConfiguration object Residential Apify proxy config.

More examples

File Demonstrates
examples/01_basic_usage.py Keyword search — price, discount, orders sold, rating.
examples/02_product_details.py Full detail rows for specific product IDs: variants, stock, shipping, seller.
examples/03_reviews_mining.py Reviews with photos + aggregated review themes for a product.
examples/04_export_to_csv.py Variant-level stock/price sheet with pandas (one row per SKU).
examples/05_export_to_google_sheets.py Daily price + stock snapshot pushed to a Google Sheet.

How much does it cost to scrape AliExpress?

Event Free plan Paid plans from
Product from search $2.00 / 1,000 $1.50 / 1,000
Product with full details $6.00 / 1,000 $4.40 / 1,000
Customer review $1.00 / 1,000 $0.40 / 1,000
Keyword insights report $3.00 / 1,000 $1.80 / 1,000
Job Free plan Paid plans from
1,000 products from search $2.00 $1.50
1,000 products with full details $6.00 $4.40
500 products + 20 reviews each $13.00 $6.20
100 products + 200 reviews each $20.60 $8.44

Reviews are billed per review, not per request, so a product with 2,000 reviews costs the same whether it takes 1 request or 100. Leave includeProductDetails off for a fast, cheap price-and-orders sweep at the listed-product rate.

FAQ

How is this different from the AliExpress affiliate/dropshipping API? That API needs partner approval and returns a narrow field set — no variant-level stock, no review text, no shipping quote for a specific destination country. This actor returns what a shopper in your target region actually sees, with no application.

Do prices come back in my currency? Yes. region + currency + locale are applied per request, so price, shipping.cost and the delivery ETA are all for your target market.

How many variants will I get — a sample or all of them? All of them. A real run returned 252 SKUs on a single listing, each with its own price, original price and live stock.

Can I get exact order counts instead of "5,000+"? Where AliExpress exposes it, yes — ordersCountExact carries the precise number alongside the parsed ordersCount and the raw ordersText.

Is the seller profile an extra charge? No. store comes with product details at no separate "store lead" fee.

How do I get reviews only from buyers in my country? Set reviewsFilter: "localReviews". withPhotos restricts to reviews with buyer photos; additional returns follow-up reviews.

What are review "highlights"? reviewsSummary.highlights is AliExpress's own aggregation of recurring phrases with mention counts and sentiment — a fast way to read 10,000 reviews without reading them.

Why would a listing return fewer products than maxPages × 60? AliExpress stops serving results when a query is exhausted or over-filtered. Narrow price bands, shipFromCountry and categoryId all shrink the pool.

Does stopping a run early lose my data? No. Rows are pushed as each product completes, so everything already collected stays in the dataset.

Can I use it from AI agents? Yes — the actor is callable over MCP, so an agent can ask for "the 20 best-selling wireless earbuds under $10 that ship to Germany in under 14 days, with variant stock and seller feedback rate" in one call.

Is scraping AliExpress legal? This actor collects only publicly visible product data — no login, no paywall. Scraping public pages is generally lawful in the US and EU, but how you use the data (GDPR for reviewer names/countries, copyright on images) is your responsibility.

Related actors

  • Alibaba Scraper — wholesale side: quantity price ladders, MOQ and verified supplier audit data.
  • Amazon Scraper — compare the same SKU's Amazon resale price and review volume.
  • TikTok Shop Scraper — catch trending products before they saturate.

See all my actors at apify.com/pro100chok.

License

MIT — see LICENSE.


Built on top of the AliExpress Scraper API Apify actor.