{
  "openapi": "3.0.1",
  "info": {
    "title": "Costco Scraper — Mexico, UK, Korea, Japan, Taiwan & Australia",
    "description": "Scrape products and prices from Costco's international online stores (Mexico, UK, Korea, Japan, Taiwan, Australia, Iceland, New Zealand): price, was price, promo end date, unit price, brand, category, rating, stock. Search, category or full catalog. From US$3 per 1,000 products.",
    "version": "0.1",
    "x-build-id": "OqjaMoSCxfM92qXvO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fabrikit~costco-international-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fabrikit-costco-international-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/fabrikit~costco-international-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fabrikit-costco-international-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/fabrikit~costco-international-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fabrikit-costco-international-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": {
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Costco online stores to scrape. Keywords and the full-catalog option run once per selected country. Category and product URLs pick their country from the domain automatically. (Costco Spain, France and Sweden have no online catalog, and costco.com / costco.ca run on a different platform, so they are not offered.)",
            "items": {
              "type": "string",
              "enum": [
                "MX",
                "GB",
                "KR",
                "JP",
                "TW",
                "AU",
                "IS",
                "NZ"
              ],
              "enumTitles": [
                "Mexico (costco.com.mx, MXN)",
                "United Kingdom (costco.co.uk, GBP)",
                "South Korea (costco.co.kr, KRW)",
                "Japan (costco.co.jp, JPY)",
                "Taiwan (costco.com.tw, TWD)",
                "Australia (costco.com.au, AUD)",
                "Iceland (costco.is, ISK, small catalog)",
                "New Zealand (costco.co.nz, NZD, cakes & platters pre-order only)"
              ]
            },
            "default": [
              "MX"
            ]
          },
          "searchKeywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Search terms, run on every selected country exactly like the store's search box (e.g. `laptop`, `kirkland`, `coffee`, `café`, `커피`, `コーヒー`, `咖啡`). Each keyword is its own source with its own `maxItems` limit.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "categoryUrls": {
            "title": "Category URLs or codes",
            "type": "array",
            "description": "Category pages to list, including all subcategories. Paste a full URL such as `https://www.costco.com.mx/Computadoras-y-Tablets/Computadoras-y-Laptops/Laptops/c/cos_2.1.2` (its country is taken from the domain) or a bare code such as `cos_2` (applied to every selected country; codes differ between countries). Campaign pages ending in /c/<code> work too.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "Product URLs",
            "type": "array",
            "description": "Individual product pages, e.g. `https://www.costco.co.uk/Grocery-Household/Grocery-Delivery/Lavazza-Qualita-Rossa-Coffee-Beans/p/139465`. Read from the product endpoint, so they always include the detail fields (specs, all images, stock level) and are billed as result + details.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "fullCatalog": {
            "title": "Full catalog",
            "type": "boolean",
            "description": "List every product in each selected country's online catalog (about 9,000–10,500 products for Mexico, UK, Korea, Japan and Taiwan; 5,600 for Australia). Set `maxItems` high enough (e.g. 12000) to get all of them.",
            "default": false
          },
          "maxItems": {
            "title": "Max products per country and source",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Stop each source (one keyword, one category or the full catalog) after this many products per country. Products already found by an earlier source are not counted twice.",
            "default": 50
          },
          "maxTotalItems": {
            "title": "Max products in total (0 = no limit)",
            "minimum": 0,
            "maximum": 500000,
            "type": "integer",
            "description": "Optional hard cap for the whole run across all countries and sources.",
            "default": 0
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "relevance",
              "price-asc",
              "price-desc",
              "name-asc",
              "name-desc",
              "ratings-desc"
            ],
            "type": "string",
            "description": "Order of search/category results. Japan does not support name sorting and ignores it (relevance is used).",
            "default": "relevance"
          },
          "fetchDetails": {
            "title": "Fetch product details (add-on)",
            "type": "boolean",
            "description": "Call the product endpoint for each result (1 extra request per product) to add: full specification table, brand from the spec sheet, every gallery image, exact stock level and the exact category names. Billed as a separate `product-details` event.",
            "default": false
          },
          "includeBusinessDelivery": {
            "title": "Include Business Delivery listings",
            "type": "boolean",
            "description": "The UK and Australian stores list a second copy of many grocery items for Costco Business Delivery (codes ending in `_BD`). Those are for business members only and show no public price, so they are skipped by default.",
            "default": false
          },
          "skipItemsWithoutPrice": {
            "title": "Skip products without a public price",
            "type": "boolean",
            "description": "Some products show their price only to logged-in members or only in the warehouse (common in Japan, Taiwan and for liquor in Australia). Turn on to drop them; you are not charged for skipped products.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "The Costco store APIs answer Apify's own servers without a proxy. If a country ever refuses the request, the Actor automatically retries that country through Apify RESIDENTIAL proxy in the same country.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}