{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Ad Library Scraper - EU Ads & Impressions",
    "description": "Scrape the Amazon Ad Library, the public EU ad repository of amazon.de and eight more stores, by keyword, advertiser or ad id. One row per distinct ad, charged once: advertiser, payer, product title and ASIN, days shown, impressions per country, targeting, removed ads. JSON, CSV, API.",
    "version": "0.1",
    "x-build-id": "ttVAUC2Z8VxU3dmEp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation_craft~amazon-ad-library-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation_craft-amazon-ad-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~amazon-ad-library-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation_craft-amazon-ad-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~amazon-ad-library-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation_craft-amazon-ad-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 Trockenshampoo or Nivea Creme. Each returns the library's ads whose product title or advertiser name holds any of the words, best matches first, walked page by page until the end or your caps. Up to 200 per run.",
            "items": {
              "type": "string"
            }
          },
          "advertisers": {
            "title": "Advertisers (exact name)",
            "type": "array",
            "description": "One advertiser name per line, exactly as the library writes it (capitals and spacing do not matter), for example LEGO Poland or xiepiao. The name is searched and only ads whose advertiser name equals it are delivered (an ad whose payer name equals it counts too when the results hold it); the walk ends after two pages in a row without such an ad (the library ranks that advertiser's own ads first). A name with no such ad at the top of its results comes back as a free row. The library's search does not cover payer names: a company that only pays for ads under another advertiser's name is found by that advertiser's name. Up to 200 per run.",
            "items": {
              "type": "string"
            }
          },
          "advertiserMatch": {
            "title": "Advertiser name matching",
            "enum": [
              "exact",
              "contains"
            ],
            "type": "string",
            "description": "exact: the advertiser name (or the payer name, where the results hold it) must equal your text (capitals and spacing aside). contains: any such name containing your text counts (LEGO matches LEGO Poland and LEGO France). Through the API send exact or contains. When the field is left out, exact is used."
          },
          "adIds": {
            "title": "Ad ids or ad detail page URLs",
            "type": "array",
            "description": "One per line: an ad id (40 characters, for example 978bd06d92ce441e2cddb159e5257ccf7ff676ab; affiliate content rows carry ids such as amzn1.vse.video.1013900da28f4e8e8fec6c1fc808dd35) or a detail page URL of the library (https://www.amazon.de/adlibrary/detail/978bd06d92ce441e2cddb159e5257ccf7ff676ab). Each ad found comes back as one row and is charged as one Ad. An id the library does not have costs nothing and comes back as a free row. Up to 5,000 per run.",
            "items": {
              "type": "string"
            }
          },
          "removedAds": {
            "title": "Removed ads search",
            "type": "boolean",
            "description": "Search the ads Amazon removed or restricted (the library's compliance search) instead of the ad search: every row carries the restriction category and whether the detection was automated. The library takes no search text with it: send it alone, with countries and dates only. Off when the field is left out."
          },
          "countries": {
            "title": "Countries (stores)",
            "type": "array",
            "description": "Keep ads that were shown in these countries, one search per country. Leave empty for every store. Through the API send ISO codes (DE, FR, IT, ES, NL, PL, SE, BE, IE), country names (Germany) or store hosts (amazon.de).",
            "items": {
              "type": "string",
              "enum": [
                "DE",
                "FR",
                "IT",
                "ES",
                "NL",
                "PL",
                "SE",
                "BE",
                "IE"
              ],
              "enumTitles": [
                "Germany (amazon.de)",
                "France (amazon.fr)",
                "Italy (amazon.it)",
                "Spain (amazon.es)",
                "Netherlands (amazon.nl)",
                "Poland (amazon.pl)",
                "Sweden (amazon.se)",
                "Belgium (amazon.com.be)",
                "Ireland (amazon.ie)"
              ]
            }
          },
          "startDate": {
            "title": "Shown from",
            "type": "string",
            "description": "First day of the window: YYYY-MM-DD, or a number of days, weeks or months back from the end date, such as 30 days. An ad is returned when it was shown on at least one day of the window. When the field is left out, the whole library is searched (no date filter)."
          },
          "endDate": {
            "title": "Shown until",
            "type": "string",
            "description": "Last day of the window: YYYY-MM-DD, today or yesterday. Today when a start date is given without it; no date filter when both are left out."
          },
          "asins": {
            "title": "Only these products (ASINs)",
            "type": "array",
            "description": "One ASIN (B000SI95R8) or Amazon product URL per line. Only ads whose advertised product is one of them are delivered; the other rows of the pages read are dropped free. The library cannot search by ASIN, so give the product's words as a search term or its brand as an advertiser next to this filter.",
            "items": {
              "type": "string"
            }
          },
          "adType": {
            "title": "Row type",
            "enum": [
              "all",
              "ad",
              "affiliate"
            ],
            "type": "string",
            "description": "all: every row. ad: only paid ads. affiliate: only affiliate marketing content (commercial communications by creators and publishers, which the library lists next to the ads). Through the API send all, ad or affiliate; all when the field is left out."
          },
          "maxAds": {
            "title": "Maximum ads per run",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The run stops when this many ads were delivered. 100 when the field is left out; up to 100,000."
          },
          "maxAdsPerSearch": {
            "title": "Maximum ads per search",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "A cap for each search term and each advertiser (per country when countries are given). 0 or empty: no cap per search."
          },
          "maxPagesPerSearch": {
            "title": "Maximum Results pages per search",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "A search stops after reading this many pages of 50 results. 400 when the field is left out (20,000 results); up to 20,000."
          },
          "advertiserPagesWithoutMatch": {
            "title": "Advertiser walk: pages without a match before stopping",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "In the advertiser mode the walk ends after this many pages in a row without an ad of the name. 2 when the field is left out; raise it for a name that is also a common product word (NIVEA), where the advertiser's ads are mixed with other sellers' ads of that product. Up to 20."
          },
          "memoryName": {
            "title": "Memory name (only new ads on later runs)",
            "type": "string",
            "description": "A plain name, for example competitor 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. 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 or saved makes the run free too."
          },
          "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."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify's datacenter proxy by default, one address kept for the whole run, one call every 2.5 seconds. The residential group is replaced by the datacenter pool (the library answers datacenter addresses and residential traffic would cost more than an ad earns). Switch the proxy off to use the run's own address."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}