{
  "title": "AliExpress Scraper Input",
  "description": "Search AliExpress by keyword, look up products and stores, or collect customer reviews across major shopper regions.",
  "type": "object",
  "schemaVersion": 1,
  "properties": {
    "mode": {
      "title": "Mode",
      "type": "string",
      "editor": "select",
      "description": "What to collect. search: keyword results. byProduct: product lookup by ID or URL. byStore: store lookup. byReviews: customer reviews. byUrl: auto-detect from pasted AliExpress links.",
      "enum": [
        "search",
        "byProduct",
        "byStore",
        "byReviews",
        "byUrl"
      ],
      "enumTitles": [
        "Search by keyword",
        "Look up products",
        "Look up stores",
        "Collect reviews",
        "Auto-detect from URLs"
      ],
      "default": "search",
      "prefill": "search",
      "sectionCaption": "Mode & Inputs"
    },
    "searchQueries": {
      "title": "Search queries (mode=search)",
      "type": "array",
      "editor": "stringList",
      "description": "One or more keywords, e.g. \"phone case\" or \"wireless earbuds\". Each query is scraped up to maxPages pages.",
      "prefill": [
        "phone case"
      ]
    },
    "productIds": {
      "title": "Product IDs or URLs (mode=byProduct or byReviews)",
      "type": "array",
      "editor": "stringList",
      "description": "Numeric AliExpress product IDs or item URLs. Both 1005… and 3256… ID formats are accepted.",
      "prefill": [
        "1005010155028387"
      ]
    },
    "storeIds": {
      "title": "Store IDs or URLs (mode=byStore)",
      "type": "array",
      "editor": "stringList",
      "description": "Numeric store IDs or /store/… URLs.",
      "prefill": [
        "1101493050"
      ]
    },
    "urls": {
      "title": "AliExpress URLs (mode=byUrl)",
      "type": "array",
      "editor": "stringList",
      "description": "Any mix of search, item, store and review URLs. The mode is detected per URL.",
      "prefill": [
        "https://www.aliexpress.com/item/1005010155028387.html"
      ]
    },
    "region": {
      "title": "Shopper region",
      "type": "string",
      "editor": "select",
      "description": "Country used for prices, availability and the storefront locale. Global leaves the region to the requesting IP.",
      "default": "US",
      "prefill": "US",
      "sectionCaption": "Region & Locale",
      "enumSuggestedValues": [
        "US",
        "GB",
        "DE",
        "FR",
        "ES",
        "IT",
        "NL",
        "PT",
        "PL",
        "BR",
        "MX",
        "CA",
        "AU",
        "JP",
        "KR",
        "TR",
        "SA",
        "AE",
        "IL",
        "GLOBAL"
      ]
    },
    "currency": {
      "title": "Currency override",
      "type": "string",
      "editor": "select",
      "description": "Optional ISO-4217 currency. Leave blank to use the region's usual currency. The currency actually returned is recorded in every record.",
      "enum": [
        "",
        "USD",
        "EUR",
        "GBP",
        "JPY",
        "CNY",
        "RUB",
        "BRL",
        "INR",
        "AUD",
        "CAD",
        "HKD",
        "TWD",
        "KRW",
        "SGD",
        "MXN",
        "ARS",
        "CLP",
        "COP",
        "PEN",
        "UYU",
        "ILS",
        "TRY",
        "AED",
        "SAR",
        "ZAR",
        "PLN",
        "CHF",
        "SEK",
        "NOK",
        "DKK",
        "CZK",
        "HUF",
        "RON",
        "THB",
        "VND",
        "PHP",
        "IDR",
        "MYR",
        "NZD",
        "PKR",
        "EGP",
        "NGN"
      ],
      "enumTitles": [
        "(use region currency)",
        "USD",
        "EUR",
        "GBP",
        "JPY",
        "CNY",
        "RUB",
        "BRL",
        "INR",
        "AUD",
        "CAD",
        "HKD",
        "TWD",
        "KRW",
        "SGD",
        "MXN",
        "ARS",
        "CLP",
        "COP",
        "PEN",
        "UYU",
        "ILS",
        "TRY",
        "AED",
        "SAR",
        "ZAR",
        "PLN",
        "CHF",
        "SEK",
        "NOK",
        "DKK",
        "CZK",
        "HUF",
        "RON",
        "THB",
        "VND",
        "PHP",
        "IDR",
        "MYR",
        "NZD",
        "PKR",
        "EGP",
        "NGN"
      ],
      "default": "",
      "prefill": "USD"
    },
    "language": {
      "title": "Language",
      "type": "string",
      "editor": "select",
      "description": "Storefront language and the language used to translate review text.",
      "enum": [
        "en_US",
        "es_ES",
        "fr_FR",
        "de_DE",
        "it_IT",
        "pt_BR",
        "pt_PT",
        "ru_RU",
        "ja_JP",
        "ko_KR",
        "ar_MA",
        "tr_TR",
        "th_TH",
        "vi_VN",
        "id_ID",
        "nl_NL",
        "pl_PL",
        "iw_IL"
      ],
      "enumTitles": [
        "English (US)",
        "Spanish (Spain)",
        "French (France)",
        "German (Germany)",
        "Italian (Italy)",
        "Portuguese (Brazil)",
        "Portuguese (Portugal)",
        "Russian (Russia)",
        "Japanese (Japan)",
        "Korean (Korea)",
        "Arabic (Morocco)",
        "Turkish (Turkey)",
        "Thai (Thailand)",
        "Vietnamese (Vietnam)",
        "Indonesian (Indonesia)",
        "Dutch (Netherlands)",
        "Polish (Poland)",
        "Hebrew (Israel)"
      ],
      "default": "en_US",
      "prefill": "en_US"
    },
    "sortBy": {
      "title": "Sort order (mode=search)",
      "type": "string",
      "editor": "select",
      "description": "How keyword results are ordered. AliExpress does not expose a newest sort.",
      "default": "default",
      "prefill": "default",
      "sectionCaption": "Filters",
      "enumSuggestedValues": [
        "default",
        "orders_desc",
        "price_asc",
        "price_desc",
        "newest"
      ]
    },
    "priceMin": {
      "title": "Minimum price",
      "type": "number",
      "description": "Minimum price in the selected currency. 0 disables the lower bound.",
      "minimum": 0,
      "maximum": 1000000,
      "default": 0,
      "prefill": 0
    },
    "priceMax": {
      "title": "Maximum price",
      "type": "number",
      "description": "Maximum price in the selected currency. 0 disables the upper bound.",
      "minimum": 0,
      "maximum": 1000000,
      "default": 0,
      "prefill": 0
    },
    "ratingMin": {
      "title": "Minimum rating",
      "type": "number",
      "description": "Minimum star rating from 0 to 5. Products without a rating are skipped when a threshold is set.",
      "minimum": 0,
      "maximum": 5,
      "default": 0,
      "prefill": 0
    },
    "shipFrom": {
      "title": "Ship from country",
      "type": "string",
      "editor": "select",
      "description": "Only show items stocked in this country. Leave blank for any warehouse.",
      "enum": [
        "",
        "CN",
        "US",
        "RU",
        "ES",
        "FR",
        "DE",
        "IT",
        "GB",
        "PL",
        "TR",
        "BR",
        "JP",
        "KR",
        "AU",
        "CA",
        "MX",
        "AE",
        "SA",
        "IL",
        "TH",
        "VN",
        "ID",
        "MY",
        "NL",
        "BE",
        "PT"
      ],
      "enumTitles": [
        "(any warehouse)",
        "CN",
        "US",
        "RU",
        "ES",
        "FR",
        "DE",
        "IT",
        "GB",
        "PL",
        "TR",
        "BR",
        "JP",
        "KR",
        "AU",
        "CA",
        "MX",
        "AE",
        "SA",
        "IL",
        "TH",
        "VN",
        "ID",
        "MY",
        "NL",
        "BE",
        "PT"
      ],
      "default": "",
      "prefill": ""
    },
    "freeShippingOnly": {
      "title": "Free shipping only",
      "type": "boolean",
      "description": "Only show items advertised with free shipping.",
      "editor": "checkbox",
      "default": false,
      "prefill": false
    },
    "choiceOnly": {
      "title": "AliExpress Choice only",
      "type": "boolean",
      "description": "Only show AliExpress Choice items.",
      "editor": "checkbox",
      "default": false,
      "prefill": false
    },
    "fourStarPlus": {
      "title": "4 stars and up only",
      "type": "boolean",
      "description": "Only show items rated 4.0 or higher. The actor enforces the 4.0 threshold after AliExpress returns its filtered page.",
      "editor": "checkbox",
      "default": false,
      "prefill": false
    },
    "includeSponsored": {
      "title": "Include sponsored results",
      "type": "boolean",
      "description": "Include promoted product cards; they are marked isSponsored in the output.",
      "editor": "checkbox",
      "default": true,
      "prefill": true
    },
    "includeWelcomeGifts": {
      "title": "Include welcome-gift cards",
      "type": "boolean",
      "description": "Include $0.00 new-shopper gift cards; they are marked isWelcomeGift and have no normal price.",
      "editor": "checkbox",
      "default": false,
      "prefill": false
    },
    "maxItems": {
      "title": "Max items",
      "type": "integer",
      "description": "Hard cap on records emitted by the run.",
      "editor": "number",
      "minimum": 1,
      "maximum": 10000,
      "default": 100,
      "prefill": 3,
      "sectionCaption": "Limits"
    },
    "maxPages": {
      "title": "Max search pages",
      "type": "integer",
      "description": "Maximum result pages per query (60 products per page, up to 60 pages).",
      "editor": "number",
      "minimum": 1,
      "maximum": 60,
      "default": 3,
      "prefill": 1
    },
    "includeReviews": {
      "title": "Attach reviews",
      "type": "boolean",
      "description": "Fetch customer reviews for each product (slow and adds records to the product).",
      "editor": "checkbox",
      "default": false,
      "prefill": false,
      "sectionCaption": "Reviews"
    },
    "maxReviewsPerProduct": {
      "title": "Max reviews per product",
      "type": "integer",
      "description": "Review cap per product when reviews are fetched. 0 uses the default of 20.",
      "editor": "number",
      "minimum": 0,
      "maximum": 200,
      "default": 20,
      "prefill": 20
    },
    "reviewFilter": {
      "title": "Review filter",
      "type": "string",
      "editor": "select",
      "description": "Which reviews to collect.",
      "enum": [
        "all",
        "withPhotos",
        "additional"
      ],
      "enumTitles": [
        "All reviews",
        "With photos",
        "With follow-up"
      ],
      "default": "all",
      "prefill": "all"
    },
    "includeProductStats": {
      "title": "Include review summary",
      "type": "boolean",
      "description": "Add each product's average rating and total review count to review records.",
      "editor": "checkbox",
      "default": true,
      "prefill": true
    }
  },
  "required": [
    "mode"
  ]
}
