Skip to content
Scrappa Get API key
Costco API 1 credit/request

Costco Autocomplete API Documentation

GET https://scrappa.co/api/costco/autocomplete

Costco Autocomplete API returns the search suggestions Costco shows while a shopper types. Use country ca with locale fr-CA for Canadian French. A text without suggestions returns an empty list and is free. Costs 1 credit per successful request.

Costco Autocomplete API Documentation 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/costco/autocomplete
Auth header
x-api-key
Cost
1 credit/request
query = coffee shops
Response preview
200 OK
{
    "data": {
        "query": "tv",
        "country": "us",
        "suggestions": [
            "samsung tv",
            "tv stand",
            "tv",
            "apple tv",
            "65 inch tv",
            "lg tv",
            "tcl tv",
            "75 inch tv",
            "85 inch tv",
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

1 required parameter needed before sending a request.

2 optional filters available.

query string Required

Search text, 1 to 100 characters, for example tv.

Example value coffee shops
country string Optional

us (default) or ca. Selects costco.com or costco.ca.

Example value US
locale string Optional

en-US, en-CA or fr-CA. Canadian French works with country ca. Default is the English locale of the country.

Example value en-US

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "data": {
        "query": "tv",
        "country": "us",
        "suggestions": [
            "samsung tv",
            "tv stand",
            "tv",
            "apple tv",
            "65 inch tv",
            "lg tv",
            "tcl tv",
            "75 inch tv",
            "85 inch tv",
            "tvs",
            "oled tv",
            "55 inch tv",
            "tv mount",
            "fireplace tv stand",
            "100 inch tv",
            "sony tv",
            "frame tv",
            "hisense tv",
            "tv stands & entertainment centers",
            "98 inch or larger tvs"
        ],
        "suggested_warehouses": []
    },
    "meta": {
        "credits": 1,
        "billable": true,
        "endpoint_family": "autocomplete"
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

A required parameter or a value is invalid. This response is not billable.

{
    "errors": {
        "query": [
            "A search text is required, e.g. laptop."
        ]
    },
    "message": "The request validation failed"
}
503

Upstream Unavailable

Costco could not be reached after several tries. This response is not billable. Retry shortly.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "autocomplete"
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "Costco could not be reached. Please retry shortly."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.