{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Search Scraper & Keyword Rank Tracker",
    "description": "Amazon search scraper and keyword rank tracker: scrape search results for keywords or search URLs with position, organic rank, sponsored flag, ASIN, price, rating, review count, badges and delivery text, on 12 Amazon marketplaces. Sort, price and department filters.",
    "version": "0.1",
    "x-build-id": "sCGgqfcXzn8JSGh2G"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/siteacs~amazon-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-siteacs-amazon-search",
        "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/siteacs~amazon-search/runs": {
      "post": {
        "operationId": "runs-sync-siteacs-amazon-search",
        "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/siteacs~amazon-search/run-sync": {
      "post": {
        "operationId": "run-sync-siteacs-amazon-search",
        "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",
            "type": "array",
            "description": "Search terms, one per line, typed as a shopper types them into Amazon's search box. Each keyword is searched on the marketplace below. Use Bulk edit to paste a long list. Duplicates are searched once.",
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "Search URLs",
            "type": "array",
            "description": "Optional. Amazon search result pages copied from the browser (https://www.amazon.de/s?k=...), with any filters you set there (brand, department, rating, Prime). Each URL keeps its own marketplace and filters; the sort and price filters below are added only where the URL has none.",
            "items": {
              "type": "string"
            }
          },
          "marketplace": {
            "title": "Marketplace",
            "enum": [
              "US",
              "UK",
              "DE",
              "FR",
              "ES",
              "IT",
              "BR",
              "JP",
              "IN",
              "CA",
              "MX",
              "AU"
            ],
            "type": "string",
            "description": "Where the keywords are searched. Results are read for a delivery address in that country (a central postcode, such as 10001 New York or 10115 Berlin), so prices and delivery texts are the ones local shoppers see.",
            "default": "US"
          },
          "deliveryPostcode": {
            "title": "Delivery postcode",
            "type": "string",
            "description": "Optional: the postcode to search from, as typed in Amazon's \"Deliver to\" box (for example 94105 on amazon.com, 80331 on amazon.de). It changes prices, delivery promises and sometimes which products show. Applies to the marketplace above. Empty: a central postcode (New York 10001, London SW1A 1AA, Berlin 10115...). The summary row's deliverTo shows the location Amazon confirmed."
          },
          "maxPages": {
            "title": "Pages per search",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many result pages to read for each search, in order. A page holds 16 results (list layout) or 48 (grid layout), plus sponsored ones. A search stops earlier when Amazon has no further page (most keywords end after 7 grid or 20 list pages).",
            "default": 1
          },
          "maxResultsPerKeyword": {
            "title": "Max results per search",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Optional: stop each search after this many result rows (ads included when they are kept). When set, it replaces \"Pages per search\": pages are read until the limit or Amazon's last page (up to 20 pages). 0 or empty: no limit."
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "featured",
              "price-asc",
              "price-desc",
              "avg-review",
              "newest",
              "best-sellers"
            ],
            "type": "string",
            "description": "Amazon's own Sort by menu. Keep Featured for keyword rank tracking: it is the order shoppers see.",
            "default": "featured"
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Amazon's price filter, in the marketplace's currency (whole units: 20 means $20 on amazon.com, 20 € on amazon.de)."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Amazon's price filter, in the marketplace's currency."
          },
          "department": {
            "title": "Department",
            "type": "string",
            "description": "Optional. Amazon's search department code (the i= value of a search URL), for example electronics, kitchen, beauty, toys-and-games, books or fashion. For other filters, copy a search URL instead."
          },
          "fourStarsAndUp": {
            "title": "4 stars & up only",
            "type": "boolean",
            "description": "Amazon's own \"4 Stars & Up\" filter, the only rating filter it offers. Available for keywords on amazon.com, .co.uk, .de, .fr, .es, .com.br, .co.jp and .in; on other marketplaces set it on the site and paste the search URL. Amazon shows no Prime filter to visitors who are not signed in, so there is none here.",
            "default": false
          },
          "includeSponsored": {
            "title": "Include sponsored results",
            "type": "boolean",
            "description": "On: sponsored products are saved too, with sponsored: true, in the place they hold on the page. Off: only organic results are saved (and charged); positions still count the sponsored places, and organicPosition counts organic results only.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Searches at a time",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many searches run in parallel. The pages of one search are always read in order.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify datacenter proxy (the default) works for search pages; a page Amazon refuses is retried on another IP.",
            "default": {
              "useApifyProxy": true
            }
          },
          "residentialFallback": {
            "title": "Use residential proxy for page 1 and refused pages",
            "type": "boolean",
            "description": "On (default): page 1 of each search is read through Apify residential proxy, because Amazon leaves most ads out for datacenter IPs (in our test, ads on 27 of 32 first pages over residential, 6 of 32 over datacenter), and a page Amazon still refuses after 6 datacenter IPs is tried through residential. No extra charge to you. Off: datacenter only; sponsored results will be mostly missing.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}