{
  "openapi": "3.0.1",
  "info": {
    "title": "AliExpress Ad Repository Scraper",
    "description": "⚡ Fast AliExpress Ad Repository scraper. No login, no API key. Search EU ads by title, advertiser, item ID or product URL in 27 countries with category, status, date, exposure, age and scene filters. Get advertiser, company, product, dates, exposure by country and campaign targeting.",
    "version": "1.0",
    "x-build-id": "OmJtf6Y1RIi04VSNm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/aboo.script~aliexpress-ads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-aboo.script-aliexpress-ads-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/aboo.script~aliexpress-ads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-aboo.script-aliexpress-ads-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/aboo.script~aliexpress-ads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-aboo.script-aliexpress-ads-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": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "AliExpress product URLs (aliexpress.com/item/<ID>.html) or Ad Repository URLs with an item ID (adRepository.html?q=<item ID>). Returns the ads of that product in the selected country.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Words to search for. What they match is set by \"Search by\" (ad title by default). Each query is scraped separately.",
            "items": {
              "type": "string"
            }
          },
          "searchBy": {
            "title": "Search by",
            "enum": [
              "adTitle",
              "advertiser",
              "itemId",
              "penaltyId"
            ],
            "type": "string",
            "description": "What the search queries match.",
            "default": "adTitle"
          },
          "country": {
            "title": "Country",
            "enum": [
              "AT",
              "BE",
              "BG",
              "HR",
              "CY",
              "CZ",
              "DK",
              "EE",
              "FI",
              "FR",
              "DE",
              "GR",
              "HU",
              "IE",
              "IT",
              "LV",
              "LT",
              "LU",
              "MT",
              "NL",
              "PL",
              "PT",
              "RO",
              "SK",
              "SI",
              "ES",
              "SE"
            ],
            "type": "string",
            "description": "EU country where the ads were shown. The repository searches one country at a time; it also applies to start URLs.",
            "default": "DE"
          },
          "category": {
            "title": "Category",
            "enum": [
              "Apparel Accessories",
              "Automobiles, Parts & Accessories",
              "Beauty & Health",
              "Books & Cultural Merchandise",
              "Computer & Office",
              "Consumer Electronics",
              "Electronic Components & Supplies",
              "Food",
              "Furniture",
              "Hair Extensions & Wigs",
              "Home & Garden",
              "Home Appliances",
              "Home Improvement",
              "Industrial & Business",
              "Jewelry & Accessories",
              "Lights & Lighting",
              "Luggage & Bags",
              "Men's Clothing",
              "Mother & Kids",
              "Motorcycle Equipments & Parts",
              "Novelty & Special Use",
              "Office & School Supplies",
              "Phones & Telecommunications",
              "Phones & Telecommunications Accessories",
              "Security & Protection",
              "Shoes",
              "Special Category",
              "Sports & Entertainment",
              "Sports Shoes,Clothing&Accessories",
              "Tools",
              "Toys & Hobbies",
              "Underwear",
              "Virtual Products",
              "Watches",
              "Weddings & Events",
              "Women's Clothing"
            ],
            "type": "string",
            "description": "Only ads of this product category. Applies to search queries."
          },
          "status": {
            "title": "Status of the ad",
            "enum": [
              "all",
              "active",
              "inactive"
            ],
            "type": "string",
            "description": "Only active or only inactive ads. Applies to search queries.",
            "default": "all"
          },
          "shownFrom": {
            "title": "Shown from",
            "type": "string",
            "description": "Only ads shown on or after this date (YYYY-MM-DD). Applies to search queries."
          },
          "shownTo": {
            "title": "Shown until",
            "type": "string",
            "description": "Only ads shown on or before this date (YYYY-MM-DD). Applies to search queries."
          },
          "minExposure": {
            "title": "Minimum exposure",
            "minimum": 0,
            "type": "integer",
            "description": "Only ads with at least this many exposures. Applies to search queries."
          },
          "maxExposure": {
            "title": "Maximum exposure",
            "minimum": 0,
            "type": "integer",
            "description": "Only ads with at most this many exposures. Applies to search queries."
          },
          "ageGroups": {
            "title": "Age groups",
            "type": "array",
            "description": "Only ads targeted at these age groups. Applies to search queries.",
            "items": {
              "type": "string",
              "enum": [
                "under 18",
                "18-24",
                "25-34",
                "35-44",
                "45-54",
                "55-64",
                "above 64",
                "unknown"
              ],
              "enumTitles": [
                "Under 18",
                "18-24",
                "25-34",
                "35-44",
                "45-54",
                "55-64",
                "Above 64",
                "Unknown"
              ]
            }
          },
          "purchaseCapacity": {
            "title": "Purchase capacity",
            "type": "array",
            "description": "Only ads targeted at shoppers with this purchase capacity. Applies to search queries.",
            "items": {
              "type": "string",
              "enum": [
                "0",
                "0to5",
                "5to10",
                "10to20",
                "above20"
              ],
              "enumTitles": [
                "$0",
                "$0-5",
                "$5-10",
                "$10-20",
                "Above $20"
              ]
            }
          },
          "scene": {
            "title": "Scene",
            "enum": [
              "all",
              "search",
              "rec"
            ],
            "type": "string",
            "description": "Where the ads were shown. Applies to search queries.",
            "default": "all"
          },
          "includeTargeting": {
            "title": "Include targeting details",
            "type": "boolean",
            "description": "Add the campaigns of each ad with their purchase capacity and exposure by country, age, gender and scene. Takes a few extra requests per ad.",
            "default": true
          },
          "maxResults": {
            "title": "Maximum number of results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of ads to scrape per start URL or search query. Set 0 for no limit.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}