{
  "openapi": "3.0.1",
  "info": {
    "title": "AliExpress Product Trends Scraper",
    "description": "AliExpress scraper for prices, exact sold counts and daily sales. Search by keyword or URL, pick your ship-to country, and track which products are accelerating between runs. Export to JSON, CSV or Excel.",
    "version": "0.0",
    "x-build-id": "DdbDv8SEQylHnhnZf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rogelio.perez~aliexpress-product-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rogelio.perez-aliexpress-product-trends-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/rogelio.perez~aliexpress-product-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rogelio.perez-aliexpress-product-trends-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/rogelio.perez~aliexpress-product-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rogelio.perez-aliexpress-product-trends-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 keywords",
            "type": "array",
            "description": "One product keyword per line, for example `led strip lights`. Leave this and the URLs empty to run a 20-product demo.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "AliExpress search or category URLs",
            "type": "array",
            "description": "Optional. Paste AliExpress search-result or category pages (aliexpress.com/w/wholesale-...). The page number is added automatically.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "country": {
            "title": "Ship-to country",
            "enum": [
              "US",
              "GB",
              "CA",
              "AU",
              "DE",
              "FR",
              "ES",
              "IT",
              "NL"
            ],
            "type": "string",
            "description": "Sets the market AliExpress shows: prices, availability and the default currency.",
            "default": "US"
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "auto",
              "USD",
              "EUR",
              "GBP",
              "CAD",
              "AUD"
            ],
            "type": "string",
            "description": "Leave on Auto to use the country's default currency.",
            "default": "auto"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "orders",
              "relevance",
              "newest",
              "price_asc",
              "price_desc"
            ],
            "type": "string",
            "description": "Best selling shows proven sellers. Newest leans toward recently listed products using AliExpress's own ordering, so check the launch date in the results.",
            "default": "orders"
          },
          "maxItems": {
            "title": "Max products",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Stop after this many products in total. Each product is one billed result, so this also caps your cost.",
            "default": 60
          },
          "maxPagesPerQuery": {
            "title": "Max pages per keyword",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "AliExpress shows about 60 products per page. Results run out around page 40 to 50, roughly 2,400 to 3,000 products per keyword.",
            "default": 3
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "number",
            "description": "In the selected currency."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "number",
            "description": "In the selected currency."
          },
          "minSold": {
            "title": "Minimum units sold",
            "minimum": 0,
            "type": "integer",
            "description": "Keep products with at least this many orders in total.",
            "default": 0
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Star rating from 0 to 5.",
            "default": 0
          },
          "freeShippingOnly": {
            "title": "Free shipping only",
            "type": "boolean",
            "description": "Keep only products that show a free-shipping badge.",
            "default": false
          },
          "choiceOnly": {
            "title": "AliExpress Choice only",
            "type": "boolean",
            "description": "Keep only products in AliExpress's Choice program.",
            "default": false
          },
          "includeIncomplete": {
            "title": "Include products with missing sales or price data",
            "type": "boolean",
            "description": "AliExpress sometimes returns a product without its sold count or launch date (usually when an IP is rate-limited) or without a price (for example when it cannot ship to your country). These are skipped by default and not billed. Turn this on to keep them; the missing fields will be empty.",
            "default": false
          },
          "trackMomentum": {
            "title": "Track sales growth between runs",
            "type": "boolean",
            "description": "Saves each product's sold count so the next run can report how much it sold since. Schedule the Actor daily or weekly: AliExpress updates order counts with a delay, so short gaps show little change.",
            "default": true
          },
          "trackingId": {
            "title": "Tracking ID",
            "type": "string",
            "description": "Runs that share a tracking ID compare against each other. Use different IDs for different niches or watchlists.",
            "default": "default"
          },
          "minDailySales": {
            "title": "Minimum daily sales",
            "minimum": 0,
            "type": "number",
            "description": "Keep only products selling at least this many units per day. Set it to find winners, for example 20.",
            "default": 0
          },
          "outputOrder": {
            "title": "Output order",
            "enum": [
              "scraped",
              "dailySales"
            ],
            "type": "string",
            "description": "Sort the results by daily sales to see the fastest sellers first.",
            "default": "scraped"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "AliExpress throttles one IP after roughly 10 to 20 pages, so a proxy lets large runs finish. The Actor rotates IPs automatically.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}