Costco
Costco Reviews API
Customer reviews for a Costco product as JSON: the rating distribution and recommend count, then each review's rating, title, text, author, date, verified-purchaser flag and helpful votes. Sort, star filter and up to 100 reviews per page. Costs 1 credit per request.
POST/api/v1/costco/reviews
Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your Scavio API key (e.g. Bearer sk_live_your_key).
Body
application/jsonproduct_idstringrequiredCostco product id: the product_id field from Search or Product, not the item number.
Example: 100334960
sort_byenum<string>default:newestReview order.
Example: most_helpful
newest— Most recent first.oldest— Oldest first.highest_rating— 5 stars first.lowest_rating— 1 star first.most_helpful— Most helpful votes first.
ratingintegerOnly reviews with this star rating, 1-5.
Example: 1
pageintegerdefault:1Results page, 1-based, 1-500.
Example: 2
limitintegerdefault:25Reviews per page, 1-100.
Example: 100
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
reviews = client.costco.reviews("100334960", sort_by="lowest_rating", limit=25)
summary = reviews["data"]["rating"]
print(summary["average"], summary["count"], summary["distribution"])
for r in reviews["data"]["reviews"]:
print(r["rating"], r["title"], r["verified_purchaser"])Response
"product_id": "100334960",
"product_title": "Kirkland Signature, Chicken Breast, 12.5 oz, 6-Count",
"total_results": 7379,
"page": 1,
"limit": 5,
"total_pages": 1476,
"count": 5,
},
"response_time": 1764
}