{
  "openapi": "3.0.1",
  "info": {
    "title": "AliExpress Scraper: Products, Prices, Discounts & Deals",
    "description": "Scrape AliExpress search results with sale price, original price, discount %, sold count, rating and store. Filter to real deals by minimum discount and units sold. Currency and ship-to country pinned on every row. No proxy needed. Export CSV, Excel or JSON. Beta: feedback welcome.",
    "version": "0.1",
    "x-build-id": "pInUKjBAvRrvv9YzP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mjohnson7cd~aliexpress-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mjohnson7cd-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/mjohnson7cd~aliexpress-scraper/runs": {
      "post": {
        "operationId": "runs-sync-mjohnson7cd-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/mjohnson7cd~aliexpress-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-mjohnson7cd-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 keywords",
            "maxItems": 200,
            "type": "array",
            "description": "Keywords to search on AliExpress, exactly as you would type them in the AliExpress search box. Each results page holds up to 60 products.",
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "Product URLs",
            "maxItems": 100,
            "type": "array",
            "description": "AliExpress product page URLs (https://www.aliexpress.com/item/<id>.html, also aliexpress.us and country subdomains). Returns the title and full image gallery; prices are only available from search (see README).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "productIds": {
            "title": "Product IDs",
            "maxItems": 100,
            "type": "array",
            "description": "AliExpress product IDs (the number in /item/<id>.html). Same output as Product URLs.",
            "items": {
              "type": "string"
            }
          },
          "maxPagesPerQuery": {
            "title": "Max result pages per query",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "How many search result pages to read for each keyword. AliExpress shows up to 60 products per page.",
            "default": 2
          },
          "maxResultsPerQuery": {
            "title": "Max products per query",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop a keyword after this many products have been delivered (after deal filters), even if more pages are allowed.",
            "default": 100
          },
          "minDiscountPercent": {
            "title": "Minimum discount %",
            "minimum": 0,
            "maximum": 99,
            "type": "integer",
            "description": "Only return products discounted by at least this percentage off the original price. 0 returns everything. Filtered-out products are not charged.",
            "default": 0
          },
          "minSold": {
            "title": "Minimum units sold",
            "minimum": 0,
            "type": "integer",
            "description": "Only return products that have sold at least this many units. 0 returns everything. Filtered-out products are not charged.",
            "default": 0
          },
          "sortBy": {
            "title": "Sort results",
            "enum": [
              "relevance",
              "discount",
              "sold"
            ],
            "type": "string",
            "description": "relevance keeps AliExpress order and streams results page by page. discount or sold reads all requested pages first, then returns the biggest discounts (or best sellers) first.",
            "default": "relevance"
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "CAD",
              "AUD",
              "BRL",
              "MXN",
              "PLN",
              "JPY",
              "KRW",
              "INR",
              "TRY",
              "CHF",
              "SEK",
              "NOK",
              "DKK",
              "CZK",
              "ILS",
              "SAR",
              "AED",
              "NZD",
              "CLP",
              "ZAR"
            ],
            "type": "string",
            "description": "Currency AliExpress should price in. Every row also carries a currency column with the currency AliExpress actually returned.",
            "default": "USD"
          },
          "shipToCountry": {
            "title": "Ship-to country",
            "type": "string",
            "description": "Two-letter country code (e.g. US, DE, GB). AliExpress prices, taxes and shipping depend on the destination country.",
            "default": "US"
          },
          "proxyType": {
            "title": "Proxy",
            "enum": [
              "none",
              "datacenter",
              "residential"
            ],
            "type": "string",
            "description": "AliExpress does not need a proxy, so the default is none (no proxy cost). Switch to datacenter or residential only if your runs start getting blocked.",
            "default": "none"
          },
          "useCache": {
            "title": "Use short-lived cache",
            "type": "boolean",
            "description": "Off by default: every run fetches live from AliExpress. Turn on to reuse a result fetched in the last few hours (3 hours by default, never more than 6 for price data) instead of fetching it again. The cache lives in your own Apify account and expired entries are deleted. Every row shows from_cache, cached_at and cache_age_seconds.",
            "default": false
          },
          "cacheMaxAgeHours": {
            "title": "Max cache age (hours)",
            "minimum": 0,
            "maximum": 6,
            "type": "integer",
            "description": "Ignore cached results older than this many hours. Leave empty to accept anything within the cache lifetime (3 hours)."
          },
          "forceRefresh": {
            "title": "Force refresh",
            "type": "boolean",
            "description": "Only with Use short-lived cache on: skip cached results, fetch everything live for this run and refresh the cache with the new results.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}