{
  "openapi": "3.0.1",
  "info": {
    "title": "AliExpress Search API & Scraper",
    "description": "AliExpress scraper and search API: enter keywords and get one clean row per search result with price, discount, currency, rating, sold count, image and item link. No login; pay only for saved results. Unofficial: not affiliated with or endorsed by AliExpress or Alibaba Group.",
    "version": "0.1",
    "x-build-id": "GeIDdA4btS0ffBBrw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sourcing-data-studio~aliexpress-search-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sourcing-data-studio-aliexpress-search-api",
        "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/sourcing-data-studio~aliexpress-search-api/runs": {
      "post": {
        "operationId": "runs-sync-sourcing-data-studio-aliexpress-search-api",
        "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/sourcing-data-studio~aliexpress-search-api/run-sync": {
      "post": {
        "operationId": "run-sync-sourcing-data-studio-aliexpress-search-api",
        "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",
        "required": [
          "searchQueries"
        ],
        "properties": {
          "searchQueries": {
            "title": "Search terms",
            "minItems": 1,
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "Keywords to search on AliExpress, one term per line, exactly as you would type them in the AliExpress search box (for example: phone case, usb c cable, led strip lights). Each term is searched separately and its results are followed page by page (about 60 results per page). Up to 20 terms per run, each up to 200 characters. Repeated terms are searched once. For AI agents: pass an array of plain strings; do not pass URLs, item ids or category names.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of search results to save and pay for in this run, counted across all search terms together (not per term). The run stops as soon as this many rows are saved. You pay only for saved rows. An item that appears under several terms is saved once. For AI agents: use 10 for a quick test and raise it when more rows are needed; with several terms, set it to roughly 60 times the number of terms to get the first page of each.",
            "default": 100
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "relevance",
              "orders",
              "priceAsc",
              "priceDesc"
            ],
            "type": "string",
            "description": "Order of the results. relevance (default) is the default order of AliExpress. orders puts the results with the most orders first, priceAsc the lowest price first and priceDesc the highest price first. AliExpress applies the order inside each result page (about 60 results) and starts again on the next page, so sort the rows yourself when you read more than one page. The Actor adds the order to the address of the search page it reads; paging, Maximum results and the charges work as before. Compare prices only between rows with the same priceType. Example: priceAsc. For AI agents: pass one of relevance, orders, priceAsc, priceDesc; any other value is rejected with an error and the run does not start.",
            "default": "relevance"
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "number",
            "description": "Lowest price to show, a number of 0 or more, for example 2.5. AliExpress applies it, in the currency it shows for the request: the Actor cannot choose that currency, because it follows the address the request comes from. Check the currency field of the rows (a test from Bahrain returned BHD, the default Apify Proxy returned USD or EUR in tests). A price range can also bring fewer results per page. Leave empty or 0 for no lower limit. Up to three decimals are used."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "number",
            "description": "Highest price to show, a number of 0 or more, for example 10. It must be at least Minimum price when both are set. AliExpress applies it, in the currency it shows for the request: the Actor cannot choose that currency, because it follows the address the request comes from. Check the currency field of the rows. Leave empty or 0 for no upper limit. Up to three decimals are used."
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Minimum star rating from 0 to 5, for example 4.5. The Actor applies it to the results it has read: a result whose rating is lower, or that shows no rating, is not saved and not charged. Many results show no rating (a product without reviews has none, and AliExpress also serves a shorter result card without one), so a minimum rating can leave out many results. Leave empty or 0 for no minimum. When a minimum rating or a minimum sold count is set, a search term stops after 3 result pages in a row that add no saved result, or after 20 pages, whichever comes first; the run summary says which (stoppedBy)."
          },
          "minSoldCount": {
            "title": "Minimum sold count",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Minimum number of items sold, a whole number of 0 or more, for example 100. The Actor applies it to the salesCount of the results it has read: a result whose sold count is lower, or that shows none, is not saved and not charged. Some results show no sold count (AliExpress also serves a shorter result card without one). Leave empty or 0 for no minimum. The same stop rule as for Minimum rating applies: a search term stops after 3 result pages in a row that add no saved result, or after 20 pages, whichever comes first."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy servers used to load the search pages. Keep the default (Apify Proxy, automatic) unless you know you need something else. AliExpress picks the currency and the language from the address the request comes from, so the proxy decides both; every row states its currency in the currency field. In test runs the default proxy returned USD or EUR prices and English text.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxRequestRetries": {
            "title": "Retries per page",
            "minimum": 0,
            "maximum": 6,
            "type": "integer",
            "description": "How many times a failed search page (a server error, a timeout, a first result page without result cards) is loaded again, waiting longer each time. A page that AliExpress answers with a block or a verification page is not asked for again in the same run: it is listed as blocked in the run summary (key-value store record RUN_SUMMARY) and nothing is charged. Pages that still fail after the retries are listed there too and are never charged. The default of 3 fits almost every run.",
            "default": 3
          },
          "debugLog": {
            "title": "Debug log",
            "type": "boolean",
            "description": "Print detailed debug messages to the run log. Leave off unless you are investigating a problem; it does not change the results.",
            "default": false
          },
          "feedback": {
            "title": "Feedback for the developer",
            "maxLength": 1000,
            "type": "string",
            "description": "Optional. Tell us which field, filter or country you need next, or what went wrong. It is saved with the run summary and does not change the results. Do not include personal data. AI agents may also use this field to report problems."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}