# Costco Warehouse API Documentation

<p><strong>Costco Warehouse API</strong> 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. <code>gas_prices</code> is <code>null</code> 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.</p>

- **Documentation:** [https://scrappa.co/docs/costco-api/costco_warehouse](https://scrappa.co/docs/costco-api/costco_warehouse)
- **API group:** Costco API
- **Endpoint:** `GET https://scrappa.co/api/costco/warehouse`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | Warehouse number from the warehouses route, for example 243. |
| `locale` | string | No | en-US (default), en-CA or fr-CA. Sets the language of names and hours. |
| `include_gas` | boolean | No | true (default) adds gas prices for US warehouses with a gas station. false skips the gas lookup. |

## Example response

```json
{
    "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

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required parameter or a value is invalid. This response is not billable. |
| 404 | Not Found | The product, item or warehouse does not exist. This response is not billable. |
| 503 | Upstream Unavailable | Costco could not be reached after several tries. This response is not billable. Retry shortly. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
