{
  "openapi": "3.0.1",
  "info": {
    "title": "AliExpress Search Scraper",
    "description": "Search AliExpress by keyword or search address and get every product with its exact sold count, price, rating and delivery days. Run it on a schedule and each row says how many units sold since the last run and how the price moved.",
    "version": "0.1",
    "x-build-id": "yTrfwQv2U291CFZ1K"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pumpkinapi~aliexpress-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pumpkinapi-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/pumpkinapi~aliexpress-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-pumpkinapi-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/pumpkinapi~aliexpress-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-pumpkinapi-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",
            "type": "array",
            "description": "What to search for on AliExpress, one keyword per line, in any language. Example: wireless earbuds. Use this, Search addresses, or both.",
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "Search addresses",
            "type": "array",
            "description": "AliExpress search result addresses, one per line, such as https://www.aliexpress.com/w/wholesale-dog-toys.html?minPrice=5. Filters in the address stay unless you set the same filter below. Category and product pages are not search pages.",
            "items": {
              "type": "string"
            }
          },
          "maxProductsPerSearch": {
            "title": "Products per search",
            "minimum": 1,
            "type": "integer",
            "description": "How many products to take from each keyword or address. One page holds 60 products and AliExpress stops at page 60, so the most one search can give is 3,600.",
            "default": 60
          },
          "maxProducts": {
            "title": "Products per run",
            "minimum": 0,
            "type": "integer",
            "description": "The run stops after saving this many products in total. 0 means no limit.",
            "default": 1000
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "best_match",
              "orders",
              "price_asc",
              "price_desc"
            ],
            "type": "string",
            "description": "The order AliExpress lists the products in. Most orders finds the best sellers first.",
            "default": "best_match"
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "Only products priced at this or more, in the chosen currency. AliExpress applies it, so filtered products are never saved or charged."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "Only products priced at this or less, in the chosen currency."
          },
          "minSold": {
            "title": "Minimum units sold",
            "minimum": 0,
            "type": "integer",
            "description": "Only products that sold at least this many units in total. Products without a sold count are left out."
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Only products rated at least this many stars, 1 to 5. Products without a rating are left out."
          },
          "freeShippingOnly": {
            "title": "Free shipping only",
            "type": "boolean",
            "description": "Only products with free shipping to the ship-to country.",
            "default": false
          },
          "choiceOnly": {
            "title": "AliExpress Choice only",
            "type": "boolean",
            "description": "Only products in the Choice program.",
            "default": false
          },
          "shipFromCountry": {
            "title": "Ships from",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Only products shipped from this country, as a two-letter code such as US or CN. Empty means any."
          },
          "shipToCountry": {
            "title": "Ship to",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "The country you buy for, as a two-letter code such as US, DE or BR. Prices, delivery days and the product selection follow it.",
            "default": "US"
          },
          "priceCurrency": {
            "title": "Currency",
            "pattern": "^[A-Za-z]{3}$",
            "type": "string",
            "description": "The currency for every price, as a three-letter code such as USD, EUR or JPY.",
            "default": "USD"
          },
          "monitorName": {
            "title": "Tracker name",
            "pattern": "^[A-Za-z0-9]([A-Za-z0-9-]{0,30}[A-Za-z0-9])?$",
            "type": "string",
            "description": "The run remembers the sold count and price of every product under this name and compares the next run against it. Use one name per schedule, or one for every search you repeat. Letters, numbers and hyphens.",
            "default": "default"
          },
          "onlyChanged": {
            "title": "Only products that sold or changed price",
            "type": "boolean",
            "description": "Save only products that sold at least one unit or changed price since the last run with this tracker name. The first run saves everything as the baseline. Products not saved are not charged.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}