{
  "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. Export structured rows and pay per delivered row plus a run start fee.",
    "version": "0.5",
    "x-build-id": "Q1Lnf6dYTRGGsEScc"
  },
  "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)/.*$|^\\s*/.*$",
            "type": "string",
            "description": "Costco product link for the selected market, such as /p/-/product-name/100234271 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 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)/.*$|^\\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 without the domain, such as grocery-household for the US market."
          },
          "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"
            ],
            "type": "string",
            "description": "Choose the Costco shopping market: United States, Canada, Mexico, United Kingdom, Australia, Japan, South Korea, or Taiwan.",
            "default": "US"
          },
          "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, or rating. Availability varies by market."
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "Optional currency setting; otherwise the selected market determines it. This is not a currency-conversion feature."
          },
          "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."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}