{
  "openapi": "3.0.1",
  "info": {
    "title": "AliExpress Search Scraper — Prices, Discounts & Sold",
    "description": "AliExpress product research for dropshipping: search by keyword and export sale vs original price, discount %, sold count, rating, images and links, plus the coupon behind each displayed price. CSV/JSON/Excel, $2 per 1,000 products.",
    "version": "0.4",
    "x-build-id": "a6WEjkiHv3bdlbHFa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/peerless_columbine~independent-aliexpress-research/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-peerless_columbine-independent-aliexpress-research",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/peerless_columbine~independent-aliexpress-research/runs": {
      "post": {
        "operationId": "runs-sync-peerless_columbine-independent-aliexpress-research",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/peerless_columbine~independent-aliexpress-research/run-sync": {
      "post": {
        "operationId": "run-sync-peerless_columbine-independent-aliexpress-research",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "keywords": {
            "title": "Search keywords",
            "maxItems": 10,
            "type": "array",
            "description": "Main input: product search terms, e.g. `wireless earbuds`, `phone case`. Each keyword is a separate AliExpress search returning up to maxItems products. Max 10 targets in total (keywords plus productUrls). Required unless searchQueries or productUrls is given.",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "default",
              "orders",
              "price_asc",
              "price_desc",
              "rating"
            ],
            "type": "string",
            "description": "Order of results. Accepted values: `default` = Default (relevance); `orders` = Most orders; `price_asc` = Price: low to high; `price_desc` = Price: high to low; `rating` = Top rated. The sort is sent to AliExpress; with a non-default sort all pages up to maxPages are read and re-sorted locally (unknown rating/orders go last).",
            "default": "default"
          },
          "minPrice": {
            "title": "Minimum price",
            "type": "number",
            "description": "Only keep products whose displayed price is at or above this value, in the currency AliExpress shows (set `currency` to control it; no conversion). The displayed price is often a promotional or coupon price, see priceContext. Products without a price are dropped. Example: `5`."
          },
          "maxPrice": {
            "title": "Maximum price",
            "type": "number",
            "description": "Only keep products whose displayed price is at or below this value, in the currency AliExpress shows (set `currency` to control it; no conversion). Must be at least minPrice. The displayed price is often a promotional or coupon price, see priceContext. Example: `30`."
          },
          "minRating": {
            "title": "Minimum star rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Only keep products with an average star rating at or above this value, from 0 to 5. Products without a rating are dropped. Example: `4.5`."
          },
          "minOrders": {
            "title": "Minimum orders",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep products with at least this many sold units, from the card's 'sold' badge (abbreviated badges such as `5,000+` count as their lower bound). Products without a sold count are dropped. Minimum: 0. Example: `100`."
          },
          "maxItems": {
            "title": "Max items per keyword",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum products saved per keyword or search URL, after filters and duplicate removal (each saved row is billed). Fewer may be returned. maxProducts is an alias; don't set both to different values. Allowed range: 1–200.",
            "default": 48
          },
          "maxPages": {
            "title": "Max pages per keyword (optional)",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum search result pages (about 60 products each) per keyword. Leave empty to use ceil(maxItems / 60), recommended. Raise it when filters drop many products or with a non-default sort. Allowed range: 1–20."
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 30,
            "maximum": 180,
            "type": "integer",
            "description": "Per-request timeout in seconds, also limited by maxRunSeconds. Increase if you see timeout errors. Allowed range: 30–180.",
            "default": 60
          },
          "searchQueries": {
            "title": "searchQueries",
            "maxItems": 10,
            "type": "array",
            "description": "Alias of keywords for users migrating from other AliExpress scrapers; prefer keywords. If both are set they must be identical, otherwise the run fails. Example: `phone case`.",
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "productUrls",
            "maxItems": 10,
            "type": "array",
            "description": "Alternative to keywords, max 10 AliExpress URLs. Page-1 search URLs such as `https://www.aliexpress.com/w/wholesale-phone-case.html` or `...?SearchText=phone+case` (no other filter parameters) are treated as keywords. Item URLs `https://www.aliexpress.com/item/<id>.html` request the product page, but AliExpress often serves it without data, so they may fail. Example: `https://www.aliexpress.com/w/wholesale-phone-case.html`.",
            "items": {
              "type": "string"
            }
          },
          "maxProducts": {
            "title": "maxProducts",
            "minimum": 50,
            "maximum": 1000,
            "type": "integer",
            "description": "Alias of maxItems for users migrating from other scrapers (defaults to 50 when searchQueries is used); prefer maxItems. Setting both to different values fails the run. Allowed range: 50–1000. Example: `100`."
          },
          "sortBy": {
            "title": "sortBy",
            "enum": [
              "default",
              "price_asc",
              "price_desc",
              "orders"
            ],
            "type": "string",
            "description": "Alias of sort for users migrating from other scrapers; prefer sort. Setting both to different values fails the run. Accepted values: default, price_asc, price_desc, orders (`rating` is not accepted here). Example: `orders`."
          },
          "proxyConfiguration": {
            "title": "proxyConfiguration",
            "type": "object",
            "description": "Optional, off by default and normally not needed. Apify proxy, e.g. `{\"useApifyProxy\": true, \"apifyProxyGroups\": [\"RESIDENTIAL\"]}`, or your own `proxyUrls` (max 20; not both). Proxy traffic is billed separately. Invalid settings fail the run; it never silently falls back to direct access.",
            "default": {
              "useApifyProxy": false
            }
          },
          "useProxy": {
            "title": "useProxy",
            "type": "boolean",
            "description": "Shortcut: true enables the default Apify proxy when proxyConfiguration is not set. If both are set they must agree, otherwise the run fails. Leave empty normally."
          },
          "country": {
            "title": "country",
            "type": "string",
            "description": "Optional ship-to country as a 2-letter uppercase ISO code, sent to AliExpress as the delivery-region preference. Independent of currency and language. With requireLocaleMatch true, a search fails if AliExpress does not confirm this country. Not proof that items ship there. Example: `US`."
          },
          "currency": {
            "title": "currency",
            "type": "string",
            "description": "Optional price currency as a 3-letter uppercase ISO code. AliExpress is asked to show prices in it; the Actor never converts prices. Without it AliExpress may pick a currency from the visitor location (e.g. KRW). With requireLocaleMatch true, a search fails if the returned currency differs. Example: `USD`."
          },
          "language": {
            "title": "language",
            "enum": [
              "en",
              "de",
              "es",
              "fr",
              "pt",
              "it",
              "nl",
              "ja",
              "ko",
              "ru",
              "id",
              "ar",
              "th",
              "tr",
              "vi",
              "he",
              "pl"
            ],
            "type": "string",
            "description": "Optional site language; selects the matching AliExpress site (e.g. `de` = de.aliexpress.com). Requests use English when omitted. When set, and requireLocaleMatch is true, a search fails if the page language differs. Does not set country or currency. Example: `en`."
          },
          "requireLocaleMatch": {
            "title": "requireLocaleMatch",
            "type": "boolean",
            "description": "true (default): if you set country, currency or language and AliExpress returns a different or unconfirmed one, that search fails instead of saving rows. false: save rows anyway with the actual values and report the gap (run status PARTIAL). No currency conversion either way.",
            "default": true
          },
          "includeVariants": {
            "title": "includeVariants",
            "type": "boolean",
            "description": "Also open each product page to add its SKU variants (`variants`: SKU ID, price, stock, attributes). One extra request per product; a page without SKU data fails that target. AliExpress product pages often return no data to anonymous requests, so this is unreliable. Leave false unless needed.",
            "default": false
          },
          "outputFormat": {
            "title": "outputFormat",
            "enum": [
              "kawsar",
              "devcake"
            ],
            "type": "string",
            "description": "Row layout. `kawsar` (default): field names such as productTitle, price, formattedPrice, originalFormattedPrice, rating, orders, keyword, tags as an array. `devcake`: alternative names title, priceCurrent, priceOriginal, priceDiscount, ratingValue, soldCount, searchQuery, tags as one ` | `-joined string. Both keep priceContext.",
            "default": "kawsar"
          },
          "maxConcurrency": {
            "title": "maxConcurrency",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Number of keywords/targets processed in parallel, which is also the maximum number of HTTP connections. Allowed range: 1–8.",
            "default": 2
          },
          "maxRetries": {
            "title": "maxRetries",
            "minimum": 0,
            "maximum": 2,
            "type": "integer",
            "description": "Retries for network errors and HTTP 5xx. Challenge/CAPTCHA pages, HTTP 403 and 429 are never retried. Allowed range: 0–2.",
            "default": 1
          },
          "maxRunSeconds": {
            "title": "maxRunSeconds",
            "minimum": 10,
            "maximum": 110,
            "type": "integer",
            "description": "Total collection time budget in seconds; keep the run timeout higher (e.g. 120 s). Rows saved before the limit are kept. Allowed range: 10–110.",
            "default": 95
          },
          "dnsMode": {
            "title": "dnsMode",
            "enum": [
              "system",
              "google-doh"
            ],
            "type": "string",
            "description": "Advanced, leave `system`. `google-doh` resolves AliExpress hostnames via Google DNS-over-HTTPS, only useful for local runs where system DNS returns fake addresses. Security checks stay on in both modes.",
            "default": "system"
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}