{
  "openapi": "3.0.1",
  "info": {
    "title": "Costco Scraper - Products, Prices, Reviews & Warehouses",
    "description": "Extract Costco products, prices, ratings, reviews, categories, and warehouse locations across eight markets by search, category, or URL. Export structured JSON, CSV, or Excel for retail price monitoring, APIs, and AI agents via MCP.",
    "version": "0.5",
    "x-build-id": "TIj0FUBADg5NuFv0a"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lentic_clockss~costco-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lentic_clockss-costco-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/lentic_clockss~costco-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lentic_clockss-costco-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/lentic_clockss~costco-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lentic_clockss-costco-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "auto",
              "keywordSearch",
              "categoryBrowse",
              "productDetail",
              "warehouseLocations",
              "categoryTree",
              "specialtyBrowse",
              "productReviews"
            ],
            "type": "string",
            "description": "Leave on Auto to select a mode from the target field you fill. Choose Product reviews, Warehouse locations, or Category tree explicitly when you want those rows.",
            "default": "auto"
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Search words, e.g. paper towels. Fill this (and nothing else) to search Costco."
          },
          "productUrl": {
            "title": "Product URL",
            "pattern": "^\\s*$|^\\s*https://([A-Za-z0-9-]+\\.)*costco\\.(com|ca|com\\.mx|co\\.uk|com\\.au|co\\.jp|co\\.kr|com\\.tw|is|co\\.nz|fr|es|se)/.*$|^\\s*/.*$",
            "type": "string",
            "description": "Costco product link for the selected market, such as /p/-/product-name/100234271, /p/159858, or a .product.100234271.html link. Product paths without the domain are also accepted."
          },
          "itemId": {
            "title": "Item ID",
            "pattern": "^\\s*[0-9A-Za-z._-]*\\s*$",
            "type": "string",
            "description": "Item number or product code from the Costco product link; it may differ from the sku in the output."
          },
          "categoryUrl": {
            "title": "Category URL",
            "pattern": "^\\s*$|^\\s*https://([A-Za-z0-9-]+\\.)*costco\\.(com|ca|com\\.mx|co\\.uk|com\\.au|co\\.jp|co\\.kr|com\\.tw|is|co\\.nz|fr|es|se)/.*$|^\\s*/.*$",
            "type": "string",
            "description": "Category link for the selected Costco market. A category path without the domain is also accepted."
          },
          "categorySlug": {
            "title": "Category slug",
            "pattern": "^[A-Za-z0-9._/-]*$",
            "type": "string",
            "description": "Category path or code without the domain, such as grocery-household (US/CA) or Hot-Buys (UK)."
          },
          "topic": {
            "title": "Specialty topic",
            "enum": [
              "hotBuys",
              "whatsNew",
              "warehouseOnly",
              "grocery"
            ],
            "type": "string",
            "description": "Choose Hot Buys, What's New, Warehouse only, or Grocery to collect specialty listings. Availability varies by market."
          },
          "maxResults": {
            "title": "Max results per input",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Most rows for this search, category, product, warehouse, topic, or review input. Default 70. Searches, category and topic listings, and reviews continue past 70; a category tree or warehouse list returns at most 70 rows. All returned row types count together. The run stops at your maximum total charge. Free Apify plan: up to 200 rows per run and 10 runs of this Actor.",
            "default": 70
          },
          "browseCountry": {
            "title": "Market",
            "enum": [
              "US",
              "CA",
              "MX",
              "UK",
              "AU",
              "JP",
              "KR",
              "TW",
              "IS",
              "NZ",
              "FR",
              "ES",
              "SE"
            ],
            "type": "string",
            "description": "Choose the Costco storefront market (GB is accepted as an alias for UK). France, Spain, and Sweden publish physical warehouse locations only without an online product catalog.",
            "default": "US"
          },
          "locale": {
            "title": "Language / locale",
            "type": "string",
            "description": "Optional market locale such as fr-CA on Canada, or secondary English catalog labels (en-MX, en-JP, en-KR, en-TW, en-IS). Defaults to the market's primary language."
          },
          "zip": {
            "title": "ZIP / postal code",
            "type": "string",
            "description": "Optional ZIP / postal code for warehouse and stock context."
          },
          "warehouse": {
            "title": "Warehouse",
            "type": "string",
            "description": "Optional warehouse identifier for location context. This does not guarantee product availability at that warehouse."
          },
          "dept": {
            "title": "Department filter",
            "type": "string",
            "description": "Optional department filter for supported keyword searches. Available departments vary by market."
          },
          "sort": {
            "title": "Sort",
            "type": "string",
            "description": "Requested order: relevance, priceAsc, priceDesc, newest, rating, oldest, highestRated, lowestRated, or mostHelpful. Availability varies by mode and market."
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "Optional currency setting; otherwise the selected market determines it. This is not a currency-conversion feature."
          },
          "ratings": {
            "title": "Review star filter",
            "type": "array",
            "description": "Optional star ratings (1 to 5, e.g. [1, 2] or [5]) when collecting productReviews."
          },
          "dateFrom": {
            "title": "Review start date",
            "type": "string",
            "description": "Optional earliest review date (YYYY-MM-DD) when collecting productReviews."
          },
          "dateTo": {
            "title": "Review end date",
            "type": "string",
            "description": "Optional latest review date (YYYY-MM-DD) when collecting productReviews."
          },
          "incrementalMode": {
            "title": "Incremental mode",
            "enum": [
              "off",
              "emitChanged",
              "newOnly"
            ],
            "type": "string",
            "description": "Compare rows against a saved snapshot across scheduled runs: off returns all collected rows, emitChanged returns new and changed rows (such as price drops or stock flips), and newOnly returns unseen items only."
          },
          "stateKey": {
            "title": "Incremental state key",
            "type": "string",
            "description": "Optional name for the saved incremental snapshot so separate schedules keep independent state. Leave empty to derive one from your target input."
          },
          "emitUnchanged": {
            "title": "Include unchanged rows",
            "type": "boolean",
            "description": "When incrementalMode is active, also return rows whose tracked price, stock, and rating fields have not changed (marked with changeType unchanged)."
          },
          "emitExpired": {
            "title": "Include disappeared rows",
            "type": "boolean",
            "description": "When incrementalMode is active on a completed run, add one expired row for each previously seen item that no longer appears."
          },
          "query": {
            "title": "Query (alias)",
            "type": "string",
            "description": "Same as Keyword (older name)."
          },
          "slug": {
            "title": "Product slug",
            "type": "string",
            "description": "Optional product-name path used with itemId when forming a product link."
          },
          "page": {
            "title": "Start page",
            "minimum": 1,
            "type": "integer",
            "description": "Starting page for supported listing modes, from 1 to 200. The default is 1.",
            "default": 1
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Optional page cap for each batch of up to 70 rows; the total is set by maxResults. Leave empty to page until maxResults rows are collected or results run out."
          },
          "enrichDetails": {
            "title": "Enrich listings with product details",
            "type": "boolean",
            "description": "Add available product details to the first enrichLimit listing rows in each part. Off by default; enrichment updates existing rows rather than adding rows.",
            "default": false
          },
          "enrichLimit": {
            "title": "Listing enrichment limit",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum listing rows to enrich in each part when enrichDetails is true. Default 5; allowed range 0 to 50.",
            "default": 5
          },
          "workerBaseUrl": {
            "title": "Developer testing setting",
            "type": "string",
            "description": "Leave empty. Used only by the developer for testing."
          },
          "cursor": {
            "title": "Continue from cursor",
            "type": "string",
            "description": "Continue a run that stopped at its time limit or was aborted gracefully: paste RUN_SUMMARY.nextCursor from that run and keep the rest of the input the same. A cursor works once and is valid for 6 hours. Usually leave empty."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}