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
Authorization
ApiKeyAuth Your API key. Include it in the x-api-key header for every request.
In: header
Query Parameters
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¤tPage=2
Full URLs auto-detect region and pagination format. Use Costco Product on any result url for PDP details.
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
1-based page number override. Uses currentPage (most regions) or page (UK) when rebuilding pagination URLs.
1 <= value <= 500When true, return the raw HTML page source as {"result": "..."} instead of structured JSON. Defaults to false.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://api.piloterr.com/v2/costco/search?query=string"{
"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¤tPage=2",
"page": 1,
"region": "www.costco.com",
"per_page": 24,
"total_pages": 36,
"total_results": 860
}
}{
"error": "Bad Request"
}{
"error": "Invalid API Key"
}{
"error": "Payment required"
}{
"error": "Rate limit exceeded for the API key: quota monthly"
}{
"error": "Internal Error"
}