{
  "openapi": "3.0.1",
  "info": {
    "title": "AliExpress Products Scraper & API — Variants, Stock, Reviews",
    "description": "Scrape AliExpress products by keyword, search URL or product link: price, discount, rating, exact orders, plus every variant with its own price and stock, specs, seller stats, shipping options and buyer reviews with photos. 63 markets, any currency. No login. Export JSON, CSV, Excel.",
    "version": "0.2",
    "x-build-id": "E24hsooxSgMNWl7wo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lergassy~aliexpress-products-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lergassy-aliexpress-products-scraper",
        "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/lergassy~aliexpress-products-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lergassy-aliexpress-products-scraper",
        "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/lergassy~aliexpress-products-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lergassy-aliexpress-products-scraper",
        "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",
            "type": "array",
            "description": "One search per line — <b>wireless earbuds</b>, <b>yoga mat</b>. Each search returns up to <b>Products per search</b> rows.",
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "🔗 Product links or IDs",
            "type": "array",
            "description": "Specific products instead of a search: <code>https://www.aliexpress.com/item/1005007532443151.html</code>, app share links (<code>a.aliexpress.com/_…</code>), <code>aliexpress.us</code> links or bare product IDs. Each link always comes back with full product details (variants, stock, specs, seller, delivery) — billed as one product plus the details add-on.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "🧭 AliExpress search URLs",
            "type": "array",
            "description": "Paste search or category URLs from the site instead of keywords — filters already set in the URL are kept.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItemsPerQuery": {
            "title": "📦 Products per search",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "AliExpress shows 60 per page; the Actor walks the pages until it has this many. Duplicates are skipped and never charged. Does not limit product links.",
            "default": 60
          },
          "sortBy": {
            "title": "↕️ Sort",
            "enum": [
              "default",
              "orders",
              "price_asc",
              "price_desc",
              "newest"
            ],
            "type": "string",
            "description": "Applied to keyword searches (search URLs keep their own sort).",
            "default": "default"
          },
          "filters": {
            "title": "✅ Quick filters",
            "type": "array",
            "description": "Same switches as the AliExpress filter panel. Pick any number.",
            "items": {
              "type": "string",
              "enum": [
                "free_shipping",
                "choice",
                "four_star_plus",
                "big_sale",
                "ships_from_local"
              ],
              "enumTitles": [
                "Free shipping",
                "AliExpress Choice",
                "4 stars & up",
                "Big-sale deals",
                "Ships from a local warehouse (Local+)"
              ]
            },
            "default": []
          },
          "minPrice": {
            "title": "💲 Minimum price",
            "minimum": 0,
            "type": "number",
            "description": "In the chosen currency. Leave empty for no floor."
          },
          "maxPrice": {
            "title": "💲 Maximum price",
            "minimum": 0,
            "type": "number",
            "description": "In the chosen currency. Leave empty for no ceiling."
          },
          "shipFrom": {
            "title": "🏭 Ships from",
            "enum": [
              "",
              "CN",
              "US",
              "ES",
              "FR",
              "DE",
              "PL",
              "IT",
              "NL",
              "BE",
              "CZ",
              "GB",
              "TR",
              "KR",
              "JP",
              "AU",
              "BR",
              "CA",
              "MX"
            ],
            "type": "string",
            "description": "Only products dispatched from this country — find stock already near your buyers (US, EU warehouses) instead of shipping from China.",
            "default": ""
          },
          "categoryId": {
            "title": "🗂️ Category ID",
            "type": "string",
            "description": "Keep only one AliExpress category, e.g. <code>200001051</code>. Copy <code>postCategoryId</code> from a previous run's results, or the number from a category URL."
          },
          "minRating": {
            "title": "⭐ Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Drop products rated below this (1–5). Products with no rating yet are kept. Dropped rows are never charged."
          },
          "includeAds": {
            "title": "📣 Include sponsored products",
            "type": "boolean",
            "description": "Sponsored placements are skipped by default and never charged. Turn on to keep them (rows carry isAd = true).",
            "default": false
          },
          "shipTo": {
            "title": "🌍 Ship-to country",
            "type": "string",
            "description": "Two-letter code of the country you sell or ship to — US, GB, DE, FR, ES, IT, NL, PL, CA, AU, BR, MX, JP, KR, … (63 markets). Prices, shipping options and delivery dates follow it. US gives the fullest search cards; for other markets the Actor fills rating and orders from the US view by product ID.",
            "default": "US"
          },
          "currency": {
            "title": "💱 Currency",
            "type": "string",
            "description": "Prices come back in this currency — USD, EUR, GBP, CAD, AUD, BRL, MXN, PLN, TRY, JPY, KRW, IDR, … (three-letter code).",
            "default": "USD"
          },
          "language": {
            "title": "🗣️ Language",
            "enum": [
              "en_US",
              "es_ES",
              "fr_FR",
              "de_DE",
              "it_IT",
              "pt_BR",
              "nl_NL",
              "pl_PL",
              "ru_RU",
              "tr_TR",
              "ja_JP",
              "ko_KR",
              "ar_MA",
              "iw_IL",
              "in_ID",
              "th_TH",
              "vi_VN"
            ],
            "type": "string",
            "description": "Language of titles, specifications, variant names and review translations.",
            "default": "en_US"
          },
          "includeDetails": {
            "title": "🧩 Full product details (add-on)",
            "type": "boolean",
            "description": "Opens each product page and adds: <b>every variant with its own price, original price, stock and per-shopper limit</b>, bulk (ladder) prices, total inventory, full specifications, image gallery and product video, seller (store ID, rating, positive-feedback rate, 180-day sales, opening date), every shipping option to your country with cost, carrier, warehouse, delivery days and dates, coupons and wishlist count. Billed per product with details.",
            "default": false
          },
          "includeDescription": {
            "title": "📝 Seller description",
            "type": "boolean",
            "description": "Adds the seller's full description as plain text, HTML and image list, plus attached PDF manuals. Turns on full details; no extra fee on top of the details add-on.",
            "default": false
          },
          "includeReviews": {
            "title": "💬 Buyer reviews (add-on)",
            "type": "boolean",
            "description": "Adds buyer reviews: star rating, text and its English translation, buyer country, the exact variant bought, shipping route, photos, follow-up review, helpful votes — plus the 1–5 star split and AliExpress's own review themes. Billed per review delivered.",
            "default": false
          },
          "maxReviewsPerProduct": {
            "title": "🔢 Reviews per product",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "How many reviews to collect for each product. <code>0</code> = every review AliExpress shows (up to 5,000). Only used when <b>Buyer reviews</b> is on.",
            "default": 20
          },
          "reviewFilter": {
            "title": "🖼️ Which reviews",
            "enum": [
              "all",
              "image",
              "additional",
              "local"
            ],
            "type": "string",
            "description": "Narrow the reviews collected.",
            "default": "all"
          },
          "reviewsOutput": {
            "title": "📄 Reviews layout",
            "enum": [
              "nested",
              "rows"
            ],
            "type": "string",
            "description": "Nested keeps one row per product with a <code>reviews</code> list. Rows writes each review as its own row with the product ID and title, so a spreadsheet gets one review per line.",
            "default": "nested"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Off by default — search pages answer a direct request. A challenged request is retried through other addresses automatically. Your own proxy URLs, if given, are used as they are.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}