{
  "openapi": "3.0.1",
  "info": {
    "title": "AliExpress Search Scraper",
    "description": "Scrape AliExpress search results: price, discount, exact units sold, rating, Choice and free shipping. Many countries per run, price-change mode. No login.",
    "version": "0.1",
    "x-build-id": "ZKUragcTCvZ5ZKm6b"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/orbiting_solutions~aliexpress-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-orbiting_solutions-aliexpress-search",
        "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/orbiting_solutions~aliexpress-search/runs": {
      "post": {
        "operationId": "runs-sync-orbiting_solutions-aliexpress-search",
        "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/orbiting_solutions~aliexpress-search/run-sync": {
      "post": {
        "operationId": "run-sync-orbiting_solutions-aliexpress-search",
        "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": "Keywords",
            "type": "array",
            "description": "Search terms, 1 to 100, as you would type them on AliExpress. Each keyword runs once per ship-to country. Either keywords or start URLs are needed.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Search or category URLs",
            "type": "array",
            "description": "Optional. AliExpress search URLs (/w/wholesale-*.html) or category list URLs (/category/<id>/<name>.html). Product URLs (/item/...) are rejected: this Actor reads result lists only.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "countries": {
            "title": "Ship-to countries",
            "type": "array",
            "description": "ISO-2 markets, e.g. US, DE, GB. Prices, currency and the product set differ per market.",
            "default": [
              "US"
            ],
            "items": {
              "type": "string"
            }
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "",
              "USD",
              "EUR",
              "GBP",
              "CAD",
              "AUD",
              "PLN",
              "BRL",
              "MXN",
              "CHF",
              "SEK",
              "NOK",
              "DKK",
              "CZK",
              "TRY",
              "ILS",
              "KRW",
              "JPY",
              "NZD"
            ],
            "type": "string",
            "description": "Leave empty for each market's own currency (USD for US, EUR for DE, GBP for GB...).",
            "default": ""
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "de",
              "fr",
              "es",
              "it",
              "pt",
              "nl",
              "pl",
              "tr",
              "ru",
              "ko",
              "ja",
              "ar",
              "he",
              "th",
              "vi",
              "id"
            ],
            "type": "string",
            "description": "Title language (AliExpress machine-translates titles).",
            "default": "en"
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "best_match",
              "orders",
              "price_asc",
              "price_desc"
            ],
            "type": "string",
            "description": "Order of AliExpress results.",
            "default": "best_match"
          },
          "minPrice": {
            "title": "Min price",
            "minimum": 0,
            "type": "integer",
            "description": "In the run's currency. Sent to AliExpress and re-checked on output."
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 0,
            "type": "integer",
            "description": "In the run's currency. Sent to AliExpress and re-checked on output."
          },
          "shipFrom": {
            "title": "Ships from (ISO-2)",
            "type": "string",
            "description": "AliExpress shipFromCountry filter, e.g. US or CN."
          },
          "freeShippingOnly": {
            "title": "Free shipping only",
            "type": "boolean",
            "description": "AliExpress free-shipping filter.",
            "default": false
          },
          "choiceOnly": {
            "title": "Choice items only",
            "type": "boolean",
            "description": "AliExpress Choice filter.",
            "default": false
          },
          "minRating": {
            "title": "Min rating",
            "pattern": "^$|^[0-5](\\.\\d+)?$",
            "type": "string",
            "description": "Output filter, e.g. 4.5. Products without a rating are dropped when set. Filtered rows are free."
          },
          "minSold": {
            "title": "Min units sold",
            "minimum": 0,
            "type": "integer",
            "description": "Output filter. Filtered rows are free.",
            "default": 0
          },
          "includePromoted": {
            "title": "Include promoted (ad) cards",
            "type": "boolean",
            "description": "Ads are always flagged with isPromoted. Turn off to drop them (free).",
            "default": true
          },
          "maxItemsPerKeyword": {
            "title": "Max products per keyword and country",
            "minimum": 1,
            "maximum": 3600,
            "type": "integer",
            "description": "Unique products, 1 to 3,600 (AliExpress shows at most 60 pages of 60).",
            "default": 300
          },
          "maxItems": {
            "title": "Max products per run",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap for the whole run. Your max charge per run is respected too.",
            "default": 1000
          },
          "onlyChangedSinceLastRun": {
            "title": "Only new products and price changes",
            "type": "boolean",
            "description": "Output only products that are new in the scanned results (changeType newInResults, absent from the last N runs) and price changes on products already seen (priceChanged). Unchanged products are not output and not charged. AliExpress personalises rankings, so newInResults does not mean newly listed.",
            "default": false
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store that keeps a compact per-product history (last price, first and last seen, runs seen in). Use one name per watchlist.",
            "default": "aliexpress-monitor"
          },
          "historyRuns": {
            "title": "History window (runs)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Change-only mode: a product is output as newInResults only if it was absent from all of the last N runs with this state store. Higher means fewer false 'new' alerts from AliExpress's personalised ranking.",
            "default": 5
          },
          "maxConcurrency": {
            "title": "Parallel sessions",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "Parallel cookie sessions, 1 to 6. Higher is not always faster: AliExpress throttles per IP.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Default: Apify datacenter proxy as a fallback. The Actor starts direct and switches to this proxy at the first captcha cluster (measured on Apify: direct runs from Apify IPs hit captchas at about 27%, datacenter proxy about 10% with 0 failed pages). Turn off to stay direct.",
            "default": {
              "useApifyProxy": true
            }
          },
          "useProxyFromStart": {
            "title": "Use the proxy from the first request",
            "type": "boolean",
            "description": "Use the proxy above for every request instead of only after the first captcha cluster.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}