# Temu Products Scraper (`nice_dev/temu-products-scraper`) Actor

Scrape Temu search results by keyword: price, original price, discount, units sold, rating, reviews, brand, seller, badges, delivery. Several keywords, sort and price filters. Export to JSON, CSV or Excel.

- **URL**: https://apify.com/nice_dev/temu-products-scraper.md
- **Developed by:** [Nice Dev](https://apify.com/nice_dev) (community)
- **Categories:** E-commerce, MCP servers
- **Security:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 85.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.72 / 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

### 🛒 What is Temu Products Scraper?

**Temu Products Scraper** extracts **products from [Temu](https://www.temu.com) search results**: **title, price, original price and discount, units sold, rating and number of reviews, brand, seller, badges, delivery time and local warehouse**, for any keyword or Temu search URL. Use it for product research, dropshipping, price monitoring and competitor analysis.

Type one or several **keywords** (`wireless earbuds`) or paste Temu search URLs, click **Start**, and download the products in JSON, CSV or Excel. No login, nothing to set up: **about 15 to 50 products per minute** (Temu sometimes turns pages away and they are asked again), about 180 to 360 products per keyword.

### 📋 What data can you extract from Temu?

One item per product, 37 fields:

| Category | What you get |
| --- | --- |
| 🛒 **Product** | title, link, Temu product id, main image and image list — `ACER Wireless In-Ear Headphones…` |
| 💰 **Price** | price, original price, discount and currency, as shown and as numbers — `11.63 EUR`, `-35 %` |
| 📈 **Sales** | units sold as a number (Temu's rounded figure, as the card shows it) and Temu's sold percentage — `2.4K+ sold` = 2,400 |
| ⭐ **Rating** | star rating and number of reviews — `4.9`, `126 reviews` |
| 🏪 **Seller** | store id and link, brand, Star seller — `ACER`, Star seller |
| 🏅 **Badges** | best-seller / top-rated badges with their category, sponsored flag — `Best-Selling Item` |
| 🚚 **Delivery** | local warehouse, delivery time in days — `4 days` |
| 🗂️ **Category** | Temu category and ranking category, variant id, adult product flag — `Headphones, Earbuds & Accessories` |
| 🔎 **Search** | the keyword, the rank in Temu's results, the sort, the search page, the Temu region and language served, the time of the scrape |

Every field, with an example, is listed in the **Output** section below.

### ✅ Why use Temu Products Scraper?

- 🚀 **Real Temu search results**: the products Temu shows for your keyword, in Temu's order, about 180 to 360 per keyword.
- 🗂️ **Several keywords in one run**, with a cap per keyword so that the first one cannot use up the whole budget.
- 🎛️ **Temu's own sort and filters**: relevance, top sales, most recent, price up or down, a price range, a category and "local warehouse only" — and the language of the site.
- 🔎 **More than the price**: units sold as a number, discount, brand, Star seller, best-seller / top-rated badges with their category, sponsored flag, delivery time.
- 🔔 **Monitoring built in**: tick **Only new products**, schedule the Actor, and each run returns (and charges) only products it has never delivered before.
- 🔌 API, scheduling, integrations (Make, Zapier, n8n, Google Sheets…) and JSON/CSV/Excel export via the Apify platform.

### 🚀 How to scrape Temu

1. Create a free Apify account.
2. Open **Temu Products Scraper** and type a **Search keyword** (e.g. `wireless earbuds`), or several in **More search keywords**.
3. Or paste your own Temu search URLs into **Start URLs** (the filters set on Temu are kept).
4. Choose the sort and filters, set **Max products** (100 by default, 0 = no limit), then click **Start**.
5. Download the dataset in JSON, CSV, Excel or via API.

### 💰 How much does it cost to scrape Temu?

This Actor uses **pay per event** pricing: **$1.09 per 1,000 products**, plus **$0.03 per run start per GB of memory** ($0.06 at the default 2 GB). Higher Apify plans pay less per product: $0.99 (Bronze), $0.89 (Silver) and $0.72 (Gold, Platinum, Diamond) per 1,000. Temu serves its search results to residential IPs only: with any Apify Proxy setting (the default), the Actor reads them through a residential proxy it provides, charged **$1.92 per 1,000 result pages** (a page holds 20 to 40 products: 25 to 50 pages for 1,000 products); with your own proxies (`proxyUrls`) this fee does not apply. Example: 5,000 products ≈ $5.99 (products $5.45, up to 250 result pages $0.48, run start $0.06); a daily monitor of 200 new products ≈ $0.30 per day. The filters of the Actor itself (`minRating`, `minReviews`, `minSoldCount`, `excludeKeywords`, `excludeAds`, `excludeAdultProducts`) are checked on every product card it reads: each product they DROP is charged **$0.28 per 1,000** (event `filter-check`), a product they keep pays its product price only. A filtered-out product is never saved nor charged as a product.

### ⚙️ Input

```json
{
    "query": "wireless earbuds",
    "maxItems": 200,
    "sortBy": "top_sales"
}
```

Several keywords, a cap per keyword, Temu's filters, only products not delivered before:

```json
{
    "searchQueries": ["desk lamp", "led strip"],
    "maxItemsPerQuery": 120,
    "minPrice": 5,
    "maxPrice": 30,
    "localWarehouseOnly": true,
    "minRating": 4.5,
    "onlyNew": true,
    "stateKey": "lamps-monitor"
}
```

Or with your own URLs:

```json
{
    "startUrls": [{ "url": "https://www.temu.com/search_result.html?search_key=phone%20case&filter_items=1%3A1" }],
    "maxItems": 300
}
```

| Field | Notes |
| ----- | ----- |
| `query`, `searchQueries` | Free-text search, exactly as typed on Temu; `searchQueries` adds more keywords (one search each). Ignored when `startUrls` is set. |
| `startUrls` | Temu search results pages (`https://www.temu.com/search_result.html?search_key=...`); their filters are kept. A link with a country path (`https://www.temu.com/uk/search_result.html?search_key=phone%20case`) works too, but the Temu site served (currency, prices) follows the proxy's country, not that path. Product pages are not supported. |
| `maxItems` | Stop after this many products for the whole run (0 = unlimited). |
| `maxItemsPerQuery` | Cap for EACH search (keyword or search URL). 0 = no per-search cap. |
| `sortBy` | `relevance`, `top_sales`, `most_recent`, `price_low_to_high` or `price_high_to_low`. |
| `minPrice`, `maxPrice` | Price range, in the currency of the Temu site served (Temu's own price filter). |
| `localWarehouseOnly` | Only products shipped from a local warehouse. |
| `categoryId` | Only one Temu category, by its number, e.g. `355` (Headphones, Earbuds & Accessories): the number after 101: in a Temu search URL filtered by category, or the `rankingCategoryId` of a product. The `categoryId` column of a product is a finer category of Temu, not always one the filter offers. |
| `language` | Language of titles and labels: `en`, `de`, `fr`, `it`, `es`, `nl`, `pl` or `pt`, when the Temu site of the proxy's country offers it. |
| `minRating`, `minReviews`, `minSoldCount` | Drop products under this rating, number of reviews or units sold (`5K+ sold` counts as 5,000). |
| `includeKeywords`, `excludeKeywords`, `excludeAds`, `excludeAdultProducts` | Keep only products whose title contains one of the words (`includeKeywords`), drop products whose title contains a word, sponsored products, adult products. |
| `onlyNew`, `stateKey`, `resetState` | Monitoring: only the products never delivered under this memory key; `resetState` forgets the memory. |
| Advanced | `proxyConfiguration` (default: the Actor provides a residential proxy, charged per result page; the Apify residential group cannot be chosen; your own proxies in `proxyUrls` are used as they are), `debugLog`. |

### 📦 Output

```json
{
    "id": "607296478357509",
    "url": "https://www.temu.com/goods.html?goods_id=607296478357509",
    "title": "ACER Official Genuine Product, New Wireless In-Ear Headphones, 22-hour Ultra-Long Battery Life, Bluetooth 5.4, 3D Surround Sound, HIFI High-Definition Decoding, Touch Control Operation, Call Noise Cancellation, with LED Digital Display Charging Case",
    "price": 11.63,
    "priceText": "11,63€",
    "originalPrice": 17.79,
    "originalPriceText": "17,79€",
    "discountPercent": 35,
    "currency": "EUR",
    "soldCount": 2400,
    "soldCountIsLowerBound": true,
    "soldText": "2.4K+ sold",
    "soldPercent": 61,
    "rating": 4.9,
    "reviewCount": 126,
    "imageUrl": "https://img.kwcdn.com/product/open/8d1bf72b4f6943b99c779de8b88db316-goods.jpeg",
    "images": ["https://img.kwcdn.com/product/open/8d1bf72b4f6943b99c779de8b88db316-goods.jpeg"],
    "sellerId": "634418227638644",
    "sellerUrl": "https://www.temu.com/mall.html?mall_id=634418227638644",
    "brand": "ACER",
    "isStarSeller": true,
    "badges": ["Best-Selling Item"],
    "isAd": true,
    "localWarehouse": false,
    "deliveryDays": null,
    "categoryId": "366",
    "rankingCategory": "Headphones, Earbuds & Accessories",
    "rankingCategoryId": "355",
    "skuId": "106157632933798",
    "adultProduct": false,
    "searchQuery": "wireless earbuds",
    "searchRank": 6,
    "sortBy": "relevance",
    "region": "98",
    "language": "en",
    "searchUrl": "https://www.temu.com/search_result.html?search_key=wireless+earbuds&page=1",
    "scrapedAt": "2026-09-22T21:05:44.000Z"
}
```

You can download the dataset in various formats such as JSON, HTML, CSV or Excel.

#### All 37 fields

| Fields | What you get |
| --- | --- |
| `id`, `url`, `title` | `607296478357509`, `https://www.temu.com/goods.html?goods_id=607296478357509`, `ACER Official Genuine Product, New Wireless In-Ear Headphones…` |
| `price`, `priceText`, `currency` | `11.63`, `11,63€`, `EUR` |
| `originalPrice`, `originalPriceText`, `discountPercent` | `17.79`, `17,79€`, `35` |
| `soldCount`, `soldCountIsLowerBound`, `soldText`, `soldPercent` | `2400`, `true`, `2.4K+ sold`, `61` |
| `rating`, `reviewCount` | `4.9`, `126` |
| `imageUrl`, `images` | product image, image list |
| `sellerId`, `sellerUrl`, `brand`, `isStarSeller` | `634418227638644`, store page, `ACER`, `true` |
| `badges`, `isAd` | `["Best-Selling Item"]`, `true` (sponsored) |
| `localWarehouse`, `deliveryDays` | `true`, `4` |
| `categoryId`, `rankingCategory`, `rankingCategoryId`, `skuId`, `adultProduct` | `366`, `Headphones, Earbuds & Accessories`, `355`, `106157632933798`, `false` |
| `searchQuery`, `searchRank`, `sortBy`, `searchUrl` | `wireless earbuds`, `6`, `relevance`, the search it was found in |
| `region`, `language`, `scrapedAt` | Temu region of the site served, `en`, ISO timestamp |

### 💡 Tips

#### How to get more results

Temu shows about 180 to 360 products per keyword: it decides how many on each search. For more, split a broad keyword into several precise ones (`desk lamp`, `led desk lamp`, `desk lamp usb`) in `searchQueries`, or paste into `startUrls` the Temu search of the same keyword with several sorts or price ranges, in ONE run (leave **Sort by** on Relevance and the price fields empty: set, they replace the sort and price of every URL). A product found twice in a run is saved and charged once; two separate runs deliver it twice, unless `onlyNew` is on.

#### How to reduce costs

The price is per product, so the levers are `maxItems`, `maxItemsPerQuery`, the filters (a filtered-out product costs only its filter check, a kept one only its product price: a narrow filter on a wide search drops many products, each charged its check) and `onlyNew` for recurring runs (you never pay twice for the same product).

#### Several searches in one run

Fill `searchQueries`: the Actor runs one search per keyword (up to 100 per run). The single `query` field still works and is added to the list. A product found by several searches is saved — and charged — once. Set `maxItemsPerQuery` to give every search its own cap: without it the first searches can use up the whole `maxItems` budget. You can also paste several search URLs into `startUrls`: each one is a search of its own, with the same cap.

#### Monitoring: only the new products

Tick **Only new products** (`onlyNew`) and schedule the Actor. The first run returns everything; each later run skips the products already delivered: they are not saved and not charged. The memory lives in a named key-value store of your account (`temu-products-scraper-seen`, up to 150,000 products per key) and is only updated with products that really reached the dataset, so a failed run never hides anything. With filters, a product they drop is checked (and charged its `filter-check`) once: the next runs with the same filters skip it for free. Change a filter, or tick `resetState`, to check them again. Give each schedule its own `stateKey` (two schedules sharing a key would hide each other's products), and tick `resetState` once to start over.

### 🔌 Integrations and API

Call the Actor via the Apify API, the JavaScript or Python clients, or connect it with integrations and webhooks (Make, Zapier, n8n, Google Sheets, Slack, Airtable…). The dataset can be fetched as JSON or CSV from any tool.

### 🤖 Use with AI agents (MCP)

AI agents (Claude, ChatGPT, Cursor…) can find and run this Actor through the [Apify MCP server](https://mcp.apify.com), billed to their Apify account like any run. It returns one item per Temu product. Actor id: `nice_dev/temu-products-scraper`; MCP server with this Actor only: `https://mcp.apify.com/?tools=fetch-actor-details,nice_dev/temu-products-scraper`.

Smallest input, for a cheap first call:

```json
{
    "query": "wireless earbuds",
    "maxItems": 10
}
```

Key output fields: `url`, `title`, `price`, `currency`, `discountPercent`, `soldCount`, `rating` and `reviewCount`.

Cost: $1.09 per 1,000 products ($0.72 on the Gold plan), $0.03 per run start per GB of memory, and $1.92 per 1,000 result pages read through the residential proxy the Actor provides (any Apify Proxy setting, the default). The filters of the Actor cost $0.28 per 1,000 products they drop, see the pricing section above. Cap each call with `maxItems` and, through the API, with the run option `maxTotalChargeUsd`.

### ❓ FAQ

#### Is it legal to scrape Temu?

The Actor only reads what Temu shows publicly to any anonymous visitor in its search results. It logs in to nothing. The data is about products and sellers' stores, not about private persons. You are responsible for using the data in compliance with Temu's Terms of Use and applicable law. This Actor is not affiliated with Temu.

#### Does it need a login or a proxy?

No login. Leave the default proxy setting: Temu serves its results to residential IPs only, and with any Apify Proxy setting the Actor provides one, charged per result page (see the pricing). Your own proxies (`proxyUrls`) are used as they are, with no such fee; the Apify residential group cannot be chosen. A page Temu turns away is retried on a new proxy session (without a proxy, after a pause of 5 seconds, doubled at each retry up to 150 seconds). When Temu stops serving the next pages of results to an IP that cannot change (no proxy, or a single proxy URL), those pages are not retried: they are listed at once in the failed requests, with the products already read kept. The country of the proxy decides which Temu site is served: currency, prices and language follow it.

**Apify free plan:** the included proxy is for paying Apify plans only. On the free plan, add your own proxy URLs in **Proxy configuration**; without them the run stops at once with a message saying so.

#### Is the data safe to open in Excel or to show on a web page?

Titles are the sellers' own words, copied as they are. A title can begin with `-`, `+`, `=` or `@`: Excel and Google Sheets may read such a cell of a CSV file as a formula. The Actor leaves the text as it is, so that the JSON and the API give the real value: when you open a CSV, import the `title` column as text. Every URL field holds an http(s) URL or null. On a web page, escape every field like any text written by a stranger.

#### Known limitations

- Only search results are read: no product page, so no description, variants, specifications or reviews text.
- `soldCount` is Temu's rounded figure (`2.4K+` = 2,400, a lower bound).
- `brand`, `badges` and `originalPrice` are only filled when Temu shows them on the product. `deliveryDays` (local-warehouse products) and `soldPercent` are figures Temu sends with the product without showing them on the results page: `deliveryDays` is not the `Fastest delivery: 2 business days` text some cards show.
- `onlyNew` remembers product ids, not their content: a product whose price changed is not returned again.
- Two runs sharing the same `stateKey` at the same time may both return the same new product.

**A run the platform stops without warning** (out of memory, run timeout)

- Resurrect it: it goes on from where it stood at most a minute before the stop. What it had read since is read again, and the products already saved are skipped: none is delivered or charged twice, and `maxItems` still counts them.
- With `onlyNew`, the memory is saved after each write (at most once every 2 seconds): resurrect the stopped run and the products it had saved meanwhile join the memory; leave it stopped for good, and the next run may return the products of its last 2 seconds once more.

#### Something doesn't work?

The last line of the log counts the products saved and filtered out, and the pages that failed after every retry. Those pages are listed, with the reason, in the `FAILED_REQUESTS` record of the run's key-value store. A run that saved nothing and had failed pages fails, and its last message gives the cause. A run that saved some products fails too when at least as many pages failed for good as were read (Temu refusing the later pages of a search, for instance): a green run with a short dataset would hide the outage. One failed page among many is only a warning.

If Temu changes its pages, you are told instead of paying for blank rows. A results page that shows products but gives none the Actor can read is an error (listed in `FAILED_REQUESTS`), never a quiet "No products found". If the first 20 products read all lack their title, price, image, rating, number of reviews, units sold, seller, category or region (rating and reviews are not checked when sorting by most recent or lowest price: new and cheap products often have none yet), the run saves nothing more, stops and fails, and its last message names the missing field: at most those first products are charged.

### 🛟 Support

Open an issue in the **Issues** tab with a link to your run: the run log and the `FAILED_REQUESTS` record of the key-value store show exactly which pages failed and why.

# Actor input Schema

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

Temu search-result URLs (`https://www.temu.com/search_result.html?search_key=...`), filters set on the site included (`filter_items`); a country path (`https://www.temu.com/uk/search_result.html?search_key=phone%20case`) is accepted, the site served still follows the proxy's country. When this list is not empty, the keyword fields below are ignored; caps, filters and monitoring still apply. Max 1 000 URLs.

## `query` (type: `string`):

Free-text search, exactly as typed on Temu (e.g. `wireless earbuds`).

## `searchQueries` (type: `array`):

Several keywords in one run (e.g. `desk lamp`, `led strip`): one search per keyword. Added to **Search keyword**; products found by several searches are saved once.

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

Maximum number of products to save for the whole run (after deduplication and filters). 0 = no limit.

## `maxItemsPerQuery` (type: `integer`):

Cap for EACH search (keyword or search URL), so that the first search cannot use up the whole **Max products** budget. Temu shows about 180 to 360 products per search. 0 = no per-search cap.

## `sortBy` (type: `string`):

Order of the search results, as on Temu.

## `minPrice` (type: `integer`):

Only products at or above this price, in the currency of the Temu site served (EUR, GBP…). Applied by Temu's own price filter.

## `maxPrice` (type: `integer`):

Only products at or below this price, in the currency of the Temu site served.

## `localWarehouseOnly` (type: `boolean`):

Only products shipped from a local warehouse (Temu's 'Ships from: Local warehouse' filter), usually delivered faster.

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

Only products of this Temu category (Temu's own category filter): the number in `filter_items=101:<id>` of a Temu search URL filtered by category, e.g. `355` (Headphones, Earbuds & Accessories), or the `rankingCategoryId` of a product (not its `categoryId`, a finer category). The ids are those Temu lists for the search.

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

Language of titles and labels, when the Temu site of the proxy's country offers it (otherwise Temu keeps its own). Empty = the site's default.

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

Only products rated at least this (0 to 5, e.g. `4.5`). Products without a rating are dropped when this is set.

## `minReviews` (type: `integer`):

Only products with at least this number of reviews.

## `minSoldCount` (type: `integer`):

Only products with at least this number of units sold, as shown by Temu (`5K+ sold` counts as 5 000).

## `includeKeywords` (type: `array`):

Keep only the products whose title contains at least one of these words (e.g. `wireless`; case and accents ignored). Empty = no restriction. A product the filter drops is charged the filter fee like the other filters.

## `excludeKeywords` (type: `array`):

Drop the products whose title contains one of these words (e.g. `refurbished`; case and accents ignored).

## `excludeAds` (type: `boolean`):

Drop the products marked 'AD' (sponsored) in the search results.

## `excludeAdultProducts` (type: `boolean`):

Drop the products that Temu flags as adult / age-restricted.

## `onlyNew` (type: `boolean`):

Skip the products that a previous run (same **Memory key**) already delivered: they are not saved and not charged. First run = everything is new.

## `stateKey` (type: `string`):

Name of the memory used by **Only new products**. Give each schedule / task its own key (e.g. `earbuds-monitor`) so that they do not share their memory. Letters, digits, `-` and `_`.

## `resetState` (type: `boolean`):

Forget everything remembered under this **Memory key** before the run: this run returns (and charges) every product again. Untick it afterwards.

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

Apify Proxy or your own proxies. With any Apify Proxy setting (the default), Temu is read through a residential proxy the Actor provides, charged per result page (see Pricing); your own proxies in "proxyUrls" are not charged. The country of the proxy decides which Temu site (currency, prices) is served. The residential Apify proxy group is not available in this Actor. On the Apify free plan the included proxy is not available: add your own proxy URLs, or the run stops at once with a message.

## `debugLog` (type: `boolean`):

Include debug messages in the run log, and keep a screenshot of each page Temu blocks (up to 10) in the key-value store, as DEBUG\_… records.

## Actor input object example

```json
{
  "startUrls": [],
  "query": "wireless earbuds",
  "searchQueries": [],
  "maxItems": 40,
  "maxItemsPerQuery": 0,
  "sortBy": "relevance",
  "localWarehouseOnly": false,
  "language": "",
  "includeKeywords": [],
  "excludeKeywords": [],
  "excludeAds": false,
  "excludeAdultProducts": false,
  "onlyNew": false,
  "stateKey": "default",
  "resetState": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "debugLog": false
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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 = {
    "query": "wireless earbuds",
    "maxItems": 40,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("nice_dev/temu-products-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 = {
    "query": "wireless earbuds",
    "maxItems": 40,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("nice_dev/temu-products-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 '{
  "query": "wireless earbuds",
  "maxItems": 40,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call nice_dev/temu-products-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nice_dev/temu-products-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/gXdF5uyNGJaxmh2mM/builds/P7jRowIMrVSa5JT2P/openapi.json
