{
  "openapi": "3.0.1",
  "info": {
    "title": "AliExpress Scraper",
    "description": "Search AliExpress and collect product listings. Product details and reviews are optional and stay on the same product row.",
    "version": "1.0",
    "x-build-id": "fAkRevdCisNIzlMlY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datascrapers~aliexpress-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datascrapers-aliexpress-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/datascrapers~aliexpress-scraper/runs": {
      "post": {
        "operationId": "runs-sync-datascrapers-aliexpress-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/datascrapers~aliexpress-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-datascrapers-aliexpress-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": {
          "searchQueries": {
            "title": "Search Queries",
            "type": "array",
            "description": "Product search phrases, such as usb c cable. Use this, Product URLs, or Product IDs.",
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "Product URLs",
            "type": "array",
            "description": "AliExpress item links, such as https://www.aliexpress.com/item/1005013092454380.html. Wholesale search links are treated as search queries.",
            "items": {
              "type": "string"
            }
          },
          "productIds": {
            "title": "Product IDs",
            "type": "array",
            "description": "Numeric AliExpress product ids, for example 1005013092454380.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max Products",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of product rows to return. 0 means no cap.",
            "default": 0
          },
          "region": {
            "title": "Ship-to Country",
            "enum": [
              "US",
              "DE",
              "GB",
              "FR",
              "ES",
              "IT",
              "NL",
              "PL",
              "AT",
              "BR",
              "IN",
              "PK",
              "AE",
              "SA",
              "TR",
              "JP",
              "KR",
              "RU"
            ],
            "type": "string",
            "description": "Country used for prices, language, and shipping. Match the proxy country to this value.",
            "default": "US"
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "Optional three-letter currency override, such as USD. Leave empty to use the ship-to country currency."
          },
          "locale": {
            "title": "Locale",
            "type": "string",
            "description": "Optional locale override, such as en_US or de_DE. Leave empty to use the ship-to country locale."
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "default",
              "orders",
              "price_asc",
              "price_desc"
            ],
            "type": "string",
            "description": "How search results are ordered.",
            "default": "default"
          },
          "categoryId": {
            "title": "Category ID",
            "type": "string",
            "description": "Optional AliExpress category id to narrow search."
          },
          "minPrice": {
            "title": "Minimum Price",
            "type": "number",
            "description": "Inclusive minimum price in the ship-to currency. Leave empty for no minimum."
          },
          "maxPrice": {
            "title": "Maximum Price",
            "type": "number",
            "description": "Inclusive maximum price in the ship-to currency. Leave empty for no maximum."
          },
          "shipFrom": {
            "title": "Ship From",
            "type": "string",
            "description": "Optional ship-from country code, such as CN or US. This is not the ship-to country."
          },
          "freeShippingOnly": {
            "title": "Free Shipping Only",
            "type": "boolean",
            "description": "Keep search results that offer free shipping.",
            "default": false
          },
          "switches": {
            "title": "Extra Search Switches",
            "type": "array",
            "description": "Optional storefront filter codes, such as freeshipping. The filterCode: prefix is added when missing.",
            "items": {
              "type": "string"
            }
          },
          "includeProductDetails": {
            "title": "Include Product Details",
            "type": "boolean",
            "description": "Add a productDetails object on each product row. Off by default. Charged once per product when the details are returned. Uses concurrency.",
            "default": false
          },
          "includeReviews": {
            "title": "Include Reviews",
            "type": "boolean",
            "description": "Add a productReviews object on each product row. Off by default. Reviews are nested in that object and charged one by one. Uses concurrency.",
            "default": false
          },
          "maxReviewsPerProduct": {
            "title": "Max Reviews per Product",
            "minimum": 0,
            "type": "integer",
            "description": "How many reviews to keep on each product when reviews are enabled. 0 means every review page.",
            "default": 20
          },
          "reviewFilter": {
            "title": "Review Filter",
            "enum": [
              "all",
              "image",
              "local",
              "additional",
              "with_personal"
            ],
            "type": "string",
            "description": "Which reviews to collect.",
            "default": "all"
          },
          "reviewSort": {
            "title": "Review Sort",
            "enum": [
              "default",
              "newest"
            ],
            "type": "string",
            "description": "Review order.",
            "default": "default"
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many products to enrich at once. Used only when product details or reviews are enabled.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Residential proxy. Set the country to the same ship-to country.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}