Skip to content

Costco Search Results API

A GET request to our endpoint /api/getter/?platform="costco_search" will allow you to scrape search results from Costco.com's search engine in real-time.

Example

To scrape Costco.com's product search results for the keyword "multivitamin", you can use the following command:

1
curl -v -L 'https://data.unwrangle.com/api/getter/?platform=costco_search&search=multivitamin&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 above, our endpoint needs the following query parameters:

Search Query

search

Required

Parameter defines the search query you want to search. You can use anything that a user may use in a regular search while shopping on Costco.com.

page

Optional

Parameter defines the page number for which you want the results. Default value is 1.

Other Required Parameters

platform

Required

Parameter specifies the scraping engine you wish to invoke. In this case, the value should be costco_search.

api_key

Required

Your account's token—which can be obtained by signing up here.

Note

Be sure to replace any whitespace in the search keywords with a plus + sign. So, if you're looking to scrape search results for the keyword "ssd 1tb", please set the value of the query parameter search to "ssd+1tb".

Results

Up to 24 products can be expected in the search results response. The response will include the following attirbutes for each product in the search results:

Attributes Returned Data Type Information Represented
id string Retailer ID of product lisitng
url string URL of product listing
thumbnail string URL of product's thumbnail
name string Name of product lisitng
price string Price of product
rating float Average rating of product
total_ratings int No. of user ratings received by product

Response Example

Here's the response you can expect to receive for the request showcased above:

{
    "success": true,
    "search": "pillow",
    "page": 1,
    "total_results": 76,
    "no_of_pages": 4,
    "result_count": 24,
    "results": [
        {
            "id": "100658130",
            "url": "https://www.costco.com/the-essential-pillow-by-casper.product.100658130.html",
            "thumbnail": "https://www.costco.com/wcsstore/CostcoGLOBALSAS/images/unavailable_350.png",
            "name": "The Essential Pillow by Casper",
            "price": "$39.99",
            "rating": 4.2143,
            "total_ratings": 1470
        },
        ...
        {
            "id": "100687443",
            "url": "https://www.costco.com/comfort-revolution-charcoal-gel-memory-foam-pillow.product.100687443.html",
            "thumbnail": "https://www.costco.com/wcsstore/CostcoGLOBALSAS/images/unavailable_350.png",
            "name": "Comfort Revolution Charcoal Gel Memory Foam Pillow",
            "price": "$44.99",
            "rating": 4.3895,
            "total_ratings": 267
        },

        {
            "id": "100513866",
            "url": "https://www.costco.com/pacific-coast-feather-hungarian-white-goose-down-pillow.product.100513866.html",
            "thumbnail": "https://images.costco-static.com/ImageDelivery/imageService?profileId=12026540&imageId=100513866-847__1&recipeName=350",
            "name": "Pacific Coast Feather Hungarian White Goose Down Pillow",
            "price": "$99.99",
            "rating": 4.2581,
            "total_ratings": 155
        }
    ],
    "meta_data": {}
}

Request Cost

Each request to this endpoint costs 1 credit per result returned and a minimum of 10 credits per request.

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