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

Costco Warehouse API Documentation

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

Costco Warehouse API returns one warehouse with address, coordinates, phone, time zone, opening date, opening hours, holiday closures and services with their own hours. A US warehouse with a gas station also returns the current regular, premium and diesel prices in USD per gallon. gas_prices is null when the warehouse has no gas station, for Canadian warehouses and when Costco shows no price. An unknown id returns 404. Costs 1 credit per successful request.

Costco Warehouse API Documentation 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/costco/warehouse
Auth header
x-api-key
Cost
1 credit/request
id = 1234567890
Response preview
200 OK
{
    "data": {
        "warehouse": {
            "id": "243",
            "name": "Queens",
            "type": "Warehouse",
            "hours": [
                {
                    "days": [
                        "monday",
                        "tuesday",
                        "wednesday",
                        "thursday",
                        "friday"
...

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.

id string Required

Warehouse number from the warehouses route, for example 243.

Example value 1234567890
locale string Optional

en-US (default), en-CA or fr-CA. Sets the language of names and hours.

Example value en-US
include_gas boolean Optional

true (default) adds gas prices for US warehouses with a gas station. false skips the gas lookup.

Example value true

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": {
        "warehouse": {
            "id": "243",
            "name": "Queens",
            "type": "Warehouse",
            "hours": [
                {
                    "days": [
                        "monday",
                        "tuesday",
                        "wednesday",
                        "thursday",
                        "friday"
                    ],
                    "open": "09:00",
                    "close": "20:30",
                    "label": "Business Mon-Fri",
                    "closed": false
                },
                {
                    "days": [
                        "monday",
                        "tuesday",
                        "wednesday",
                        "thursday",
                        "friday"
                    ],
                    "open": "10:00",
                    "close": "20:30",
                    "label": "Mon-Fri",
                    "closed": false
                }
            ],
            "phone": "(718) 267-3680",
            "address": {
                "city": "LONG ISLAND CITY",
                "line1": "3250 VERNON BLVD",
                "line2": null,
                "state": "NY",
                "country": "US",
                "postal_code": "11106-4927"
            },
            "distance": null,
            "holidays": [
                {
                    "date": "2026-11-26",
                    "name": "Thanksgiving Day",
                    "open": null,
                    "close": null,
                    "closed": true
                }
            ],
            "latitude": 40.76760808,
            "services": [
                {
                    "code": "food",
                    "name": "Food Court",
                    "hours": [],
                    "phone": "(718) 267-3681"
                },
                {
                    "code": "optical",
                    "name": "Optical Department",
                    "hours": [],
                    "phone": "(718) 267-5512"
                },
                {
                    "code": "gas",
                    "name": "Gas Station",
                    "hours": [],
                    "phone": null
                }
            ],
            "longitude": -73.93886284,
            "time_zone": "America/New_York",
            "gas_prices": {
                "unit": "per_gallon",
                "diesel": 5.899,
                "premium": 5.699,
                "regular": 4.959,
                "currency": "USD"
            },
            "region_code": "NE",
            "opening_date": "1996-11-20",
            "distance_unit": null,
            "has_gas_station": true
        }
    },
    "meta": {
        "credits": 1,
        "billable": true,
        "endpoint_family": "warehouse"
    },
    "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"
}
404

Not Found

The product, item or warehouse does not exist. This response is not billable.

{
    "meta": {
        "billable": false,
        "retryable": false,
        "endpoint_family": "warehouse"
    },
    "error": {
        "code": "NOT_FOUND",
        "message": "The requested resource was not found."
    },
    "success": false
}
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": "warehouse"
    },
    "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.