{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Autocomplete Scraper",
    "description": "Scrape Amazon autocomplete keyword suggestions across marketplaces with A-Z expansion, department aliases, ranks, source URLs, and deduped output.",
    "version": "0.1",
    "x-build-id": "6PiIi8JxnlstafSLw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation-lab~amazon-autocomplete-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation-lab-amazon-autocomplete-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-lab~amazon-autocomplete-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation-lab-amazon-autocomplete-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-lab~amazon-autocomplete-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation-lab-amazon-autocomplete-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",
        "required": [
          "keywords"
        ],
        "properties": {
          "keywords": {
            "title": "Seed keywords",
            "type": "array",
            "description": "Amazon search terms to expand into autocomplete suggestions.",
            "items": {
              "type": "string"
            }
          },
          "marketplace": {
            "title": "Amazon marketplace",
            "enum": [
              "US",
              "UK",
              "DE",
              "FR",
              "IT",
              "ES",
              "CA",
              "IN",
              "AU",
              "JP",
              "MX",
              "BR",
              "NL",
              "SE",
              "PL",
              "TR",
              "AE",
              "SA",
              "SG",
              "BE",
              "EG",
              "IE"
            ],
            "type": "string",
            "description": "Marketplace preset used for the public Amazon completion endpoint. 22 Amazon marketplaces are supported; each returns suggestions in its own language.",
            "default": "US"
          },
          "marketplaces": {
            "title": "Amazon marketplaces to compare",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional list of marketplaces to query in one run. When set, this takes precedence over Amazon marketplace. Each selected prefix is queried in every selected marketplace.",
            "items": {
              "type": "string",
              "enum": [
                "US",
                "UK",
                "DE",
                "FR",
                "IT",
                "ES",
                "CA",
                "IN",
                "AU",
                "JP",
                "MX",
                "BR",
                "NL",
                "SE",
                "PL",
                "TR",
                "AE",
                "SA",
                "SG",
                "BE",
                "EG",
                "IE"
              ],
              "enumTitles": [
                "United States",
                "United Kingdom",
                "Germany",
                "France",
                "Italy",
                "Spain",
                "Canada",
                "India",
                "Australia",
                "Japan",
                "Mexico",
                "Brazil",
                "Netherlands",
                "Sweden",
                "Poland",
                "Turkey",
                "United Arab Emirates",
                "Saudi Arabia",
                "Singapore",
                "Belgium",
                "Egypt",
                "Ireland"
              ]
            }
          },
          "alias": {
            "title": "Amazon department alias",
            "type": "string",
            "description": "Amazon search department alias. Use aps for All Departments, or values such as electronics, fashion, stripbooks, grocery, hpc, toys-and-games.",
            "default": "aps"
          },
          "expansionMode": {
            "title": "Expansion mode",
            "enum": [
              "seed",
              "a-z",
              "a-z-0-9",
              "custom"
            ],
            "type": "string",
            "description": "Choose whether to query each seed once, append A-Z, append A-Z and 0-9, or use custom suffixes.",
            "default": "a-z"
          },
          "customSuffixes": {
            "title": "Custom suffixes",
            "type": "array",
            "description": "Suffixes to append after each seed when expansion mode is custom, for example best, for women, under 50. Works in any language.",
            "items": {
              "type": "string"
            }
          },
          "expandPrefixAlphabet": {
            "title": "Letters before the seed",
            "type": "boolean",
            "description": "Also query a-z in front of each seed (\"a yoga mat\", \"b yoga mat\", ...). Finds brand and type words shoppers type first. Adds 26 prefixes per seed.",
            "default": false
          },
          "expandBuyerModifiers": {
            "title": "Buyer modifiers before the seed",
            "type": "boolean",
            "description": "Also query best, cheap, top, small, large, mini, portable, kids, women and men in front of each seed. English stems; use custom suffixes for other languages. Adds 10 prefixes per seed.",
            "default": false
          },
          "expandPrepositions": {
            "title": "Prepositions and bundles after the seed",
            "type": "boolean",
            "description": "Also query for, with, without, under, vs, and, set, pack, kit and replacement after each seed. English stems. Adds 10 prefixes per seed.",
            "default": false
          },
          "expandQuestions": {
            "title": "Question stems before the seed",
            "type": "boolean",
            "description": "Also query how to, what, which, why, can, is, does and where to buy in front of each seed. English stems. Adds 8 prefixes per seed.",
            "default": false
          },
          "maxSuggestionsPerPrefix": {
            "title": "Max suggestions per prefix",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum autocomplete suggestions saved from each prefix request.",
            "default": 10
          },
          "maxPrefixes": {
            "title": "Max prefix requests",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Safety limit for unique prefixes across all seeds, including the intent expansions below. Each selected prefix is queried once per selected marketplace. A-Z for two seeds needs 52.",
            "default": 20
          },
          "dedupeSuggestions": {
            "title": "Deduplicate suggestions",
            "type": "boolean",
            "description": "Remove duplicate suggestion values within the same marketplace and department.",
            "default": true
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Optional polite delay between autocomplete requests. Increase for very large jobs.",
            "default": 100
          },
          "excludeTerms": {
            "title": "Exclude suggestions containing",
            "type": "array",
            "description": "Drop any suggestion that contains one of these words or phrases (case-insensitive), for example a competitor brand. Excluded suggestions are not saved or charged.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max suggestions in total",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop the run after this many suggestions are saved. 0 means no limit. Use it to cap the cost of large expansions.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}