# Starbucks Product ## Overview | Property | Value | |----------|-------| | **Status** | active | | **Method** | `GET` | | **Endpoint** | `/v2/starbucks/product` | | **Base URL** | `https://api.piloterr.com` | | **Credit Cost** | 3 credits per call | | **Documentation** | https://www.piloterr.com/library/starbucks-product | ## Description One Starbucks item at one café, with a price for every size. Get the café from Search first. Prices use browser rendering. ## Authentication - **Key Name:** `x-api-key` - **Location:** HTTP Header - **Get an API key:** https://app.piloterr.com/register ## Example Request ```bash curl --location --request GET 'https://api.piloterr.com/v2/starbucks/product' \ --header 'Content-Type: application/json' \ --header 'x-api-key: YOUR_API_KEY' ``` ## Example Response ### Pumpkin Spice Latte at DTLA Grand Park ```json { "url": "https://www.starbucks.com/menu/product/418/hot", "name": "Pumpkin Spice Latte", "sizes": [ { "sku": "183885", "name": "short", "price": 6.15, "default": false, "calories": "210 calories", "currency": "usd", "size_code": "short" }, { "sku": "183886", "name": "tall", "price": 6.25, "default": false, "calories": "300 calories", "currency": "usd", "size_code": "tall" }, { "sku": "183887", "name": "grande", "price": 6.75, "default": true, "calories": "390 calories", "currency": "usd", "size_code": "grande" }, { "sku": "183888", "name": "venti", "price": 7.25, "default": false, "calories": "470 calories", "currency": "usd", "size_code": "venti" } ], "currency": "usd", "form_code": "hot", "image_url": "https://cloudassets.starbucks.com/is/image/sbuxcorp/PumpkinSpiceLatteV1", "store_name": "DTLA Grand Park", "description": "Our signature Espresso Roast and steamed milk with the celebrated flavor combination of pumpkin, cinnamon, nutmeg and clove. Enjoy it topped with whipped cream and real pumpkin-pie spices.", "product_type": "beverages", "store_number": "9230-154245", "product_number": 418 } ``` ## Documentation ## Overview Starbucks Product returns one item at one café, with a price and a calorie count for every size. The price is the price at that café. Search does not return drink prices. It only finds the café. This endpoint is the one that prices every size. ## How to get a price 1. Call [Starbucks Search](https://www.piloterr.com/library/starbucks-search) with `lat` and `lng`. Copy `store_number`. Downtown Los Angeles (`34.054908`, `-118.242643`) returns DTLA Grand Park as `9230-154245`. The short number `9230` works too. 2. Call Product with the item and that café. `query` is `418/hot`, or a product URL. `store_number` is required unless the URL already contains `storeNumber`. 3. Wait. A typical call returns in about 30 seconds. The endpoint times out at 60 seconds. 4. Read `sizes`. Each row is one size. `price` is the amount. `currency` is a lowercase code such as `usd`. `calories` is a lowercase label such as `390 calories`. `default` is `true` for the size that Menu shows, usually grande. If `store_number` is missing, the API returns `400` in under a second. There is no price in that response. ## Quickstart ``` GET https://api.piloterr.com/v2/starbucks/search?lat=34.054908&lng=-118.242643 GET https://api.piloterr.com/v2/starbucks/product?query=418/hot&store_number=9230 ``` A live call for `418/hot` at café `9230` returned Pumpkin Spice Latte at DTLA Grand Park (`9230-154245`): | Size | SKU | Price | Calories | Default | |---|---|---|---|---| | `short` | 183885 | 6.15 | 210 calories | no | | `tall` | 183886 | 6.25 | 300 calories | no | | `grande` | 183887 | 6.75 | 390 calories | yes | | `venti` | 183888 | 7.25 | 470 calories | no | `currency` is `usd`. The same drink at another café is another call, and the price can differ. You can also pass the product page: ``` GET https://api.piloterr.com/v2/starbucks/product?query=https://www.starbucks.com/menu/product/418/hot&store_number=9230 ``` ## Where the product id comes from [Starbucks Menu](https://www.piloterr.com/library/starbucks-menu) lists every item at the café, priced at the default size only. Each row has `product_number` and `form_code`. Build `query` as `{product_number}/{form_code}`. Product `418` with form `hot` is `418/hot`. `form_code` in the response is lowercase (`hot`, `iced`). If `query` is only the number `418`, pass `form_code=hot` as well. Use Menu when you want the whole card at the default size. Use Product when you want short, tall, grande, and venti. ## Parameters | Parameter | Type | Required | Description | |---|---|---|---| | `query` | string | yes | `418/hot`, or a Starbucks product URL | | `store_number` | string | no | Café number from Search, `9230` or `9230-154245`. Required when the URL has no `storeNumber` | | `form_code` | string | no | `hot` or `iced`, when `query` is only a product number | ## Response Codes are lowercase. | Field | Type | Description | |---|---|---| | `store_number` | string | Full café number, such as `9230-154245` | | `store_name` | string | Café name | | `product_number` | number | Starbucks product number | | `name` | string | Item name | | `form_code` | string | `hot` or `iced` | | `product_type` | string | Item type, such as `beverages` | | `description` | string or null | Item description | | `image_url` | string or null | Image | | `url` | string | Product page | | `currency` | string | Lowercase ISO code, such as `usd` | | `sizes` | object[] | One row per size | Each row in `sizes`: | Field | Description | |---|---| | `name` | Size name, lowercase, such as `grande` | | `size_code` | Same size code, lowercase | | `sku` | SKU for that size | | `default` | `true` for the size Menu prices | | `price` | Price at this café | | `currency` | Lowercase ISO code | | `calories` | Label such as `390 calories` | The example on this page is the live `418/hot` response for café `9230`. ## Errors | Code | Meaning | |---|---| | `400` | Missing product, form, or café, or the URL is not on starbucks.com | | `404` | Café or item not found | | `500` | The price could not be loaded | ## Notes Prices use browser rendering. This call costs **3 credits**.