{
  "openapi": "3.0.1",
  "info": {
    "title": "Zalando Ads Library Scraper - Sponsored Products",
    "description": "Scrape the Zalando Ads Library, the public EU ad repository of every sponsored product on Zalando, by search term, sponsor or ad id. One row per distinct ad, charged once: sponsor, product title in up to 44 languages, image, period, 26 markets, reach, targeting. JSON, CSV, API.",
    "version": "0.1",
    "x-build-id": "7j6jUZpQ7qOJwb1Hr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation_craft~zalando-ads-library-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation_craft-zalando-ads-library-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/automation_craft~zalando-ads-library-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation_craft-zalando-ads-library-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/automation_craft~zalando-ads-library-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation_craft-zalando-ads-library-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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "One search text per line, for example nike or adidas running. Each returns the archive's ads whose title, text or sponsor holds every word, walked page by page until the end or your caps. A word with no ad comes back as a free row. A rare word, which the archive's own search box cannot list inside its 30 second limit, is read through a second query shape and listed completely; when even that meets the limit, the search comes back as a free archive_timeout row. If a later page of a search meets the limit, the ads already delivered for it stay charged and its coverage row says archive_timeout. Up to 200 per run.",
            "items": {
              "type": "string"
            }
          },
          "sponsors": {
            "title": "Sponsors (brand or legal entity)",
            "type": "array",
            "description": "One sponsor per line, for example Nike or NIKE Retail B.V. or Falke KGaA. The sponsor is the legal entity that paid for the ad as the archive names it. The name is searched and only ads whose sponsor name holds every word of it (whole words, capitals aside) are delivered; the other ads of the pages read are dropped free. A name no sponsor carries comes back as a free row. Up to 200 per run.",
            "items": {
              "type": "string"
            }
          },
          "adIds": {
            "title": "Ad ids or archive URLs",
            "type": "array",
            "description": "One per line: an ad id (32 characters, for example 00005109f9bb75b14e2532c23370c63b) or an archive URL that carries one (https://sponsored-content-archive.zalando.com/?lang=en-GB&fullText=00005109f9bb75b14e2532c23370c63b). Ads are looked up 100 at a time; each ad found comes back as one row and is charged as one Ad. An id the archive does not have costs nothing and comes back as a free row. Up to 5,000 per run.",
            "items": {
              "type": "string"
            }
          },
          "markets": {
            "title": "Markets",
            "type": "array",
            "description": "Keep ads shown in at least one of these markets. Leave empty for every market. Through the API send ISO codes (DE, FR, NL, PL, ...) or the country names the archive uses (Germany).",
            "items": {
              "type": "string",
              "enum": [
                "AT",
                "BE",
                "HR",
                "CZ",
                "DK",
                "EE",
                "FI",
                "FR",
                "DE",
                "HU",
                "IE",
                "IT",
                "LV",
                "LT",
                "LU",
                "NL",
                "NO",
                "PL",
                "PT",
                "RO",
                "SK",
                "SI",
                "ES",
                "SE",
                "CH",
                "GB"
              ],
              "enumTitles": [
                "Austria",
                "Belgium",
                "Croatia",
                "Czech Republic",
                "Denmark",
                "Estonia",
                "Finland",
                "France",
                "Germany",
                "Hungary",
                "Ireland",
                "Italy",
                "Latvia",
                "Lithuania",
                "Luxembourg",
                "Netherlands",
                "Norway",
                "Poland",
                "Portugal",
                "Romania",
                "Slovakia",
                "Slovenia",
                "Spain",
                "Sweden",
                "Switzerland",
                "United Kingdom"
              ]
            }
          },
          "startDate": {
            "title": "Shown from",
            "type": "string",
            "description": "First day of the window: YYYY-MM-DD, a month as YYYY-MM (its first day), or a number of days, weeks or months back from the end date, such as 30 days. An ad is returned when it ran on at least one day of the window. When both dates are left out, the whole archive is searched."
          },
          "endDate": {
            "title": "Shown until",
            "type": "string",
            "description": "Last day of the window: YYYY-MM-DD, a month as YYYY-MM (its last day), today or yesterday. Open ended when left out."
          },
          "activeOnly": {
            "title": "Running today only",
            "type": "boolean",
            "description": "Keep only ads running now: ads whose period reaches the archive's latest day (it publishes with a lag of a day or two). The archive lists every ad currently running and the ads that ended since about April 2025. Off when the field is left out."
          },
          "languages": {
            "title": "Languages of the title and text",
            "type": "array",
            "description": "The archive carries the product title and the ad text in up to 44 languages per ad (most ads 23 to 25). Give the codes you want on the title and text fields, in order of preference (en-GB, de-DE, fr-FR, nl-NL, pl-PL, it-IT, es-ES, sv-SE, da-DK, ...), or all to get every translation as an object. English when the field is left out. The archive's search itself always covers every language.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Order",
            "enum": [
              "archive",
              "newest"
            ],
            "type": "string",
            "description": "archive: the archive's own order (the cheapest, the one that walks a large result to its end). newest: ads with the latest start date first (the archive sorts the whole result, several seconds per page on a large one). Through the API send archive or newest. When the field is left out: archive, or newest when a memory name is given (new ads come first, so a scheduled run can stop at the ads it already delivered, once a run under that memory name that was charging normally walked the search to its end; see memoryName)."
          },
          "exactWords": {
            "title": "Exact words only",
            "type": "boolean",
            "description": "The archive's search stems words in English (Jacke also finds Jack, levis finds Levi). Every row carries matchedIn, where your words appear literally (sponsor, title, text). Switch this on to deliver only rows where they appear literally; the other rows are dropped free. Off when the field is left out."
          },
          "countResults": {
            "title": "Count the archive's total per search",
            "type": "boolean",
            "description": "Ask the archive how many ads match each search (the coverage row's libraryTotal). A count takes the archive 2 to 30 seconds and is not charged; above about 150,000 matches it may run into the archive's 30 second limit and comes back as timed out. Off when the field is left out."
          },
          "maxAds": {
            "title": "Maximum ads per run",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "The run stops when this many ads were delivered. 100 when the field is left out; up to 200,000."
          },
          "maxAdsPerSearch": {
            "title": "Maximum ads per search",
            "minimum": 0,
            "maximum": 200000,
            "type": "integer",
            "description": "A cap for each search term and each sponsor. 0 or empty: no cap per search."
          },
          "maxPagesPerSearch": {
            "title": "Maximum archive pages per search",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "A search stops after reading this many pages of 2,000 rows from the archive. 200 when the field is left out (400,000 rows); up to 2,000."
          },
          "memoryName": {
            "title": "Memory name (only new ads on later runs)",
            "type": "string",
            "description": "A plain name, for example nike watch. Ads delivered under this name are remembered in a key value store this Actor creates in your account; on later runs with the same name they are skipped and not charged, and the walk (newest first) stops at the first page of ads an earlier run delivered once a run under this name that was charging normally walked the search to its end (until then each run carries on to the next older ads up to its cap; give a monitor a search it can finish and that stays the same from run to run: a date window with fixed dates, or a cap above the brand's ad count; the activeOnly window moves daily, so it is re-read each run, known ads skipped free). Two runs on one name at the same time: the second one delivers its ads free and remembers nothing. A memory that cannot be opened makes the run deliver its ads free; one that stops saving mid run makes the ads from that batch on free. The start fee stands in every case."
          },
          "resetMemory": {
            "title": "Reset this memory first",
            "type": "boolean",
            "description": "Forget everything stored under the memory name before the run, so every ad counts as new again."
          },
          "proxyCountry": {
            "title": "Exit country",
            "enum": [
              "DE",
              "NL",
              "FR",
              "PL",
              "AT",
              "GB",
              "ES",
              "SE",
              "DK",
              "FI",
              "CZ",
              "IE",
              "BE",
              "PT",
              "IT",
              "HU",
              "RO",
              "SK",
              "SI",
              "HR",
              "LT",
              "LV",
              "EE",
              "LU",
              "NO"
            ],
            "type": "string",
            "description": "The archive answers addresses in the EU, the EEA and the UK only, so every run uses one Apify residential session in this country (and moves to the next country of the list when the proxy has no exit there). Germany when the field is left out."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}