Piloterr

Costco Search

GET
/v2/costco/search

Costco Search API: search product listings by keyword or URL across 13 regional Costco sites. Returns prices, availability, review counts and pagination via browser rendering.

Credit cost: 2 credits per call

Authentification

ApiKeyAuth
headerx-api-key<token>

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

Paramètres de requête

query*string

Search keyword or full regional search URL.

Examples:

home
home + region=fr
https://www.costco.co.uk/search?text=sonos
https://www.costco.ca/CatalogSearch?keyword=home&currentPage=2

Full URLs auto-detect region and pagination format. Use Costco Product on any result url for PDP details.

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
page?number

1-based page number override. Uses currentPage (most regions) or page (UK) when rebuilding pagination URLs.

Range1 <= value <= 500
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

Corps de la réponse

Successful response

application/json
  1. response
results?array<>
pagination?
Example Request
curl -X GET 'https://api.piloterr.com/v2/costco/search?query=string'
Example Response
{  "results": [    {      "url": "https://www.costco.com/mohawk-home-6mm-thick-94in-x-478in-22-mil-waterproof-luxury-vinyl-plank-flooring-1565-sq-ftctn.product.4000266385.html",      "price": 40.99,      "title": "Mohawk Home 6MM Thick 9.4in X 47.8in 22 MIL Waterproof Luxury Vinyl Plank Flooring (15.65 sq ft/ctn)",      "region": "www.costco.com",      "currency": "USD",      "image_url": "https://bfasset.costco-static.com/U447IH35/as/6wxn2893r8g35r5p98jnkw2v/4000266385-847_tudoroak_1?auto=webp&format=jpg",      "product_id": "4000266385",      "availability": "delivery",      "review_count": 84    }  ],  "pagination": {    "next": "https://www.costco.com/s?keyword=home&currentPage=2",    "page": 1,    "region": "www.costco.com",    "per_page": 24,    "total_pages": 36,    "total_results": 860  }}