{"openapi":"3.1.0","info":{"title":"Costco Products Prices and Warehouses (x402 & MCP)","version":"0.1.0","description":"Costco products, prices, ratings, categories, reviews and warehouse locations across 8 markets, one row per entity.","x-guidance":"Structured real-time web intelligence APIs paid per delivered row in USDC via x402. All endpoints are synchronous at POST /s/<site>/v1/<endpoint> and also exposed over stateless MCP at POST /mcp. Supports x402 v2 'upto' (Permit2, charged strictly for delivered rows) and 'exact' (EIP-3009). Empty/0-row (404), invalid input (422), timeout (504), and upstream failures (502) are never charged.","contact":{"email":"ops@opendata.best"}},"servers":[{"url":"https://x402.opendata.best"}],"paths":{"/s/costco-com/v1/search":{"post":{"operationId":"costco_com_search","summary":"Costco Products Prices and Warehouses: Search Costco products, categories or specialty pages","description":"Product or category tree rows from Costco by keyword, category, topic or specialty browse. Unit price: $0.003000/row USDC (default quote 5 rows, max 10 rows). Unsettled / 0-row / error responses are never charged.","tags":["costco-com","eCommerce"],"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"dynamic","currency":"USD","amount":"0.015000"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"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","enum":["auto","keywordSearch","categoryBrowse","specialtyBrowse","categoryTree"]},"keyword":{"type":"string","description":"Search words, e.g. paper towels. Fill this (and nothing else) to search Costco."},"query":{"type":"string","description":"Same as Keyword (older name)."},"categorySlug":{"type":"string","description":"Category path without the domain, such as grocery-household for the US market.","pattern":"^[A-Za-z0-9._/-]*$"},"categoryUrl":{"type":"string","description":"Category link for the selected Costco market. A category path without the domain is also accepted.","pattern":"^\\s*$|^\\s*https://([A-Za-z0-9-]+\\.)*costco\\.(com|ca|com\\.mx|co\\.uk|com\\.au|co\\.jp|co\\.kr|com\\.tw)/.*$|^\\s*/.*$"},"slug":{"type":"string","description":"Optional product-name path used with itemId when forming a product link."},"topic":{"type":"string","description":"Choose Hot Buys, What's New, Warehouse only, or Grocery to collect specialty listings. Availability varies by market.","enum":["hotBuys","whatsNew","warehouseOnly","grocery"]},"browseCountry":{"type":"string","description":"Choose the Costco shopping market: United States, Canada, Mexico, United Kingdom, Australia, Japan, South Korea, or Taiwan.","default":"US","enum":["US","CA","MX","UK","AU","JP","KR","TW"]},"zip":{"type":"string","description":"Optional ZIP / postal code for warehouse and stock context."},"warehouse":{"type":"string","description":"Optional warehouse identifier for location context. This does not guarantee product availability at that warehouse."},"dept":{"type":"string","description":"Optional department filter for supported keyword searches. Available departments vary by market."},"sort":{"type":"string","description":"Requested order: relevance, priceAsc, priceDesc, newest, or rating. Availability varies by market."},"currency":{"type":"string","description":"Optional currency setting; otherwise the selected market determines it. This is not a currency-conversion feature."},"page":{"type":"integer","description":"Starting page for supported listing modes, from 1 to 200. The default is 1.","default":1,"minimum":1},"maxPages":{"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.","minimum":1,"maximum":50},"enrichDetails":{"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":{"type":"integer","description":"Maximum listing rows to enrich in each part when enrichDetails is true. Default 5; allowed range 0 to 50.","default":5,"minimum":0,"maximum":50},"maxResults":{"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 platform plan: up to 200 rows per run and 10 runs of this Actor.","default":5,"minimum":1,"maximum":10}},"additionalProperties":false},"example":{"keyword":"paper towels","browseCountry":"CA","enrichDetails":false,"maxResults":5}}}},"responses":{"200":{"description":"Synchronous data rows with x402 PAYMENT-RESPONSE receipt header.","headers":{"PAYMENT-RESPONSE":{"description":"Base64-encoded x402 v2 SettleResponse receipt.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response_costco_com"},"example":{"jobId":"job_costco-c_example","status":"succeeded","done":true,"rowCount":1,"rowsBilled":1,"rowsDelivered":1,"rows":[{"rowType":"example_rowType","itemId":"example_itemId","title":"example_title","brand":"example_brand","price":"example_price","currency":"example_currency"}],"meta":{"site":"costco-com","endpoint":"search","maxResults":5,"payment":{"scheme":"upto","network":"eip155:84532","quotedMicrousd":15000,"settledMicrousd":3000,"transaction":"0x0000000000000000000000000000000000000000000000000000000000000000"}}}}}},"402":{"description":"Payment required or invalid/declined payment authorization (never charged).","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 PaymentRequired quote.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"no_results: 0 rows matched the query; aborted before settlement (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"payment_id_conflict: payment-identifier reused with different parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid or missing request parameters (validated before /verify; charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit or payer cooldown exceeded (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Upstream source failed or blocked (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"settlement_pending or facilitator_unavailable; retry same payment to reconcile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"upstream_timeout: synchronous deadline reached and task cancelled (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/s/costco-com/v1/products":{"post":{"operationId":"costco_com_products","summary":"Costco Products Prices and Warehouses: Costco product details or reviews","description":"Detailed product or customer review rows for a given itemId or productUrl. Unit price: $0.003000/row USDC (default quote 5 rows, max 10 rows). Unsettled / 0-row / error responses are never charged.","tags":["costco-com","eCommerce"],"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"dynamic","currency":"USD","amount":"0.015000"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"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":"productDetail","enum":["productDetail","productReviews"]},"itemId":{"type":"string","description":"Item number from the Costco product link; it may differ from the sku in the output.","pattern":"^\\s*[0-9A-Za-z-]*\\s*$"},"productUrl":{"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.","pattern":"^\\s*$|^\\s*https://([A-Za-z0-9-]+\\.)*costco\\.(com|ca|com\\.mx|co\\.uk|com\\.au|co\\.jp|co\\.kr|com\\.tw)/.*$|^\\s*/.*$"},"slug":{"type":"string","description":"Optional product-name path used with itemId when forming a product link."},"browseCountry":{"type":"string","description":"Choose the Costco shopping market: United States, Canada, Mexico, United Kingdom, Australia, Japan, South Korea, or Taiwan.","default":"US","enum":["US","CA","MX","UK","AU","JP","KR","TW"]},"zip":{"type":"string","description":"Optional ZIP / postal code for warehouse and stock context."},"warehouse":{"type":"string","description":"Optional warehouse identifier for location context. This does not guarantee product availability at that warehouse."},"maxResults":{"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 platform plan: up to 200 rows per run and 10 runs of this Actor.","default":5,"minimum":1,"maximum":10}},"additionalProperties":false},"example":{"mode":"productDetail","productUrl":"https://www.costco.com/p/-/ninja-crispi-portable-air-fryer/4000376434","browseCountry":"US","maxResults":5}}}},"responses":{"200":{"description":"Synchronous data rows with x402 PAYMENT-RESPONSE receipt header.","headers":{"PAYMENT-RESPONSE":{"description":"Base64-encoded x402 v2 SettleResponse receipt.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response_costco_com"},"example":{"jobId":"job_costco-c_example","status":"succeeded","done":true,"rowCount":1,"rowsBilled":1,"rowsDelivered":1,"rows":[{"rowType":"example_rowType","itemId":"example_itemId","title":"example_title","brand":"example_brand","price":"example_price","currency":"example_currency"}],"meta":{"site":"costco-com","endpoint":"products","maxResults":5,"payment":{"scheme":"upto","network":"eip155:84532","quotedMicrousd":15000,"settledMicrousd":3000,"transaction":"0x0000000000000000000000000000000000000000000000000000000000000000"}}}}}},"402":{"description":"Payment required or invalid/declined payment authorization (never charged).","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 PaymentRequired quote.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"no_results: 0 rows matched the query; aborted before settlement (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"payment_id_conflict: payment-identifier reused with different parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid or missing request parameters (validated before /verify; charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit or payer cooldown exceeded (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Upstream source failed or blocked (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"settlement_pending or facilitator_unavailable; retry same payment to reconcile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"upstream_timeout: synchronous deadline reached and task cancelled (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/s/costco-com/v1/warehouses":{"post":{"operationId":"costco_com_warehouses","summary":"Costco Products Prices and Warehouses: Costco warehouse locations","description":"Warehouse directory and address rows filtered by market or postal zip. Unit price: $0.003000/row USDC (default quote 5 rows, max 10 rows). Unsettled / 0-row / error responses are never charged.","tags":["costco-com","eCommerce"],"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"dynamic","currency":"USD","amount":"0.015000"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"browseCountry":{"type":"string","description":"Choose the Costco shopping market: United States, Canada, Mexico, United Kingdom, Australia, Japan, South Korea, or Taiwan.","default":"US","enum":["US","CA","MX","UK","AU","JP","KR","TW"]},"zip":{"type":"string","description":"Optional ZIP / postal code for warehouse and stock context."},"maxResults":{"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 platform plan: up to 200 rows per run and 10 runs of this Actor.","default":5,"minimum":1,"maximum":10}},"additionalProperties":false},"example":{"zip":"98101","browseCountry":"US","maxResults":5}}}},"responses":{"200":{"description":"Synchronous data rows with x402 PAYMENT-RESPONSE receipt header.","headers":{"PAYMENT-RESPONSE":{"description":"Base64-encoded x402 v2 SettleResponse receipt.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response_costco_com"},"example":{"jobId":"job_costco-c_example","status":"succeeded","done":true,"rowCount":1,"rowsBilled":1,"rowsDelivered":1,"rows":[{"rowType":"example_rowType","itemId":"example_itemId","title":"example_title","brand":"example_brand","price":"example_price","currency":"example_currency"}],"meta":{"site":"costco-com","endpoint":"warehouses","maxResults":5,"payment":{"scheme":"upto","network":"eip155:84532","quotedMicrousd":15000,"settledMicrousd":3000,"transaction":"0x0000000000000000000000000000000000000000000000000000000000000000"}}}}}},"402":{"description":"Payment required or invalid/declined payment authorization (never charged).","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 PaymentRequired quote.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"no_results: 0 rows matched the query; aborted before settlement (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"payment_id_conflict: payment-identifier reused with different parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid or missing request parameters (validated before /verify; charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit or payer cooldown exceeded (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Upstream source failed or blocked (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"settlement_pending or facilitator_unavailable; retry same payment to reconcile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"upstream_timeout: synchronous deadline reached and task cancelled (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/s/costco-com/v1/health":{"get":{"operationId":"costco_com_health","summary":"Costco Products Prices and Warehouses: health check","description":"Free readiness check (never returns 402 and never starts a collection).","tags":["costco-com","health"],"responses":{"200":{"description":"Operational","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}},"503":{"description":"Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}}},"components":{"schemas":{"ErrorDetail":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"charged":{"type":"boolean"}}},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"HealthStatus":{"type":"object","required":["ok","site","status","endpoints","rowsBilled"],"properties":{"ok":{"type":"boolean"},"site":{"type":"string"},"status":{"type":"string","enum":["operational","unavailable"]},"endpoints":{"type":"array","items":{"type":"string"}},"rowsBilled":{"type":"integer"}}},"Row_costco_com":{"type":"object","properties":{"rowType":{"type":["string","null"],"title":"Row type"},"itemId":{"type":["string","null"],"title":"Item ID"},"title":{"type":["string","null"],"title":"Title"},"brand":{"type":["string","null"],"title":"Brand"},"price":{"type":["string","null"],"title":"Price"},"currency":{"type":["string","null"],"title":"Currency"},"rating":{"type":["string","null"],"title":"Rating"},"reviewCount":{"type":["string","null"],"title":"Reviews"},"availability":{"type":["string","null"],"title":"Availability"},"imageUrl":{"type":["string","null"],"title":"Image"},"browseCountry":{"type":["string","null"],"title":"Market"},"mode":{"type":["string","null"],"title":"Mode"},"url":{"type":["string","null"],"format":"uri","title":"URL"}},"additionalProperties":true},"Response_costco_com":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string"},"done":{"type":"boolean"},"rowCount":{"type":"integer","minimum":1},"rowsBilled":{"type":"integer","minimum":1},"rowsDelivered":{"type":"integer","minimum":1},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Row_costco_com"}},"meta":{"type":"object","properties":{"site":{"type":"string"},"endpoint":{"type":"string"},"maxResults":{"type":"integer"},"payment":{"type":"object","properties":{"scheme":{"type":"string"},"network":{"type":"string"},"quotedMicrousd":{"type":"integer"},"settledMicrousd":{"type":"integer"},"transaction":{"type":"string"},"payer":{"type":"string"}}}}}},"required":["jobId","status","done","rowCount","rows"]}}},"x-discovery":{"ownershipProofs":["0xdb7c562a3ef6f9f29da4672abdab1489e82e910a91b863e3c22b905df6522b7223798a84245e0452cab689483b6cbb7cd8c13141319df982b213dea31ee7e4311c"]}}