# AliExpress Search Scraper: Prices, Sold Counts & Ratings (`panix/aliexpress-scraper`) Actor

Scrape AliExpress search results and categories: price, discount, exact sold count, rating, delivery estimate, ships-from, Choice and sponsored flags, rank and listing date, for 60 countries. For dropshipping product research, price tracking and trend analysis.

- **URL**: https://apify.com/panix/aliexpress-scraper.md
- **Developed by:** [PANIX AI LAB](https://apify.com/panix) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 92.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 products

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## AliExpress Search Scraper: Prices, Sold Counts & Ratings

Find winning products and suppliers on AliExpress. Give it a search or a category and get price, discount, exact sold count, rating and delivery time for every product, as a clean table.

- **Exact sold counts**, not just "5,000+", plus rating, ships-from country, delivery estimate and AliExpress Choice and sponsored flags.
- **Prices for your market**: pick the ship-to country, currency and language.
- **Watchlist mode**: scheduled runs flag new products and price changes. No AliExpress account, cookies or API key.

**Try it now:** the input is already filled in (a search for "wireless earbuds", 20 products). Click **Start** and the results appear in a table you can export to Excel, CSV or JSON. That example run costs a few cents, which the $5 of free monthly credit on Apify's free plan covers.

**Price:** from **$1.20 per 1,000 products**, and you pay only for results you get. The full price table is in the Pricing section below.

### Example result

One result, shortened. Every field is described in the Output section below.

```json
{
  "productId": "1005005828306541",
  "title": "4MM Thick EVA Yoga Mats Anti-slip Sport Fitness Mat Blanket For Exercise Yoga And Pilates Gymnastics Mat Fitness Equipment",
  "url": "https://www.aliexpress.com/item/1005005828306541.html",
  "price": 1.09,
  "originalPrice": 23.27,
  "discountPercent": 95,
  "currency": "USD",
  "rating": 4.4,
  "soldCount": 6552,
  "soldText": "5,000+ sold",
  "shipFrom": "CN",
  "deliveryDaysMin": 8,
  "deliveryDaysMax": 12,
  "isChoice": true,
  "listedDate": "2023-07-12"
}
```

### What you get

Turn any AliExpress search, search link or category page into a clean product table: price, price before discount, discount, **exact sold count**, rating, ships-from country, delivery estimate, AliExpress Choice and sponsored flags, listing date, search rank and images. Pick the ship-to country, currency and language, and you get the catalogue and prices a shopper in that market sees. Add a watchlist and scheduled runs tell you which products are **new** and which **changed price** since the last run.

No AliExpress account, cookies or API key. Export to JSON, CSV or Excel, or pull the data through the Apify API.

### Who uses it

- **Dropshippers and store owners**: find proven best sellers (sort by most orders, keep products sold 1,000+ times and rated 4.5+), check supplier prices and delivery times before importing products to Shopify or WooCommerce.
- **E-commerce and Amazon/TikTok Shop sellers**: source products and compare AliExpress prices with your own.
- **Price trackers and deal sites**: schedule the same searches daily and get only new products and price drops.
- **Market and trend researchers**: measure demand per niche with exact sold counts, see which products are new (listed in the last 30 days) and already selling, and track search rankings over time.
- **Agencies and AI builders**: feed structured AliExpress product data into spreadsheets, BI tools, LLM agents or RAG pipelines.

### What you get for each product

| Group | Fields |
|---|---|
| Product | `productId` (the ID in `aliexpress.com/item/<id>.html` links), `title`, `url`, `imageUrl`, `images` |
| Price | `price`, `originalPrice`, `discountPercent`, `currency`, `priceText` (as shown), `isNewShopperPrice`, `bulkPriceText` |
| Demand | `soldCount` (exact number, not the rounded "5,000+" label), `soldText`, `rating`, `isTopSelling`, `isLowestPrice90Days`, `badges` |
| Delivery | `shipFrom`, `freeShipping`, `deliveryDaysMin`, `deliveryDaysMax`, `deliveryDateMin`, `deliveryDateMax` |
| Listing | `isChoice`, `isSponsored`, `categoryId`, `categoryPath`, `listedDate`, `daysListed` |
| Search | `searchTerm`, `position` (rank in the results, sponsored listings included), `page`, `sourceType`, `sourceUrl` |
| Market | `shipTo`, `currency`, `language`, `scrapedAt` |
| Watchlist | `changeType` (new, priceChanged, unchanged), `previousPrice`, `priceChange`, `priceChangePercent`, `firstSeenAt` |

### Why this scraper

- **Exact sold counts.** `soldCount` is the real number of orders AliExpress records for the listing (6,552), next to the rounded label it shows shoppers ("5,000+ sold").
- **Honest prices.** Many AliExpress prices shown to visitors are one-time welcome deals for new shoppers (often $1.09 for one piece). `isNewShopperPrice` marks them, so they don't distort your price research.
- **The right product ID.** US search pages use internal IDs (3256...) that differ from the product page IDs (1005...). Every row carries the ID used in product links and in AliExpress's own APIs, so rows match across countries and tools.
- **60 ship-to countries, 43 currencies, 13 languages.** The catalogue, prices, ships-from warehouses and delivery estimates follow the market you choose. If AliExpress serves a different currency or language for that market, the run log and SUMMARY say so.
- **New and fast-moving products.** `listedDate`, `daysListed` and the "Listed within the last N days" filter find products that are new on AliExpress and already selling.
- **Search rank tracking.** `position` and `page` record where each product appears for each search term, sponsored listings included and flagged.
- **Watchlists for scheduled runs.** The Actor remembers products per watchlist and market for 90 days: every product gets `changeType` and, when the price changed, `previousPrice`; or you get only new products and price changes, and pay only for those.
- **Real price changes, not discount noise.** AliExpress gives each visit its own mix of coupons and subsidies, so the shown price of the same product can differ from one visit to the next (in our tests, 49 of 57 products did a minute apart). Watchlists compare the seller's own prices behind the card, so `priceChanged` means the seller changed the price.
- **Fair billing.** Products left out by your filters, duplicates (AliExpress repeats products across pages) and unchanged watchlist products are never charged. A failed search costs nothing beyond the start fee.
- **Built to keep running.** AliExpress answers fast scrapers with a slider captcha. The Actor spreads pages over many IP addresses, retries a blocked page at once on a new IP, and moves pages that keep getting blocked to residential IPs at no extra cost to you. A run is never failed because a few pages were blocked.
- **Fast and light.** Plain HTTP requests, no browser: about 1,000 products in 30 seconds and 2,500 in 65-80 seconds at the default 512 MB in our tests.

### Coming from another AliExpress scraper?

| Common problem | How this Actor handles it |
|---|---|
| Sold counts come as "5,000+ sold" text | Exact `soldCount` number, plus the label |
| $1.09 welcome-deal prices look like real prices | `isNewShopperPrice` flags them |
| Product IDs don't match product page links | `productId` is always the ID used in `/item/<id>.html` |
| The same product shows up several times | Duplicates within a search and across searches are removed, and not charged |
| Runs fail or time out when AliExpress shows a captcha | Blocked pages are retried on new IPs and then residential IPs; partial results are kept |
| Prices only for the US store | 60 ship-to countries, 43 currencies, 13 languages |
| Paying again for products you already have | Watchlists return only new products and price changes |
| Price trackers raise alerts every run because AliExpress varies its visitor discounts | Watchlists flag a price change only when the seller's own price changed |
| High start fees on small scheduled runs | $0.001 per run start |

### How to use it

1. Click **Try for free**.
2. Type your **Search terms** (one per line), or paste AliExpress search or category links.
3. Set **Max products per search**, a sort order and any filters.
4. Pick the **Ship to** country, currency and language.
5. Click **Start**, then download the results as JSON, CSV or Excel.

### Input examples

**Best sellers for a keyword**

```json
{
  "searchTerms": ["wireless earbuds"],
  "maxItems": 200,
  "sort": "orders",
  "minOrders": 1000,
  "minRating": 4.5
}
```

**Fast delivery from US warehouses, $10-30, free shipping**

```json
{
  "searchTerms": ["camping lantern", "solar garden light"],
  "shipFrom": "US",
  "freeShippingOnly": true,
  "minPrice": 10,
  "maxPrice": 30,
  "maxItems": 100
}
```

**Germany, in euros and German**

```json
{
  "searchTerms": ["led strip"],
  "shipTo": "DE",
  "currency": "EUR",
  "language": "de_DE",
  "maxItems": 300
}
```

**A category page and a search link you copied from AliExpress** (its filters and sorting are kept)

```json
{
  "startUrls": [
    { "url": "https://www.aliexpress.com/category/100003109/women-clothing.html" },
    { "url": "https://www.aliexpress.com/w/wholesale-yoga-mat.html?SortType=price_asc" }
  ],
  "maxItems": 500
}
```

**New products that already sell** (listed in the last 30 days, sold at least 50 times)

```json
{
  "searchTerms": ["phone holder", "pet hair remover"],
  "sort": "orders",
  "listedWithinDays": 30,
  "minOrders": 50,
  "maxItems": 300
}
```

**Daily price and new-product tracking** (schedule this; the first run returns everything, later runs only what is new or whose price changed)

```json
{
  "searchTerms": ["mechanical keyboard"],
  "sort": "orders",
  "maxItems": 500,
  "watchlistName": "keyboards-us",
  "onlyNewProducts": true,
  "includePriceChanges": true
}
```

### Sample output

```json
{
  "productId": "1005005828306541",
  "title": "4MM Thick EVA Yoga Mats Anti-slip Sport Fitness Mat Blanket For Exercise Yoga And Pilates Gymnastics Mat Fitness Equipment",
  "url": "https://www.aliexpress.com/item/1005005828306541.html",
  "price": 1.09,
  "originalPrice": 23.27,
  "discountPercent": 95,
  "currency": "USD",
  "priceText": "US $1.09",
  "isNewShopperPrice": true,
  "bulkPriceText": "$1.04 each, ≥ 2 pieces",
  "rating": 4.4,
  "soldCount": 6552,
  "soldCountIsExact": true,
  "soldText": "5,000+ sold",
  "shipFrom": "CN",
  "freeShipping": null,
  "deliveryDaysMin": 8,
  "deliveryDaysMax": 12,
  "deliveryDateMin": "2026-11-12",
  "deliveryDateMax": "2026-11-16",
  "isChoice": true,
  "isSponsored": false,
  "isTopSelling": false,
  "isLowestPrice90Days": false,
  "badges": ["$1.04 each, ≥ 2 pieces", "New shoppers save $22.18"],
  "categoryId": "200001928",
  "categoryPath": ["18", "100005371", "200001927", "200001928"],
  "listedDate": "2023-07-12",
  "daysListed": 1212,
  "imageUrl": "https://ae-pic-a1.aliexpress-media.com/kf/Scbde5dd4b6ef4ff28324a183fe65a7aeb.jpg",
  "images": ["https://ae-pic-a1.aliexpress-media.com/kf/Scbde5dd4b6ef4ff28324a183fe65a7aeb.jpg", "..."],
  "position": 1,
  "page": 1,
  "searchTerm": "yoga mat",
  "sourceType": "search",
  "sourceUrl": "https://www.aliexpress.com/w/wholesale-yoga-mat.html?SearchText=yoga%20mat",
  "shipTo": "US",
  "language": "en_US",
  "scrapedAt": "2026-11-05T08:27:20.947Z"
}
```

With a watchlist, rows also carry `changeType`, `previousPrice`, `priceChange`, `priceChangePercent` and `firstSeenAt`. The run's key-value store has **SEARCHES** (one status line per search: pages read, products delivered, why it stopped) and **SUMMARY** (totals, products left out per filter, the market AliExpress served, request statistics).

### Pricing

Pay per event, no monthly fee, platform usage included:

| Event | Price |
|---|---|
| Product | $0.002 per product on the Free plan ($2.00 per 1,000), $0.0018 on Bronze ($1.80 per 1,000), $0.0015 on Silver ($1.50 per 1,000), $0.0012 on Gold and higher ($1.20 per 1,000) |
| Actor start | $0.001 per run (per GB of memory; the default 512 MB counts as one) |

Products left out by filters, duplicates, unchanged watchlist products and failed searches are free. Example on Bronze: 1,000 products cost $1.80 plus $0.001 for the run. Set a maximum charge per run in the run options and the Actor stops cleanly at that amount.

### Use it from code, n8n, Make or Zapier

Python ([apify-client](https://pypi.org/project/apify-client/) 3.x):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("panix/aliexpress-scraper").call(run_input={
    "searchTerms": ["wireless earbuds"],
    "maxItems": 100,
    "sort": "orders",
})
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item["title"], item["price"], item["currency"], item["soldCount"])
```

JavaScript:

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('panix/aliexpress-scraper').call({ searchTerms: ['wireless earbuds'], maxItems: 100 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.map((p) => [p.title, p.price, p.soldCount]));
```

