Skip to content

Costco Product Reviews API

With a GET request to the /api/getter/?platform="costco_reviews" endpoint, we can scrape customer reviews for any product on Costco's online store in real-time.

Example

Let us try and scrape reviews for the new Macbook Pro 14 inch using this endpoint.

To do this, we need to pass the product's url and the page number we want the reviews from as query parameters.

The results are sorted by recency, so the most recent reviews are on page 1.

1
curl -v -L 'https://data.unwrangle.com/api/getter/?platform=costco_reviews&url=https%3A%2F%2Fwww.costco.com%2Fmacbook-pro-(14-inch)---apple-m1-pro-chip-with-10-core-cpu-and-16-core-gpu%252c-1tb-ssd.product.100713171.html&api_key=API_KEY'

Note

When using curl, it is necessary to add the option -L to get the data back. This is because in some cases our server responds with a 301 and curl does not follow the redirect by default.

Query Parameters

As you can see in the example below, our endpoint needs the following query parameters:

Review Query

url

Required

Parameter defines the URL of the product listing for which you want to query reviews. Value of this parameter must be encoded.

page

Optional

Parameter defines the page number from which you want to query reviews. The default value is 1.

Other Required Parameters

platform

Required

Parameter specifies the scraping engine you want to invoke. For the Costco Reviews API, the value should be costco_reviews.

api_key

Required

Parameter defines your account's token. Get your API key for free here.

Note

The value of the query parameter url must be URL or percent encoded. If you're using Python, this can be done with the function urlencode.

Results

Each request returns up to 30 reviews. The response will include the following attirbutes for each review present in the response:

Attributes Returned Data Type Information Represented
id string Retailer ID of the review
date string Date when review was published
rating int Rating by reviewer
review_title string Review title by reviewer
review_text string Review's text content
author_name string Reviewer's name
meta_data dict Dict containing meta data like whether purchase is verified and user recommends product. For e.g. verified purchase status
location string State / city level language of reviewer
lang_code string Country level language of review content

Response Example

Each request returns up to 30 results. Here's the response you can expect for the request showcased above:

{
    "success": true,
    "url": "https://www.costco.com/macbook-pro-(14-inch)---apple-m1-pro-chip-with-10-core-cpu-and-16-core-gpu%2c-1tb-ssd.product.100713171.html",
    "page": 1,
    "total_results": 128,
    "no_of_pages": 5,
    "result_count": 30,
    "reviews": [
        {
            "id": "217485469",
            "date": "2022-06-07",
            "rating": 5,
            "review_title": "Best Macbook Pro thus far",
            "review_text": "This is my 4th Macbook Pro.  Each Macbook pro was excellent.  This is no exception.  This replaces my 2015 13\" Retina Display Macbook Pro.  This new 14\" offers great features, speed, and resources.  It performs as well or better than I had hoped.  It is also beautiful.",
            "review_url": null,
            "author_name": "Joshl74",
            "author_url": null,
            "author_avatar": null,
            "meta_data": {
                "author_id": "f756ba21-575c-4d19-ae5f-c3dd7762461f",
                "verified_purchase": true,
                "helpful_vote_count": null,
                "is_recommended": true
            },
            "lang_code": "en_US",
            "location": "California",
            "response": null
        },
        ...
        {
            "id": "216577491",
            "date": "2022-04-29",
            "rating": 5,
            "review_title": "Kudos to Costco and Apple",
            "review_text": "Another wonderful experience at Costco. The new MacBook Pro is configured perfectly for my needs. Superior computer, easy to order, and I chose pick-up at my local store, since I needed to make other onsite purchases.i highly recommend BOTH this computer AND Costco. An additional plus - it was on sale and I saved an additional $200-",
            "review_url": null,
            "author_name": "feixingyuan",
            "author_url": null,
            "author_avatar": null,
            "meta_data": {
                "author_id": "9b5212d6-fcaa-4910-bfb5-1e14ed267def",
                "verified_purchase": true,
                "helpful_vote_count": 1.0,
                "is_recommended": true
            },
            "lang_code": "en_US",
            "location": null,
            "response": null
        }
    ],
    "meta_data": {
        "product_name": "MacBook Pro (14-inch) - Apple M1 Pro Chip with 10-Core CPU and 16-Core GPU, 1TB SSD",
        "product_id": "100713171",
        "product_model": "1507115",
        "product_img": "https://images.costco-static.com/ImageDelivery/imageService?profileId=12026540&imageId=100713171-847__1&recipeName=700",
        "product_rating": 4.8,
        "product_details": "<span style='font-weight:bold;'>Limit 2 per member</span><br/><br/>The MacBook Pro delivers game-changing performance for pro users. With the powerful M1 Pro to supercharge pro-level workflows while getting amazing battery life.¹ And with an immersive 14-inch Liquid Retina XDR display and an array of pro ports, you can do more than ever with MacBook Pro.²<br/><br/><span style='font-weight:bold;'>Features:</span><br/><ul><li>Apple M1 Pro chip for a massive leap in CPU, GPU, and machine learning performance</li><li>10-core CPU delivers faster performance to fly through pro workflows quicker than ever³</li><li>16-core GPU with faster performance for graphics-intensive apps and games³</li><li>16-core Neural Engine for up to 11x faster machine learning performance³ </li><li>Longer battery life, up to 17 hours¹</li><li>16GB of unified memory so everything you do is fast and fluid</li><li>1TB of superfast SSD storage launches apps and opens files in an instant</li><li>Stunning 14-inch Liquid Retina XDR display with extreme dynamic range and contrast ratio²</li><li>1080p FaceTime HD camera with advanced image signal processor for sharper video calls</li><li>Six-speaker sound system with force-cancelling woofers </li><li>Studio-quality three-microphone array captures your voice more clearly</li><li>Three Thunderbolt 4 ports, HDMI port, SDXC card slot, headphone jack, MagSafe 3 port</li><li>Next-generation Wi-Fi 6 for faster connectivity</li><li>Backlit Magic Keyboard with Touch ID for secure unlock and payments</li><li>macOS Monterey lets you connect, share, and create like never before, with exciting new FaceTime updates and a redesigned Safari</li><li>Available in space gray and silver</li><br/></ul><span style='font-weight:bold;'>Legal</span><br/>¹Battery life varies by use and configuration. See apple.com/batteries for more information.<br/>²The display on the 14-inch MacBook Pro has rounded corners at the top. When measured as a standard rectangular shape, the screen is 14.2 inches diagonally (actual viewable area is less).<br/>³Compared with previous generation.<br/><br/><span style='font-weight:bold;'>Technical specifications</span><br/>Go to apple.com/macbook-pro-14-and-16/specs for a complete set.<br/>",
        "brand": "Apple",
        "total_ratings": 307
    }
}

Request Cost

Each request returns up to 30 reviews and costs 10 credits or 1 credit per review, whichever is higher.

Support

If you want to add a parameter to our response, or have any question or feedback, please write to us at support@unwrangle.com