{
  "openapi": "3.0.1",
  "info": {
    "title": "AliExpress Category Scraper",
    "description": "Collect whole AliExpress categories in one run. Up to 998 products each with price, list price, discount, star rating, exact lifetime orders, launch date and Choice badge — plus the subcategories and brands beneath every category. 24 categories, any country, one clean table.",
    "version": "0.0",
    "x-build-id": "nc7QZk47JsORrbHgt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apt_marble~aliexpress-category-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apt_marble-aliexpress-category-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/apt_marble~aliexpress-category-scraper/runs": {
      "post": {
        "operationId": "runs-sync-apt_marble-aliexpress-category-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/apt_marble~aliexpress-category-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-apt_marble-aliexpress-category-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",
        "required": [
          "categories"
        ],
        "properties": {
          "categories": {
            "title": "Categories",
            "uniqueItems": true,
            "type": "array",
            "description": "Which AliExpress top-level categories to read. Type a category name as it appears on the site (\"Pet Supplies\", \"Electronics\") or its short id (\"pet_supplies\"). Enter \"all\" to read every one of the 24 top-level categories.",
            "default": [
              "pet_supplies",
              "electronics"
            ],
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country to shop from",
            "enum": [
              "us",
              "gb",
              "de",
              "fr",
              "es",
              "it",
              "nl",
              "pl",
              "ca",
              "au",
              "br",
              "mx",
              "ru",
              "sa",
              "ae",
              "il",
              "kr",
              "jp",
              "in",
              "sg",
              "cl",
              "za"
            ],
            "type": "string",
            "description": "Which country's version of AliExpress to read. This changes the prices, the currency AND which products are shown — two countries return genuinely different selections, not the same list at a different exchange rate.",
            "default": "us"
          },
          "resultType": {
            "title": "What to collect",
            "enum": [
              "products",
              "taxonomy",
              "both"
            ],
            "type": "string",
            "description": "Products collects the category's product listings. Category structure collects the subcategories and brands that sit under each category, including the numeric category ids AliExpress uses internally. Both collects each of them.",
            "default": "products"
          },
          "sortBy": {
            "title": "Order the products by",
            "enum": [
              "feed_order",
              "most_orders",
              "newest",
              "price_low",
              "price_high",
              "best_rated"
            ],
            "type": "string",
            "description": "How to order the products WITHIN each category listing. AliExpress does not offer an ordering control on this listing, so this reorders the products the category returned — it is not a site-wide bestseller or newest chart.",
            "default": "feed_order"
          },
          "maxProductsPerCategory": {
            "title": "Maximum products per category",
            "minimum": 1,
            "maximum": 998,
            "type": "integer",
            "description": "How many products to keep from each category. A category returns up to 998 products; asking for more than that is not possible and the run will simply keep all of them.",
            "default": 100
          },
          "maxProducts": {
            "title": "Maximum products in total",
            "minimum": 1,
            "maximum": 25000,
            "type": "integer",
            "description": "A ceiling across the whole run, applied on top of the per-category limit.",
            "default": 2000
          },
          "minOrders": {
            "title": "Minimum orders",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Keep only products with at least this many lifetime orders. Leave empty for no minimum."
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Keep only products rated at least this highly, out of 5. Decimals are accepted (4.5). Products with no rating yet are excluded by this filter rather than counted as zero."
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "maximum": 1000000,
            "type": "number",
            "description": "In the currency of the country you chose above. Decimals are accepted (0.99)."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "maximum": 1000000,
            "type": "number",
            "description": "In the currency of the country you chose above. Decimals are accepted (9.99)."
          },
          "choiceOnly": {
            "title": "AliExpress Choice products only",
            "type": "boolean",
            "description": "Keep only products carrying the AliExpress Choice badge.",
            "default": false
          },
          "freeShippingOnly": {
            "title": "Free shipping only",
            "type": "boolean",
            "description": "Keep only products advertising free shipping on their listing card.",
            "default": false
          },
          "launchedAfter": {
            "title": "Launched on or after",
            "type": "string",
            "description": "A date in YYYY-MM-DD form. Keep only products whose launch date is on or after it — useful for finding recent additions to a category."
          },
          "categoriesAtOnce": {
            "title": "Categories read at once",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Raising this makes a large run finish sooner. The safe ceiling is 4; going faster than the site tolerates gets a run cut short, so this is capped.",
            "default": 2
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}