One HTTP call that runs the Actor and returns the products (for n8n's HTTP Request node, Make's HTTP module or any script):

```
POST https://api.apify.com/v2/acts/panix~aliexpress-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>
Content-Type: application/json

{"searchTerms": ["wireless earbuds"], "maxItems": 50}
```

n8n, Make and Zapier also have Apify apps: choose **Run Actor**, pick `panix/aliexpress-scraper`, paste the input JSON, then read the dataset items. AI agents can call it through the Apify MCP server (`https://mcp.apify.com`).

### FAQ

**Do I need an AliExpress account or API key?**
No. The Actor reads the public search pages any visitor sees.

**How many products can I get per search?**
AliExpress shows at most 60 pages of 60 products per search (3,600 cards). Because AliExpress repeats some products across pages, a full search usually yields 2,000-2,800 unique products. For more, split the search: several more specific terms, or price ranges (`minPrice`/`maxPrice`), or ship-from countries.

**Why is the price sometimes $1.09?**
AliExpress shows first-time visitors a welcome-deal price on many products (usually one piece per shopper). Those rows have `isNewShopperPrice: true` and a badge such as "New shoppers save $22.18". `originalPrice` is the listed price before discounts.

**Why can the same product show a different price in two runs?**
`price` is what AliExpress showed in that visit, after the coupons, subsidies and new-shopper deals it picked for the visit. AliExpress tests these per visit, so the shown price moves even when the seller changed nothing. `originalPrice` (the price before discounts) stays put. Watchlists compare the seller's own prices, so a product is marked `priceChanged` only when the seller really changed it; `previousPrice` and `priceChange` then show the prices from both runs.

