# AliExpress Landed Cost: Real Price + Real Freight (`best_actors/aliexpress-landed-cost`) Actor

Real variant prices plus the actual shipping quote to your country, so you get a true landed cost instead of a welcome-deal price with shipping ignored. Uses your own AliExpress API keys. Pay only for products fully costed.

- **URL**: https://apify.com/best_actors/aliexpress-landed-cost.md
- **Developed by:** [Lewis O'Rorke](https://apify.com/best_actors) (community)
- **Categories:** E-commerce, Developer tools
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00 / 1,000 costed products

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 Landed Cost: Real Price + Real Freight

**Find out what an AliExpress product will really cost you, delivered to your
country: the real variant prices plus the actual shipping quote, in one number.**

Most AliExpress tools give you a price. For sourcing decisions, that price is
usually wrong in two ways at once, and both of them make the product look
cheaper than it is.

**1. The price shown is often a welcome-deal price.** The cheapest figure on a
listing is frequently a new-buyer or first-order price that nobody restocking
will ever pay. In September 2026 a popular AliExpress scraper returned roughly
**£0.85 on nearly every listing**, whatever the product. A business plan
costed from that number is fiction.

**2. Shipping is usually ignored, and you can't predict it from size.** Across
63 real products quoted to the UK, shipping was a **flat £1.99 on 51 of
them**. A 49×27×20cm, 2.8kg box shipped for the same £1.99 as a keyring. But
the expensive exceptions are where the money goes:

| Product | Item price | Shipping | **Landed** |
|---|---|---|---|
| Vacuum bags, no pump | £1.99 | £1.99 | **£3.98** |
| Vacuum bags + electric pump | £7.79 | £1.99 | **£9.78** |
| Vacuum bag packaging | £10.09 | **£72.41 (DHL)** | **£82.50** |

That third row is a real result from this Actor. A tool that ignores shipping
calls it a £10 product. It is an £82.50 product.

***

### Who it is for

- **Dropshippers** pricing listings on eBay, Amazon, Shopify, Etsy or TikTok Shop
- **Product researchers** comparing which products still make money once shipped
- **Resellers and small shops** checking a supplier before ordering stock
- **Anyone building a margin calculator** who needs real cost data through an API

***

### What you get for each product

| Field | What it means |
|---|---|
| `title`, `url`, `product_id` | The product and its page |
| `price_min`, `price_median`, `price_max` | Real prices across every variant (size, colour...), not a "from" price |
| `price_spread_x` | Most expensive variant divided by the cheapest. Above about 2 means the cheapest price isn't a fair price for the product. One product in testing spanned **8.91×** across 32 variants. |
| `freight_cost` | The cheapest **tracked** delivery option to your country |
| `freight_service`, `freight_days`, `freight_tracked` | The carrier, the delivery estimate in days and whether it's tracked |
| `freight_options_count` | How many delivery options AliExpress offered |
| `ships_to_country` | Whether the product can be sent to your country at all |
| **`landed_cost`** | **Cheapest variant + shipping. The number to put your margin on.** |
| `landed_cost_median_sku` | Median variant + shipping, for a more typical cost |
| `images` | Up to 12 real product image URLs (optional) |
| `skus` | Every variant with its price and stock (optional) |
| `error`, `freight_error` | Why a product couldn't be costed. These rows are free. |

***

### How to use it (step by step)

#### 1. Get your AliExpress API credentials (one time)

This Actor uses **your own** AliExpress API access, and that's deliberate.
AliExpress's API agreement says an activated Open Platform account **"can only
be used by the relevant Developer"**, so nobody can legitimately sell you
access to their own key. What you pay for here is the integration and the
costing logic. AliExpress doesn't charge for the API calls.

1. Register as a developer at the **AliExpress Open Platform**
   ([openservice.aliexpress.com](https://openservice.aliexpress.com/)).
2. Create an app with access to the **Dropshipping** APIs and wait for approval.
3. In the **App Console**, copy your **App Key** and **App Secret**.
4. Authorise the app with your AliExpress account (the OAuth step) to get an
   **Access Token**. It lasts about 30 days, and your refresh token renews it.
5. **Turn off the app's IP whitelist.** In the App Console, click **Manage** on
   your app, then **App Management → IP Whitelist**. Clear the box and click
   **Submit** (an empty box switches the whitelist off). If it's on, AliExpress
   only accepts requests from the addresses listed, and Apify's servers aren't
   among them, so every run is blocked. The Actor tells you plainly if this
   happens, and you aren't charged.

#### 2. Fill in the form

- **Search keyword**: e.g. `vacuum storage bags`. The Actor finds products and costs them.
- **Product IDs or links**: paste full product links or just the IDs. You can
  use these, a keyword, or both.
- **Ship to country**: a two-letter code such as `GB`, `US`, `DE`, `FR` or `AU`.
  Shipping is quoted for this destination, so it changes the answer.
- **Currency**: e.g. `GBP`, `USD`, `EUR`.
- **Max products**: the run stops after this many.
- **Your three credentials**: paste them into the encrypted fields. They're
  never shown in logs.

#### 3. Click Start

Results appear in the **Output** tab as each product is costed. Ten products
usually take under 20 seconds.

#### 4. Use the results

Sort by `landed_cost`, filter out `ships_to_country: false`, and check
`price_spread_x` before trusting the cheapest price. Export as **Excel, CSV or
JSON**, or send straight to Google Sheets, Zapier, Make or your own app
through the Apify API.

***

### Ready-made examples

**Cost a search, delivered to the UK**

```json
{
  "searchKeyword": "magnetic phone holder",
  "shipToCountry": "GB",
  "currency": "GBP",
  "maxProducts": 20
}
```

**Check specific products you're about to list, delivered to the US, with every variant**

```json
{
  "productIds": [
    "https://www.aliexpress.com/item/1005006232978114.html",
    "1005010601776150"
  ],
  "shipToCountry": "US",
  "currency": "USD",
  "includeSkus": true
}
```

**Compare the same products across countries**: run the same input twice
with `shipToCountry` set to `GB` and then `DE`. Shipping often differs a lot.

***

### Pricing

You pay **one `product-costed` event per product that comes back with a full
landed cost** (price and shipping). You are **never** charged for:

- a product that can't be sent to your country
- a product with no shipping quote
- a product AliExpress returns an error for
- an empty search
- a run with wrong or expired credentials, or blocked by your app's IP whitelist (it stops straight away and tells you why)

Those products still appear in your results with the reason, so you can see
what happened. Set a **maximum cost per run** and the Actor stops cleanly when
it's reached.

***

### Built from real mistakes

Two AliExpress API quirks quietly make every product look free to ship. This
Actor handles both:

- The shipping quote comes back under **`delivery_option_d_t_o`**, not the
  documented `delivery_option_dto`. Read the documented name and you get zero
  options, so every product looks shipping-free.
- **`shipping_fee_cent` is in whole pounds or dollars, not cents.** Divide it by
  100 as the name suggests and £1.99 of shipping becomes 2p.

It also retries: AliExpress's shipping service sometimes errors on one variant
and quotes the next one fine, so the Actor tries up to three before giving up.

***

### Honest limits

- **Shipping is quoted for one variant.** Weight can differ slightly between
  sizes and colours, so treat it as accurate for pricing a listing, not exact
  per variant.
- **Wide price spreads can't be summed up in one number.** That's what
  `price_spread_x` is for: spot them and pick a variant deliberately.
- **Your access token expires about monthly.** Refresh it and update the input.
- **AliExpress rate limits apply to your own app**, not to this Actor.
- **Prices are what the API returns for your account and country.** Shop
  discounts and coupons at checkout aren't included.

***

### FAQ

**Why do I need my own credentials?**
AliExpress's API agreement doesn't allow one developer's access to be used by
other people. Any tool offering AliExpress API data without your own keys is
either scraping the website or breaking those terms.

**Can I use it for countries other than the UK?**
Yes. Any country AliExpress delivers to. Set `shipToCountry` and `currency`.

**Why was a product not charged?**
Look at its `error` or `freight_error` field. If there's no landed cost, there's no charge.

**My run failed with a message about an IP whitelist.**
Your AliExpress app only accepts requests from approved addresses. Clear it under
App Management → IP Whitelist (step 5 above) and run again.

**My run failed straight away with a credentials message.**
Your access token has probably expired. Refresh it with your refresh token
(or re-authorise the app) and paste the new one in.

# Actor input Schema

## `searchKeyword` (type: `string`):

Find products by keyword and cost them. Combine with Product IDs or use either alone.

## `productIds` (type: `array`):

AliExpress item IDs (e.g. 1005006232978114) or full product links. Combine with a search keyword or use alone.

## `shipToCountry` (type: `string`):

ISO country code for the freight quote. Freight is quoted per destination, so this changes the landed cost.

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

Target currency for prices and freight.

## `maxProducts` (type: `integer`):

Each product costed is one charged event. Products that cannot be costed are not charged.

## `searchPages` (type: `integer`):

Pages of search results to collect IDs from (50 per page) before costing.

## `includeImages` (type: `boolean`):

Return the product's real image URLs (up to 12).

## `includeSkus` (type: `boolean`):

Return per-SKU prices and stock, not just min/median/max.

## `aeAppKey` (type: `string`):

From your own app in the AliExpress Open Platform App Console. AliExpress restricts API access to its own developer, so these cannot be provided for you. See the README.

## `aeAppSecret` (type: `string`):

From the same app in your AliExpress App Console. Stored encrypted.

## `aeAccessToken` (type: `string`):

The OAuth access token for your app. Lasts about 30 days; refresh it with your refresh token.

## Actor input object example

```json
{
  "searchKeyword": "vacuum storage bags",
  "shipToCountry": "GB",
  "currency": "GBP",
  "maxProducts": 10,
  "searchPages": 1,
  "includeImages": true,
  "includeSkus": false
}
```

# Actor output Schema

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

No description

## `productsAllFields` (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 = {
    "searchKeyword": "vacuum storage bags"
};

// Run the Actor and wait for it to finish
const run = await client.actor("best_actors/aliexpress-landed-cost").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 = { "searchKeyword": "vacuum storage bags" }

# Run the Actor and wait for it to finish
run = client.actor("best_actors/aliexpress-landed-cost").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 '{
  "searchKeyword": "vacuum storage bags"
}' |
apify call best_actors/aliexpress-landed-cost --silent --output-dataset

```

## MCP server setup

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

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/g16Gd3fb2ZQeUZUkc/builds/Spknkx0lnLzCyYyug/openapi.json
