{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Price Comparison Across Countries",
    "description": "Scrape Amazon product data — price, BSR, rating, seller, FBA status, variants — from search, category, URL, or ASIN input across 18 marketplaces. MCP/API-ready.",
    "version": "0.1",
    "x-build-id": "CXz7tfzQH6Z5aEmX0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~amazon-product-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-amazon-product-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-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-amazon-product-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-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-amazon-product-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 query",
            "type": "string",
            "description": "Search/URL mode only. Free-text keyword run on Amazon (e.g. 'wireless earbuds') for the 'country' marketplace. Ignored when 'marketplaces' is filled (price-compare mode). NOT an Amazon URL — use 'startUrls' for URLs."
          },
          "asins": {
            "title": "ASIN list",
            "type": "array",
            "description": "ASIN codes like ['B08N5WRWNW']. With 'marketplaces' filled: price-compare mode, one row per ASIN with its price in every selected country. Without 'marketplaces': each ASIN is scraped on the single 'country' marketplace. Up to 500 per run.",
            "items": {
              "type": "string",
              "pattern": "^[A-Z0-9]{10}$"
            },
            "default": []
          },
          "marketplaces": {
            "title": "Compare marketplaces",
            "type": "array",
            "description": "Price-compare mode. Countries to check each ASIN in, e.g. ['US','UK','DE']. Billed per country that has a price, plus one comparison per ASIN priced in 2+ countries. Leave empty for search/URL mode. NL and TR are available here (not in search/URL mode).",
            "items": {
              "type": "string",
              "enum": [
                "US",
                "UK",
                "DE",
                "FR",
                "CA",
                "ES",
                "IT",
                "JP",
                "AU",
                "IN",
                "MX",
                "BR",
                "NL",
                "SE",
                "PL",
                "TR",
                "AE",
                "SG"
              ]
            }
          },
          "currency": {
            "title": "Comparison currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "CAD",
              "JPY",
              "AUD",
              "INR",
              "MXN",
              "BRL",
              "SEK",
              "PLN",
              "TRY",
              "SGD"
            ],
            "type": "string",
            "description": "Price-compare mode. Currency used for the converted prices and the cheapest/dearest ranking (European Central Bank daily rates; AED not covered, shown in its own currency).",
            "default": "USD"
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Direct Amazon URLs — product pages ('/dp/ASIN'), search result pages ('/s?k=...'), or category pages. The domain inside each URL overrides the 'country' setting below. Use this when you already have the exact URLs to scrape.",
            "default": [],
            "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",
              "SE",
              "PL",
              "AE",
              "SG"
            ],
            "type": "string",
            "description": "Search/URL mode only: marketplace used for 'searchQuery' and 'asins'. Ignored in price-compare mode (use 'marketplaces') and when 'startUrls' has another Amazon domain. NL and TR are not offered here.",
            "default": "US"
          },
          "maxResults": {
            "title": "Max products",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Search/URL mode only. Maximum products across searchQuery + asins + startUrls. Each product is billed as one 'product-scraped' event. Start small (5-25) to verify output.",
            "default": 50
          },
          "maxSearchPages": {
            "title": "Max search pages",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Search/URL mode only. Maximum search/category pages per query or start URL (~48 products each; Amazon clips most searches at ~7).",
            "default": 3
          },
          "scrapeProductDetails": {
            "title": "Scrape full product pages",
            "type": "boolean",
            "description": "Search/URL mode only. When true, each product found on a search/category page is fetched again on its product page for full data. When false, only search-page summary fields (faster, shallower).",
            "default": true
          },
          "routeMode": {
            "title": "Fetch route",
            "enum": [
              "auto",
              "auto-unlocker-first",
              "auto-pool-first",
              "unlocker",
              "pool",
              "apify",
              "legacy"
            ],
            "type": "string",
            "description": "How pages are fetched. 'auto' tries the cheapest route that works and escalates only when blocked; leave it unless you are debugging.",
            "default": "auto"
          },
          "proxyConfiguration": {
            "title": "Own proxy (optional)",
            "type": "object",
            "description": "Search/URL mode only, optional. Leave empty to use the built-in cost-aware routing. Fill it only to force your own proxy; price-compare mode ignores it."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}