**How exact is `soldCount`?**
It is the order count AliExpress records for the listing (`soldCountIsExact: true`). When AliExpress gives only a label, `soldCount` is the label's lower bound ("5,000+" becomes 5000) and `soldCountIsExact` is false.

**Does the ship-to country really change the results?**
Yes. AliExpress shows different products, prices, warehouses and delivery estimates per country. The Actor sets the country, currency and language the way the AliExpress site does and reports in SUMMARY what AliExpress actually served.

**Which product ID should I use?**
`productId`, which is the number in `https://www.aliexpress.com/item/<productId>.html` and in AliExpress's affiliate and dropshipping APIs.

**What is `position`?**
The product's rank in the search results, counting every card AliExpress showed (sponsored listings included, flagged with `isSponsored`). Use `uniqueProducts: false` when you track rankings for several search terms that share products.

**How does the watchlist work?**
Give it a name. The Actor remembers each product's prices for that watchlist and market (ship-to country, currency, language). Each later run marks products `new` (not seen in earlier runs of this watchlist), `priceChanged` (the seller changed the price; with `previousPrice`, `priceChange` and `priceChangePercent`) or `unchanged`. With **Only new products**, unchanged products are left out and not charged, and **Max products per search** sets how many of the top results are checked (with 500, every run looks at the top 500 and returns the ones that are new or changed). Products not seen for 90 days are forgotten.

