{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Sponsored Products Scraper - Ads by Keyword",
    "description": "Scrape every paid placement on Amazon search results for your keywords: Sponsored Products, sponsored carousels and Sponsored Brands, with ASIN, price, ad position, ad id and organic rank. 21 stores, EU advertiser and payer names. Export JSON, CSV or Excel via API. Pay per ad placement.",
    "version": "0.1",
    "x-build-id": "DYk6dCLKOVGhdR2tg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation_craft~amazon-sponsored-products-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation_craft-amazon-sponsored-products-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-sponsored-products-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation_craft-amazon-sponsored-products-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-sponsored-products-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation_craft-amazon-sponsored-products-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": {
          "keywords": {
            "title": "Keywords or Amazon search URLs",
            "type": "array",
            "description": "The searches to read, one per line: a keyword (searched on the store chosen below) or a full Amazon search URL such as https://www.amazon.de/s?k=proteinpulver (its own store and filters are kept). Up to 500 per run. Each keyword is one search on Amazon's own result page.",
            "items": {
              "type": "string"
            }
          },
          "marketplace": {
            "title": "Amazon store",
            "enum": [
              "com",
              "co.uk",
              "de",
              "it",
              "es",
              "nl",
              "se",
              "pl",
              "com.be",
              "ie",
              "ca",
              "com.mx",
              "com.br",
              "com.au",
              "co.jp",
              "in",
              "ae",
              "sa",
              "sg",
              "com.tr",
              "eg"
            ],
            "type": "string",
            "description": "The store keywords are searched on (pasted URLs keep their own store). The Actor reads each store from a residential address in that store's country, because Amazon hides ads from datacenter addresses. amazon.fr is not offered (see the README)."
          },
          "pages": {
            "title": "Result pages per keyword",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many result pages of each keyword to read, from 1 to 5. Page 1 holds most ads (about 25 placements); later pages hold more Sponsored Products cards. Default 1."
          },
          "samples": {
            "title": "Samples per keyword",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many times to read each keyword in this run, from 1 to 10. Amazon rotates its ads between page loads, so several samples show which products appear most often (share of voice, in the keyword row). Each sample is billed like a separate search. Default 1."
          },
          "placementTypes": {
            "title": "Placement types",
            "type": "array",
            "description": "Deliver only these kinds of placement (and pay only for them). Leave empty for every kind.",
            "items": {
              "type": "string",
              "enum": [
                "sponsored_product",
                "sponsored_products_carousel",
                "shop_by_type",
                "sponsored_brand",
                "sponsored_brand_video",
                "sponsored_brand_collection",
                "sponsored_brand_footer"
              ],
              "enumTitles": [
                "Sponsored Products cards in the results",
                "Products in sponsored carousels",
                "Products in sponsored \"Shop by type\" modules (amazon.com)",
                "Sponsored Brands banner above the results",
                "Sponsored Brands videos in the results",
                "Sponsored Brands collections in the results",
                "Brands in \"Brands related to your search\""
              ]
            }
          },
          "advertiserNames": {
            "title": "EU advertiser and payer names",
            "type": "boolean",
            "description": "In the EU stores (amazon.de, .it, .es, .nl, .se, .pl, .com.be, .ie) Amazon states, for each ad, who advertised and who paid. When this is on, the Actor asks for them once per advertiser and adds both names to the rows; each advertiser found is charged once per run as an Advertiser name event. Other stores have no such statement."
          },
          "maxPlacements": {
            "title": "Maximum placements per run",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many placement rows in the whole run. Leave empty for no cap."
          },
          "maxPlacementsPerKeyword": {
            "title": "Maximum placements per keyword",
            "minimum": 1,
            "type": "integer",
            "description": "Stop reading a keyword after this many placement rows (across its pages and samples). Leave empty for no cap."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}