{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Keywords Discovery Tool",
    "description": "Discover source-backed public Amazon autocomplete suggestions for seed keywords with marketplace, locale, filtering, serialized pacing, and provenance controls.",
    "version": "2.3",
    "x-build-id": "2OLqzxcCH8SWletbo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/w3crawler~amazon-keywords-discovery-tool/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-w3crawler-amazon-keywords-discovery-tool",
        "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/w3crawler~amazon-keywords-discovery-tool/runs": {
      "post": {
        "operationId": "runs-sync-w3crawler-amazon-keywords-discovery-tool",
        "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/w3crawler~amazon-keywords-discovery-tool/run-sync": {
      "post": {
        "operationId": "run-sync-w3crawler-amazon-keywords-discovery-tool",
        "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": {
          "seedKeyword": {
            "title": "Seed keyword",
            "minLength": 1,
            "maxLength": 200,
            "type": "string",
            "description": "Single phrase to enter in Amazon autocomplete. Use seedKeywords for multiple independent seeds.",
            "default": "wireless earbuds"
          },
          "seedKeywords": {
            "title": "Seed keywords",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Optional list of phrases. When supplied, this list takes precedence over seedKeyword.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "marketplace": {
            "title": "Amazon marketplace",
            "enum": [
              "amazon.com",
              "amazon.co.uk",
              "amazon.de",
              "amazon.fr",
              "amazon.ca",
              "amazon.in",
              "amazon.co.jp",
              "amazon.es",
              "amazon.it",
              "amazon.com.au",
              "amazon.com.mx",
              "amazon.com.br"
            ],
            "type": "string",
            "description": "Marketplace used for autocomplete market ID, search URLs, and public result pages.",
            "default": "amazon.com"
          },
          "locale": {
            "title": "Locale",
            "enum": [
              "auto",
              "en-US",
              "en-GB",
              "de-DE",
              "fr-FR",
              "en-CA",
              "en-IN",
              "ja-JP",
              "es-ES",
              "it-IT",
              "en-AU",
              "es-MX",
              "pt-BR"
            ],
            "type": "string",
            "description": "Accept-Language and keyword-normalization locale. Auto follows the selected marketplace.",
            "default": "auto"
          },
          "expansionMode": {
            "title": "Autocomplete expansion",
            "enum": [
              "seed",
              "letters",
              "lettersAndNumbers"
            ],
            "type": "string",
            "description": "Query the seed only, append A-Z, or append A-Z and 0-9. Expansion is bounded by per-seed and global query limits.",
            "default": "lettersAndNumbers"
          },
          "suggestionLimit": {
            "title": "Suggestions per autocomplete query",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum suggestions accepted from one structured autocomplete response.",
            "default": 12
          },
          "maxQueriesPerSeed": {
            "title": "Maximum queries per seed",
            "minimum": 1,
            "maximum": 37,
            "type": "integer",
            "description": "Maximum autocomplete queries for each seed, including the base query.",
            "default": 37
          },
          "maxTotalQueries": {
            "title": "Maximum total autocomplete queries",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Global safety cap across every seed and suffix expansion.",
            "default": 1000
          },
          "maxItems": {
            "title": "Maximum keyword records",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Global maximum number of unique normalized keyword records written to the dataset.",
            "default": 500
          },
          "includeKeywords": {
            "title": "Include filters",
            "maxItems": 100,
            "type": "array",
            "description": "Keep suggestions containing at least one case-insensitive substring.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "excludeKeywords": {
            "title": "Exclude filters",
            "maxItems": 100,
            "type": "array",
            "description": "Discard suggestions containing any case-insensitive substring.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "sortBy": {
            "title": "Keyword sort",
            "enum": [
              "sourceOrder",
              "alphabetical",
              "lengthAsc",
              "lengthDesc"
            ],
            "type": "string",
            "description": "Ordering applied after cross-query deduplication.",
            "default": "sourceOrder"
          },
          "includeSearchMetadata": {
            "title": "Enrich with Amazon search data",
            "type": "boolean",
            "description": "Fetch each keyword's public Amazon search page and add page metadata, related queries, pagination, and top products.",
            "default": true
          },
          "maxProductsPerKeyword": {
            "title": "Top products per keyword",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum product cards stored inside each keyword record. Set to 0 to collect page metadata without products.",
            "default": 5
          },
          "maxSearchPagesPerKeyword": {
            "title": "Search pages per keyword",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Maximum public Amazon result pages parsed for each keyword.",
            "default": 1
          },
          "maxEnrichmentRequests": {
            "title": "Maximum enrichment requests",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Global cap on public Amazon search-page requests across all output keywords.",
            "default": 50
          },
          "searchSortBy": {
            "title": "Amazon product sort",
            "enum": [
              "featured",
              "priceAsc",
              "priceDesc",
              "rating",
              "newest",
              "bestSellers"
            ],
            "type": "string",
            "description": "Sort used on public Amazon search pages during enrichment.",
            "default": "featured"
          },
          "searchMinPrice": {
            "title": "Minimum product price",
            "minimum": 0,
            "maximum": 1000000,
            "type": "number",
            "description": "Optional lower price bound for public Amazon search-page enrichment."
          },
          "searchMaxPrice": {
            "title": "Maximum product price",
            "minimum": 0,
            "maximum": 1000000,
            "type": "number",
            "description": "Optional upper price bound for public Amazon search-page enrichment."
          },
          "requestDelayMs": {
            "title": "Request delay (milliseconds)",
            "minimum": 0,
            "maximum": 15000,
            "type": "integer",
            "description": "Polite delay before each autocomplete or search-page request.",
            "default": 300
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Maximum number of bounded requests running in parallel.",
            "default": 2
          },
          "maxRequestRetries": {
            "title": "Maximum request retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retries for temporary network, rate-limit, malformed, or server failures.",
            "default": 2
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time allowed for one bounded request.",
            "default": 12
          },
          "datasetBatchSize": {
            "title": "Dataset batch size",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Number of rich records written in each Apify dataset push.",
            "default": 50
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional authorized Apify Proxy or custom HTTP(S) proxy configuration. Credentials are never logged.",
            "default": {
              "useApifyProxy": false
            }
          },
          "enrichSearchResults": {
            "title": "Legacy enrichment flag",
            "type": "boolean",
            "description": "Deprecated alias for includeSearchMetadata."
          },
          "alphabetExpansion": {
            "title": "Legacy alphabet expansion",
            "type": "boolean",
            "description": "Deprecated compatibility flag. false maps to seed-only; true or omission preserves the default expansion mode."
          },
          "maxKeywords": {
            "title": "Legacy maximum keywords",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Deprecated alias for maxItems."
          },
          "minDelayMs": {
            "title": "Legacy delay alias",
            "minimum": 0,
            "maximum": 15000,
            "type": "integer",
            "description": "Deprecated alias for requestDelayMs."
          },
          "maxRetries": {
            "title": "Legacy retries alias",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Deprecated alias for maxRequestRetries."
          },
          "requestTimeoutMs": {
            "title": "Legacy timeout alias",
            "minimum": 5000,
            "maximum": 120000,
            "type": "integer",
            "description": "Deprecated millisecond alias for requestTimeoutSecs."
          },
          "useApifyProxy": {
            "title": "Legacy Apify Proxy flag",
            "type": "boolean",
            "description": "Deprecated flat alias for proxyConfiguration.useApifyProxy."
          },
          "proxyUrls": {
            "title": "Legacy proxy URLs",
            "maxItems": 20,
            "type": "array",
            "description": "Deprecated flat alias for proxyConfiguration.proxyUrls.",
            "items": {
              "type": "string",
              "maxLength": 500
            }
          },
          "proxyGroups": {
            "title": "Legacy proxy groups",
            "maxItems": 10,
            "type": "array",
            "description": "Deprecated flat alias for proxyConfiguration.apifyProxyGroups.",
            "items": {
              "type": "string",
              "maxLength": 100
            }
          },
          "proxyCountryCode": {
            "title": "Legacy proxy country",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Deprecated flat alias for proxyConfiguration.apifyProxyCountry."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}