**Which sort order should I use for a watchlist?**
**Most orders.** AliExpress reshuffles best-match and price-sorted results between visits: in our tests two visits a minute apart shared only 30-45% of the first 120 best-match products, against 70-85% when sorted by most orders. With best match, many products you simply had not seen before come back as `new`. To find products that are newly listed on AliExpress, use `listedDate` or the **Listed within the last (days)** filter.

**What happens when AliExpress shows a captcha?**
That page is retried right away on another IP; after two blocks in a row it moves to residential IPs. You are not charged for retries. If a search still cannot be read, it is marked `failed` in SEARCHES and the run continues with the other searches.

**Can I scrape product pages (variants, stock, shipping options, seller ratings)?**
Not in this version: it covers search and category pages, which already carry price, sold count, rating, delivery estimate and ships-from country. Product-page details are planned for a later version.

**Is it legal to scrape AliExpress?**
The Actor collects only publicly visible product information and no personal data. Check that your use complies with AliExpress's terms and the laws that apply to you.

### Limits

- Search and category pages only; product pages, store pages, reviews and image search are not covered yet.
- Up to 3,600 product cards per search (AliExpress's own limit); duplicates are removed.
- Delivery estimates appear on the cards AliExpress gives them (about half of the cards in the US, none in some markets such as Brazil).
- `freeShipping` is `true` when AliExpress labels the card (or you used the free-shipping filter) and `null` when the card doesn't say.
- aliexpress.ru is a separate store and is not supported; Russian and Kazakh markets are not offered.

# Actor input Schema

## `searchTerms` (type: `array`):

One search per line, as you would type it on AliExpress, for example <code>wireless earbuds</code>, <code>yoga mat</code>, <code>phone holder for car</code>.

## `startUrls` (type: `array`):

Paste links of AliExpress search results (<code>https://www.aliexpress.com/w/wholesale-yoga-mat.html</code>) or category pages (<code>https://www.aliexpress.com/category/100003109/women-clothing.html</code>). Filters and sorting you chose on AliExpress before copying the link are kept. Links from aliexpress.us and language subdomains (de., es., fr. ...) work too.

## `maxItems` (type: `integer`):

Stop each search term or link after this many products. AliExpress shows at most 60 pages of 60 products (3,600) per search; use more specific terms or price ranges to go further.

## `sort` (type: `string`):

Order of the results, as on AliExpress. <b>Most orders</b> finds proven best sellers.

## `minPrice` (type: `number`):

Lowest price, in the currency below. Also checked by the Actor on every product.

## `maxPrice` (type: `number`):

Highest price, in the currency below. Also checked by the Actor on every product.

## `freeShippingOnly` (type: `boolean`):

AliExpress's own free-shipping filter for the ship-to country.

## `choiceOnly` (type: `boolean`):

Only products in AliExpress Choice (faster delivery, free returns in many countries).

## `shipFrom` (type: `string`):

Only products sent from a warehouse in this country, for example the United States for fast local delivery. Leave empty for all.

## `categoryId` (type: `string`):

Limit the search terms to one AliExpress category, e.g. <code>200001928</code>. Every result row has its <code>categoryId</code>, so you can take one from a first run.

## `minRating` (type: `number`):

Keep products rated at least this many stars (0 to 5, e.g. 4.5). Products without a rating are left out when this is set.

## `minOrders` (type: `integer`):

Keep products sold at least this many times (exact sold counts, not the rounded "5,000+" label).

## `listedWithinDays` (type: `integer`):

Keep only products listed on AliExpress in the last N days, for example 30 to find new products that already sell.

## `excludeSponsored` (type: `boolean`):

Skip paid ad placements in the results (they are marked <code>isSponsored</code>).

## `uniqueProducts` (type: `boolean`):

A product already returned for an earlier search in this run is skipped (and not charged). Turn off to get it again under every search, for example for rank tracking.

## `shipTo` (type: `string`):

Destination country. AliExpress shows a different catalogue, prices and delivery times per country.

## `currency` (type: `string`):

Currency of all prices. Leave empty for the ship-to country's own currency (US dollar for the United States, euro for Germany).

## `language` (type: `string`):

Language of product titles and labels.

## `watchlistName` (type: `string`):

Any name, e.g. <code>earbuds-us</code>. With a name, every product gets <code>changeType</code> (new, priceChanged, unchanged) and <code>firstSeenAt</code>, plus <code>previousPrice</code> when the seller changed the price. Use one name per set of searches, and sort by <b>Most orders</b>: AliExpress reshuffles best-match results between visits.

## `onlyNewProducts` (type: `boolean`):

Return only products not seen in earlier runs of this watchlist. Products seen before are left out and not charged. <b>Max products per search</b> then sets how many of the top results are checked, so every run looks at the same top N.

## `includePriceChanges` (type: `boolean`):

With Only new products: also return products seen before whose seller changed the price, with the old price and the change. Visitor discounts that AliExpress varies from visit to visit don't count as changes.

## `proxyConfiguration` (type: `object`):

Apify datacenter proxy by default, with a new IP address for every few pages. Pages that keep hitting AliExpress's captcha are retried on residential IPs automatically, at no extra cost to you.

## `maxConcurrency` (type: `integer`):

How many result pages are loaded at the same time.

## Actor input object example

```json
{
  "searchTerms": [
    "wireless earbuds"
  ],
  "maxItems": 20,
  "sort": "bestMatch",
  "freeShippingOnly": false,
  "choiceOnly": false,
  "excludeSponsored": false,
  "uniqueProducts": true,
  "shipTo": "US",
  "language": "en_US",
  "onlyNewProducts": false,
  "includePriceChanges": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "maxConcurrency": 4
}
```

# Actor output Schema

## `products` (type: `string`):

Delivered products. Products left out by filters, duplicates and unchanged watchlist products are not in the dataset and are not charged.

## `searches` (type: `string`):

Pages read, products delivered and why each search stopped.

## `summary` (type: `string`):

Totals, products left out by each filter, the market AliExpress served, watchlist counts, request statistics and warnings.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchTerms": [
        "wireless earbuds"
    ],
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("panix/aliexpress-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/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchTerms": ["wireless earbuds"],
    "maxItems": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("panix/aliexpress-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchTerms": [
    "wireless earbuds"
  ],
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call panix/aliexpress-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,panix/aliexpress-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/QFbB8gltIIJf0yXxH/builds/aCvg2BtFEk29mygMg/openapi.json
