{
  "openapi": "3.0.1",
  "info": {
    "title": "AliExpress Search Scraper — Prices, Sold Count & Ratings",
    "description": "AliExpress search scraper for keyword and search-URL product cards. Get item ID, title, sale price, exact sold count when exposed, rating, Choice and free-shipping flags, store name, and ship-from. Fast HTTP — no browser. Built for dropshipping research and price monitoring.",
    "version": "0.1",
    "x-build-id": "4KYKAHSSVsVLvlN6h"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawloop~aliexpress-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawloop-aliexpress-search-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/crawloop~aliexpress-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawloop-aliexpress-search-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/crawloop~aliexpress-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawloop-aliexpress-search-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": {
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Primary AliExpress keyword or phrase (e.g. bluetooth earbuds)."
          },
          "queries": {
            "title": "Search queries (batch)",
            "type": "array",
            "description": "Optional extra keywords. Each query uses the same ship-to, currency, sort, and filters. Up to 4 run in parallel (`maxConcurrency`).",
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "AliExpress search URLs",
            "type": "array",
            "description": "Paste /w/wholesale-… or /wholesale?SearchText= URLs. Query-string filters are kept; pagination updates the page parameter.",
            "items": {
              "type": "string"
            }
          },
          "maxPages": {
            "title": "Maximum pages",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Search pages per query or URL (1–20). AliExpress typically returns 60 cards per page. Stops earlier if maxItems is reached.",
            "default": 1
          },
          "maxItems": {
            "title": "Max products per query",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap on products saved per keyword or search URL. Combined with maxPages — scraping stops at whichever limit is reached first."
          },
          "startPage": {
            "title": "Start page",
            "minimum": 1,
            "type": "integer",
            "description": "First search results page (1-based).",
            "default": 1
          },
          "shipTo": {
            "title": "Ship-to country",
            "enum": [
              "US",
              "GB",
              "DE",
              "FR",
              "IT",
              "ES",
              "NL",
              "PL",
              "BE",
              "PT",
              "SE",
              "CZ",
              "CA",
              "MX",
              "BR",
              "AU",
              "JP",
              "KR",
              "IN",
              "AE",
              "SA",
              "TR",
              "IL",
              "TH",
              "VN",
              "ID",
              "MY",
              "SG",
              "HK",
              "TW",
              "NZ",
              "ZA",
              "EG",
              "NG",
              "PK",
              "RU",
              "CN"
            ],
            "type": "string",
            "description": "ISO country that sets shipping locale and is sent as aep_usuc_f region. Also pins Apify Proxy geo when proxy is enabled.",
            "default": "US"
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "CAD",
              "AUD",
              "MXN",
              "BRL",
              "JPY",
              "KRW",
              "CNY",
              "INR",
              "AED",
              "SAR",
              "TRY",
              "PLN",
              "CZK",
              "SEK",
              "CHF",
              "THB",
              "VND",
              "IDR",
              "MYR",
              "SGD",
              "HKD",
              "TWD",
              "NZD",
              "ILS",
              "ZAR",
              "EGP",
              "NGN",
              "PKR",
              "RUB"
            ],
            "type": "string",
            "description": "ISO currency for displayed prices (aep_usuc_f c_tp). Pair with shipTo / proxy geo so AliExpress does not override it from the IP.",
            "default": "USD"
          },
          "language": {
            "title": "Language",
            "enum": [
              "en_US",
              "es_ES",
              "fr_FR",
              "de_DE",
              "it_IT",
              "pt_BR",
              "pt_PT",
              "nl_NL",
              "pl_PL",
              "ru_RU",
              "ja_JP",
              "ko_KR",
              "ar_MA",
              "tr_TR",
              "th_TH",
              "vi_VN",
              "id_ID",
              "iw_IL"
            ],
            "type": "string",
            "description": "UI / title locale (b_locale cookie).",
            "default": "en_US"
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "default",
              "orders",
              "price_asc",
              "price_desc",
              "newest"
            ],
            "type": "string",
            "description": "AliExpress search sort. Keyword searches only — pasted searchUrls keep their own SortType.",
            "default": "default"
          },
          "includeSponsored": {
            "title": "Include sponsored results",
            "type": "boolean",
            "description": "Keep paid/ad cards (`productType=ad`). Turn off for organic cards only.",
            "default": true
          },
          "choiceOnly": {
            "title": "Choice only",
            "type": "boolean",
            "description": "Keep only AliExpress Choice cards (also sent as a search switch when scraping by keyword).",
            "default": false
          },
          "freeShippingOnly": {
            "title": "Free shipping only",
            "type": "boolean",
            "description": "Keep only cards tagged Free shipping (also sent as a search switch when scraping by keyword).",
            "default": false
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "number",
            "description": "Drop cards cheaper than this amount in the listing currency. Also sent on keyword search URLs."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "number",
            "description": "Drop cards more expensive than this amount in the listing currency. Also sent on keyword search URLs."
          },
          "minStars": {
            "title": "Minimum star rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Keep cards with at least this average rating (0–5). Cards without a rating are dropped when this filter is set."
          },
          "deduplicateIds": {
            "title": "Deduplicate product IDs",
            "type": "boolean",
            "description": "When enabled, each productId is saved only once across all queries in the run.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Query concurrency",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "How many keywords/URLs to scrape in parallel (1–4). Each query uses its own sticky proxy session. Keep low — AliExpress rate-limits aggressively.",
            "default": 2
          },
          "autoEscalateOnBlock": {
            "title": "Escalate to residential on block",
            "type": "boolean",
            "description": "If a datacenter response is empty or punished, retry the session on Apify Residential (same ship-to country).",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy. Default is datacenter; geo is pinned to shipTo. Enable the RESIDENTIAL group if you see empty pages. Currency follows shipTo + this geo.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}