Costco product reviews
Customer reviews of one costco.com product, with the product's average rating, review count, recommended count and star distribution. Each review has rating, title, text, date, author nickname and location, recommended flag, helpful votes, verified-purchaser and incentivized flags, badges, photos and Costco's replies. Sort by relevance, newest, oldest, highest, lowest or most helpful; filter by star rating or reviews with photos. Pass next_page back as page; it is null on the last page.
Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
id | string | The product id at the end of a costco.com/p/… URL. Example: 100234271 |
url | string | A costco.com product URL, instead of id. |
q | string | Search words, instead of id or url: the most-reviewed product matching them is used. |
sort | relevant | newest | oldest | highest | lowest | helpful | Sort order (default relevant). |
rating | integer | Only reviews with this many stars (1 to 5). |
photos | boolean | true: only reviews with photos. |
page | integer | Page number (default 1). |
limit | integer | Reviews per page, 1 to 100 (default 20). |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/costco/v1/reviews?id=100234271" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/costco/v1/reviews",
params={"id": "100234271"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/costco/v1/reviews");
url.searchParams.set("id", "100234271");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).