{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Product Search Scraper",
    "description": "Search Amazon by keyword (or paste a search/category URL) across 18 marketplaces and get product listings enriched with full detail-page data: feature bullets, description, all images, brand, best-sellers rank, buybox seller, breadcrumbs, variations, rating and reviews. Pay-per-event. MCP-ready.",
    "version": "1.0",
    "x-build-id": "Ds7fjHQYhcwfQMsrP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~amazon-product-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-amazon-product-search-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/khadinakbar~amazon-product-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-amazon-product-search-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/khadinakbar~amazon-product-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-amazon-product-search-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": {
          "searchQuery": {
            "title": "Search keyword",
            "type": "string",
            "description": "A single free-text Amazon search term, e.g. 'wireless earbuds' or 'stainless steel water bottle'. The actor runs this as an Amazon search and returns matching products. Defaults to 'wireless earbuds'. NOT an Amazon product (/dp/) URL — for keyword + URL batches use searchQueries or startUrls instead."
          },
          "searchQueries": {
            "title": "Search keywords (bulk)",
            "type": "array",
            "description": "A list of search terms to run in one job, e.g. ['gaming mouse','mechanical keyboard']. Each term is searched independently and results share one dataset. Use this instead of searchQuery when you need several keywords. Leave empty if you only need one keyword or are using startUrls.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Amazon search / category URLs",
            "type": "array",
            "description": "Amazon search-result or category page URLs to scrape directly, e.g. 'https://www.amazon.com/s?k=running+shoes'. Use this when you already have a filtered Amazon URL or a category/browse-node page. The marketplace is auto-detected from each URL's domain. Single product (/dp/ or /gp/product/) URLs are rejected — this actor takes search/category pages, not individual ASINs.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "country": {
            "title": "Amazon marketplace",
            "enum": [
              "US",
              "UK",
              "DE",
              "FR",
              "CA",
              "ES",
              "IT",
              "JP",
              "AU",
              "IN",
              "MX",
              "BR",
              "NL",
              "SE",
              "PL",
              "TR",
              "AE",
              "SG"
            ],
            "type": "string",
            "description": "Which Amazon marketplace to search when you pass a keyword (e.g. 'US' → amazon.com, 'UK' → amazon.co.uk, 'DE' → amazon.de). Controls the domain, currency, and proxy country. Defaults to 'US'. Ignored for startUrls, where the marketplace is read from each URL.",
            "default": "US"
          },
          "maxResults": {
            "title": "Max products",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of products to return across the whole run (the hard cost cap — you are charged per product, never more than this). Accepts 1 to 1000. Defaults to 50. Pagination stops once this many products are collected.",
            "default": 50
          },
          "enrichDetails": {
            "title": "Enrich with product detail pages",
            "type": "boolean",
            "description": "When true (default), each product's /dp/ detail page is also fetched to add brand, feature bullets, description, all images, best-sellers rank, buybox seller, breadcrumbs, and variations. Set to false for a faster, cheaper search-only run that returns just the SERP fields (price, rating, rank). Detail enrichment is what distinguishes this actor from a plain SERP scraper.",
            "default": true
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "relevance",
              "priceAsc",
              "priceDesc",
              "avgCustomerReview",
              "newest"
            ],
            "type": "string",
            "description": "Amazon result sort order applied to keyword searches: 'relevance' (default), 'priceAsc', 'priceDesc', 'avgCustomerReview', or 'newest'. Maps to Amazon's own sort parameters. Ignored for startUrls that already include a sort.",
            "default": "relevance"
          },
          "includeSponsored": {
            "title": "Include sponsored products",
            "type": "boolean",
            "description": "When true (default), sponsored/ad placements are included and flagged with isSponsored=true so you can tell ads from organic results. Set to false to return organic results only. Organic rank is always tracked separately in the organicRank field.",
            "default": true
          },
          "maxSearchPages": {
            "title": "Max search pages per seed",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of Amazon search-result pages to paginate through per keyword/URL before stopping (each page is ~16–60 products). Accepts 1 to 20. Defaults to 5. Lower this to cap how deep into the rankings the run goes; maxResults still caps the total.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Amazon blocks most datacenter IPs, so residential proxies are strongly recommended. Leave at the default (Apify Proxy on) and the actor automatically prefers residential and falls back to datacenter. Override only if you have specific proxy groups or custom proxy URLs.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}