{
  "openapi": "3.0.1",
  "info": {
    "title": "AliExpress Search Scraper: Prices, Units Sold, Welcome Deals",
    "description": "Scrape AliExpress search results: price, unrounded units sold, sold per day, rating, listing date. Flags welcome-deal (new user) prices and, where possible, estimates the price without the deal. Daily sales and price tracking per search, optional review summary. No variants, stock or shipping cost.",
    "version": "0.2",
    "x-build-id": "G1UMpwKUl8ubTocqH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/keremingo~aliexpress-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-keremingo-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/keremingo~aliexpress-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-keremingo-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/keremingo~aliexpress-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-keremingo-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": {
          "keywords": {
            "title": "Search keywords",
            "maxItems": 100,
            "type": "array",
            "description": "What to search for on AliExpress, one keyword or phrase per line, for example \"phone case\". Words only: a web address is refused before the run starts. Each keyword is searched separately and gets its own status in the run summary. Keywords that lead to the same search (\"Phone Case\" and \"phone case\", \"t-shirt\" and \"t shirt\") are run once, and the run summary names them. Invisible characters that come with copy and paste are removed. A product that turns up under two different keywords is returned, and charged, once for each. Up to 100 keywords and URLs per run, 200 characters per keyword.",
            "items": {
              "type": "string",
              "pattern": "^(?!\\s*https?://)"
            }
          },
          "startUrls": {
            "title": "Search page URLs (not product pages)",
            "maxItems": 100,
            "type": "array",
            "description": "Instead of (or besides) keywords, paste the address of an AliExpress search or category results page, for example after you set filters on the site. The address must contain aliexpress.com/ or aliexpress.us/ followed by w/, wholesale or category/; any other address, such as a product or store page, is refused before the run starts. The filters in the address are kept. The Actor walks through the pages itself, so a page number in the address is ignored. An address that leads to the same search as another entry (a keyword above, or the same address with another page number or a click-tracking parameter) is run once. Product pages and store pages are not supported.",
            "items": {
              "type": "string",
              "pattern": "aliexpress\\.(com|us)/(w/|wholesale|category/)"
            }
          },
          "maxProductsPerKeyword": {
            "title": "Max products per keyword or URL",
            "minimum": 1,
            "maximum": 3600,
            "type": "integer",
            "description": "How many products to return for each keyword or search page URL, from 1 to 3,600. AliExpress shows 60 products per page, so 60 means one page, and it serves at most 60 pages per search; because pages repeat products, a very large request can come back with fewer (2,641 in a test that asked for 3,600). You are charged only for products that are returned. With filters switched on, at most three pages are read for every 60 products requested.",
            "default": 60
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "default",
              "orders",
              "price_asc",
              "price_desc"
            ],
            "type": "string",
            "description": "Order of results, same choices as on the AliExpress site: default = best match, orders = most orders, price_asc = cheapest first, price_desc = most expensive first. \"Most orders\" is the usual choice for finding best sellers. A sort order inside a pasted search page URL wins over this setting. The run summary reports the order AliExpress applied.",
            "default": "default"
          },
          "shipTo": {
            "title": "Ship-to country",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Two-letter country code of the shopper, for example US, GB (United Kingdom), DE or TR. Prices, promotions and availability on AliExpress depend on it. The proxy country follows this setting unless you choose one yourself.",
            "default": "US"
          },
          "currency": {
            "title": "Currency",
            "pattern": "^[A-Za-z]{3}$",
            "type": "string",
            "description": "Three-letter currency code to request, for example USD or EUR. Every row reports the currency AliExpress actually used, which can differ.",
            "default": "USD"
          },
          "includeReviewInsights": {
            "title": "Add review insights",
            "type": "boolean",
            "description": "For every returned product, also fetch its review summary: number of reviews, average star, star distribution, number of photo reviews, date of the latest review and the most frequent review keywords. One extra request per product, charged as a separate event (review-insight) only when it succeeds.",
            "default": false
          },
          "maxReviewsPerProduct": {
            "title": "Reviews per product",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Also add up to this many customer reviews to every product row (date, stars, text, country, variant, number of photos), in the order AliExpress shows them. Any value above 0 switches review insights on, so each product is charged one review look-up; the review texts add no further charge. 0 means no review texts, 20 is the maximum. Reviewer names are never included.",
            "default": 0
          },
          "trackingId": {
            "title": "Tracking ID",
            "type": "string",
            "description": "Give repeated runs the same ID (for example \"phone-cases-us\") to compare each product with the previous run: the change in its sold figure, in total and per day, the price change and a new / rising / flat / falling label. The first run only records; changes appear from the second run. Schedule such runs daily or weekly. Use one ID per schedule and do not run two runs with the same ID at the same time. The letters a-z and digits make the ID: capitals are read as small letters, accented letters without the accent (\"çanta\" is \"canta\"), and spaces and punctuation as a hyphen, so \"my niche\" and \"my_niche\" are the same ID. Letters of other alphabets are not accepted. At most 40 characters. Leave empty to switch tracking off."
          },
          "minSold": {
            "title": "Min sold count",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only products with at least this many units sold. Products without a sold figure are dropped when this is set."
          },
          "minRating": {
            "title": "Min star rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Keep only products rated at least this many stars, from 0 to 5, for example 4.5. Products without a rating are dropped when this is set."
          },
          "minPrice": {
            "title": "Min price",
            "minimum": 0,
            "type": "number",
            "description": "Keep only products that cost at least this much, in the currency of the results, for example 5 or 4.99. Compares with price, which is often a new-shopper price; set priceFiltersIgnoreNewShopperDeals to true to compare with the price without the deal."
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 0,
            "type": "number",
            "description": "Keep only products that cost at most this much, in the currency of the results, for example 5 or 4.99. Compares with price, which is often a new-shopper price; set priceFiltersIgnoreNewShopperDeals to true to compare with the price without the deal."
          },
          "priceFiltersIgnoreNewShopperDeals": {
            "title": "Price filters ignore new-shopper deals",
            "type": "boolean",
            "description": "When true, Min price and Max price compare with priceWithoutNewShopperDeal instead of the price shown, so a $1.09 welcome price does not let a $12 product through. Products for which that figure is unknown (bundle deals, cards without a price) are dropped when a price filter is set.",
            "default": false
          },
          "maxDaysListed": {
            "title": "Max listing age (days)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only products listed within this many days, for example 90 to find recent listings."
          },
          "shipsFrom": {
            "title": "Ships from",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Keep only products whose offer on the card ships from this country, as a two-letter code, for example US or CN. Applied after download, so with a rare country few products pass; to let AliExpress filter instead, set the filter on the site and paste the search page URL. Products for which AliExpress does not state the country are dropped when this is set."
          },
          "freeShippingOnly": {
            "title": "Free shipping only",
            "type": "boolean",
            "description": "Keep only products whose card prints a plain \"Free shipping\" label. AliExpress does not print the label on every card, so this can drop products that do ship free.",
            "default": false
          },
          "choiceOnly": {
            "title": "AliExpress Choice only",
            "type": "boolean",
            "description": "Keep only products that carry the AliExpress Choice label.",
            "default": false
          },
          "excludeSponsored": {
            "title": "Exclude sponsored listings",
            "type": "boolean",
            "description": "Drop paid ad placements from the results. Sponsored rows are otherwise kept and flagged with isSponsored.",
            "default": false
          },
          "failOnEmpty": {
            "title": "Fail a run with no products unless nothing matched",
            "type": "boolean",
            "description": "When true, a run that returns no products because AliExpress could not be read (requests blocked, pages or product cards that could not be read, or pages with only recommendation cards) ends as FAILED with the reason in the status message, instead of looking successful with an empty dataset. A run whose answer is empty, because AliExpress itself reports that nothing matches or because every product read was checked by your filters and none passed, ends as SUCCEEDED with a status message that begins \"No products matched\"; RUN_SUMMARY says which in emptyResult. When false, a run is never failed for returning no products, unless \"Also fail when nothing matched\" is on. Recommended for schedules and automations.",
            "default": true
          },
          "failOnNoMatch": {
            "title": "Also fail when nothing matched",
            "type": "boolean",
            "description": "When true, every run that returns no products ends as FAILED, also when AliExpress reports that nothing matches or no product passed your filters. Use it when an empty result must stop your automation.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many pages are requested at the same time. Our test runs used the default of 2; higher values are faster but were not tested.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Residential proxies are the default and recommended: the Actor was tested with them only.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "extraUrlParams": {
            "title": "Extra search URL parameters (advanced)",
            "type": "string",
            "description": "Raw query string appended to every search URL, for example a filter parameter copied from the AliExpress address bar. Leave empty unless you know you need it."
          },
          "debugRawPages": {
            "title": "Keep raw pages for troubleshooting (advanced)",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Saves the first responses of the run to the key-value store exactly as AliExpress sent them (records RAW_PAGE_1, RAW_PAGE_2, ...), so a problem can be looked into. A page that was blocked by a redirect has no body and is not saved. Leave at 0 for normal runs.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}