{
  "openapi": "3.0.1",
  "info": {
    "title": "AliExpress Search Scraper",
    "description": "Search AliExpress by keyword and get every result as a clean row: price, pre-discount price, star rating, delivery window, ships-from country, Choice status — and the exact units sold instead of the rounded \"10,000+\" label. Choose the country you shop from and prices arrive in its currency.",
    "version": "0.0",
    "x-build-id": "pRCCVyZUdshWOemwp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apt_marble~aliexpress-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apt_marble-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/apt_marble~aliexpress-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-apt_marble-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/apt_marble~aliexpress-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-apt_marble-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",
        "required": [
          "keywords"
        ],
        "properties": {
          "keywords": {
            "title": "Search terms",
            "maxItems": 50,
            "type": "array",
            "description": "What to search for on AliExpress. One term per line. Up to 50 terms per run. Apostrophes and slashes are removed before searching because the store's own search mangles them, and a term made only of punctuation is skipped.",
            "default": [
              "wireless earbuds"
            ],
            "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 the store to read. This decides the currency, the delivery estimates and which products are offered — each country has its own catalogue, so two countries return different products for the same search term.",
            "default": "us"
          },
          "sort": {
            "title": "Result ordering",
            "enum": [
              "best_match",
              "orders",
              "price_asc",
              "price_desc",
              "all"
            ],
            "type": "string",
            "description": "How the store should order the results. \"Widest coverage\" runs all four orderings and merges them, which returns roughly three times as many distinct products for one search term and takes about four times as long.",
            "default": "best_match"
          },
          "maxResultsPerKeyword": {
            "title": "Maximum products per search term",
            "minimum": 1,
            "maximum": 3424,
            "type": "integer",
            "description": "Stop after this many distinct products for each search term. A single ordering publishes about 1,198 distinct products and the run is held to that; choose \"Widest coverage\" to reach about 3,424, which is everything the store publishes for one search term.",
            "default": 100
          },
          "maxPagesPerSort": {
            "title": "Maximum result pages per ordering",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "How deep to go into the results for each ordering. The store publishes at most 60 result pages of 20 products for any one search.",
            "default": 10
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep products at or above this price, as a whole number in the currency of the country you selected. Leave empty for no minimum."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep products at or below this price, as a whole number in the currency of the country you selected. Leave empty for no maximum."
          },
          "minRating": {
            "title": "Minimum star rating",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Only keep products rated at least this many stars. Products nobody has rated yet are excluded when this is set above 0.",
            "default": 0
          },
          "minSold": {
            "title": "Minimum units sold",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Only keep products that have sold at least this many units. Uses the exact figure, not the rounded \"10,000+ sold\" label. Products for which the store publishes no sales figure are dropped when this is above 0.",
            "default": 0
          },
          "freeShippingOnly": {
            "title": "Free shipping only",
            "type": "boolean",
            "description": "Ask the store to return only products it lists with free shipping to the country you selected.",
            "default": false
          },
          "shipFromCountry": {
            "title": "Ships from",
            "type": "string",
            "description": "Two-letter country code of the warehouse the product ships from, for example CN, US or ES. Leave empty for any origin.",
            "default": ""
          },
          "categoryId": {
            "title": "Category number",
            "type": "string",
            "description": "Optional. Narrow the search to one AliExpress category, using the number that appears in the category's own address. Leave empty to search everything.",
            "default": ""
          },
          "includePromoted": {
            "title": "Include promoted placements",
            "type": "boolean",
            "description": "Promoted placements sit inside the store's own results and are always flagged. Turn this off to keep only organic results.",
            "default": true
          },
          "excludeLooseMatches": {
            "title": "Only exact keyword matches",
            "type": "boolean",
            "description": "When a search term has few or no real matches, the store fills the page with loosely related products. Turn this on to drop those rows instead of collecting them.",
            "default": false
          },
          "parallelSearches": {
            "title": "Parallel search terms",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "How many search terms to work through at the same time. Higher is faster, but the store slows itself down when pushed, so a very wide run spends time waiting rather than collecting. Each term still gets the same products either way. 2 is the balanced choice.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}