Piloterr

Costco Product

GET
/v2/costco/product

Costco Product API: fetch full product page data from a product ID or URL across regional Costco sites. Returns pricing, availability, ratings, images and breadcrumbs via browser rendering.

Credit cost: 2 credits per call

Autorização

ApiKeyAuth
headerx-api-key<token>

Your API key. Include it in the x-api-key header for every request.

Parâmetros de consulta

query*string

Costco product ID or full product URL.

Examples:

4000266385
4000268598 + region=ca
https://www.costco.com/p/-/mohawk-home-6mm-thick-94in-x-478in-22-mil-waterproof-luxury-vinyl-plank-flooring-1565-sq-ftctn/4000266385
https://www.costco.ca/nom.produit.product.4000268598.html
region?string

Regional Costco site. Accepts a region code (us, fr, ca, uk, …) or full host (www.costco.fr). Defaults to US (www.costco.com) when omitted.

Examples:

fr
ca
www.costco.co.uk
return_page_source?boolean

When true, return the raw HTML page source as {"result": "..."} instead of structured JSON. Defaults to false.

fields?string

Comma-separated list of response fields to return, with dot notation for nested fields (e.g. name,location.city).

is_async?boolean

Run the request as a background job: the API answers 202 with a job_id to poll on GET /v1/jobs/{id}.

Defaultfalse
soft_fail?boolean

Return HTTP 200 even when the request fails; the error is in the error field of the body.

Defaultfalse

Corpo da resposta

Successful response

application/json
  1. response
url?string
name?string
brand?string
price?number
images?array<string>
rating?number
region?string
currency?string
image_url?string
product_id?string
breadcrumbs?array<string>
description?string
item_number?string
availability?string
review_count?integer
Example Request
curl -X GET 'https://api.piloterr.com/v2/costco/product?query=string'
Example Response
{  "url": "https://www.costco.com/p/-/mohawk-home-6mm-thick-94in-x-478in-22-mil-waterproof-luxury-vinyl-plank-flooring-1565-sq-ftctn/4000266385",  "name": "Mohawk Home 6MM Thick 9.4in X 47.8in 22 MIL Waterproof Luxury Vinyl Plank Flooring (15.65 sq ft/ctn)",  "brand": "Mohawk Home",  "price": 47.99,  "images": [    "https://bfasset.costco-static.com/U447IH35/as/44xhpxq9ttr6nhpr4trsx53/4000266385-847_bloomingtonoak_1?auto=webp&format=jpg",    "https://bfasset.costco-static.com/U447IH35/as/6wxn2893r8g35r5p98jnkw2v/4000266385-847_tudoroak_1?auto=webp&format=jpg&width=727&height=727&fit=bounds&canvas=727%2C727"  ],  "rating": 3.68,  "region": "www.costco.com",  "currency": "USD",  "image_url": "https://bfasset.costco-static.com/U447IH35/as/44xhpxq9ttr6nhpr4trsx53/4000266385-847_bloomingtonoak_1?auto=webp&format=jpg",  "product_id": "4000266385",  "breadcrumbs": [    "Home Improvement",    "Flooring",    "Vinyl Flooring"  ],  "description": "SplashDefense® 100% Waterproof and Water-tight Joints;CleanProtect® Technology with Antimicrobial Properties Built in to Protect the Floor;Wide Plank Vinyl Flooring, 5mm Thick Plank + 1mm Attached Pad for Fast, Easy Installation and No Underlayment Required",  "item_number": "1806569",  "availability": "in_stock",  "review_count": 84}