{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Search, Category & Best Sellers Scraper",
    "description": "Scrape Amazon keyword search, category browse, and Best Sellers across 21 storefronts. Export ASINs, titles, prices, ratings, images, and product URLs.",
    "version": "0.3",
    "x-build-id": "naENG3mACY41YrcBJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lentic_clockss~amazon-search-results-collector/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lentic_clockss-amazon-search-results-collector",
        "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/lentic_clockss~amazon-search-results-collector/runs": {
      "post": {
        "operationId": "runs-sync-lentic_clockss-amazon-search-results-collector",
        "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/lentic_clockss~amazon-search-results-collector/run-sync": {
      "post": {
        "operationId": "run-sync-lentic_clockss-amazon-search-results-collector",
        "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",
            "minItems": 0,
            "maxItems": 10,
            "type": "array",
            "description": "Amazon search keywords. Required for keyword mode. Optional for category mode (search within a category). Ignored for pure bestsellers browsing when empty.",
            "items": {
              "type": "string"
            },
            "default": [
              "usb hub"
            ]
          },
          "mode": {
            "title": "Collection mode",
            "enum": [
              "keyword",
              "category",
              "bestsellers",
              "detail"
            ],
            "type": "string",
            "description": "keyword = Amazon search results; category = category browse or in-category search; bestsellers = Best Sellers ranking pages; detail = fetch each detailUrls entry (product pages and/or seller profiles) with full seller lead extraction.",
            "default": "keyword"
          },
          "detailUrls": {
            "title": "Detail URLs (for detail mode)",
            "minItems": 0,
            "maxItems": 20,
            "type": "array",
            "description": "Product (/dp/{ASIN}) or seller profile (/sp?seller={sellerId}) URLs to fetch when mode=detail. Product pages are enriched with the seller profile (business name + business address).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "scrapeDetails": {
            "title": "Scrape detail pages for seller leads",
            "type": "boolean",
            "description": "Fetch detail pages (PDP) and follow the seller-profile chain to collect seller organization and address leads. On by default.",
            "default": true
          },
          "enrichDetails": {
            "title": "Enrich items with seller profile leads",
            "type": "boolean",
            "description": "Follow the PDP merchant link to the seller profile (Detailed Seller Information: business name + business address) and merge leads into items. On by default.",
            "default": true
          },
          "enrichMaxItems": {
            "title": "Max items to enrich with seller leads",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many list rows (from the top of results) to enrich with seller-profile leads per run (0-20).",
            "default": 1
          },
          "market": {
            "title": "Market",
            "enum": [
              "AE",
              "AU",
              "BE",
              "BR",
              "CA",
              "DE",
              "EG",
              "ES",
              "FR",
              "GB",
              "IN",
              "IT",
              "JP",
              "MX",
              "NL",
              "PL",
              "SA",
              "SE",
              "SG",
              "TR",
              "US"
            ],
            "type": "string",
            "description": "Amazon storefront to query.",
            "default": "SG"
          },
          "category": {
            "title": "Category key",
            "enum": [
              "all",
              "amazon-devices",
              "audible",
              "automotive",
              "baby",
              "beauty",
              "books",
              "computers",
              "electronics",
              "fashion",
              "garden",
              "grocery",
              "handmade",
              "health",
              "home",
              "industrial",
              "kindle-store",
              "kitchen",
              "luggage",
              "movies-tv",
              "music",
              "office-products",
              "pet-supplies",
              "software",
              "sports",
              "tools",
              "toys-and-games",
              "video-games"
            ],
            "type": "string",
            "description": "Stable ecommerce department key (e.g. electronics, books, kitchen). Required for category/bestsellers unless categoryNodeId or categorySlug is set."
          },
          "categoryNodeId": {
            "title": "Category browse node ID",
            "type": "string",
            "description": "Optional Amazon browse node ID. Overrides the mapped node for any subcategory."
          },
          "categorySlug": {
            "title": "Best Sellers category slug",
            "type": "string",
            "description": "Optional Best Sellers path slug (e.g. electronics). Overrides the mapped slug."
          },
          "pages": {
            "title": "Pages per keyword",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Maximum number of result pages to request for each task.",
            "default": 1
          },
          "maxItems": {
            "title": "Maximum output items (max 100; free users capped at 100/run)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Global cap for total emitted dataset items across all tasks (1–100). Free Apify plan users: also limited to 10 total runs of this Actor (Actor developer policy).",
            "default": 1
          },
          "maxItemsPerKeyword": {
            "title": "Maximum output items per keyword",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Per-task cap applied before the global maxItems limit. Free Apify plan users share the same 100/run result cap.",
            "default": 40
          },
          "workerBaseUrl": {
            "title": "Worker base URL (optional)",
            "type": "string",
            "description": "Override the Cloud Run worker origin for this run. Defaults to Actor env WORKER_BASE_URL. Production migrations should update WORKER_BASE_URL in Actor settings (no code change).",
            "default": ""
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "HTTP timeout for each Amazon request.",
            "default": 30
          },
          "userAgent": {
            "title": "User-Agent override",
            "type": "string",
            "description": "Optional HTTP User-Agent override for local debugging."
          },
          "debug": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Enable verbose diagnostic logging and extra debugging artifacts.",
            "default": false
          },
          "includeRawHtml": {
            "title": "Save raw HTML",
            "type": "boolean",
            "description": "Persist raw HTML snapshots to the default key-value store for debugging.",
            "default": false
          },
          "fixtureHtmlPath": {
            "title": "Local fixture HTML path",
            "type": "string",
            "description": "Optional local HTML fixture path for deterministic offline validation and gate runs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}