# Starbucks Scraper (`fortuitous_pirate/starbucks-scraper`) Actor

Starbucks Scraper. Structured data export for lead generation, enrichment, and competitive research.

- **URL**: https://apify.com/fortuitous\_pirate/starbucks-scraper.md
- **Developed by:** [Fortuitous Pirate](https://apify.com/fortuitous_pirate) (community)
- **Categories:** Lead generation, Automation, Developer tools
- **Stats:** 8 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Starbucks Store & Menu Scraper

Scrapes Starbucks store locations and menu items with prices and nutritional info.

### API Source

- **Stores**: https://www.starbucks.com/bff/locations
- **Menu**: https://www.starbucks.com/menu
- **API Key**: Not required

### Input Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `mode` | enum | `"stores"` | What to scrape: `"stores"`, `"menu"`, or `"both"` |
| `location` | string | `"Seattle, WA"` | City, ZIP code, or address for store search |
| `radius` | integer | `10` | Search radius in miles (1-100) |
| `menuCategory` | enum | `""` | Menu category: `""` (all), `"drinks"`, `"food"`, `"at-home-coffee"`, `"merchandise"` |
| `limit` | integer | `50` | Maximum number of items to return (max 500) |
| `proxyConfiguration` | object | `{ useApifyProxy: true }` | Proxy settings |

#### Example Input

```json
{
  "mode": "stores",
  "location": "New York, NY",
  "radius": 5,
  "limit": 100
}
```

```json
{
  "mode": "menu",
  "menuCategory": "drinks",
  "limit": 200
}
```

```json
{
  "mode": "both",
  "location": "Los Angeles, CA",
  "radius": 10,
  "menuCategory": "food",
  "limit": 50
}
```

### Output

#### Store Output Fields

| Field | Type | Description |
|-------|------|-------------|
| `type` | string | Always `"store"` |
| `storeNumber` | string | Unique store identifier |
| `name` | string | Store name |
| `address.street` | string | Street address line 1 |
| `address.street2` | string | Street address line 2 |
| `address.city` | string | City |
| `address.state` | string | State/province code |
| `address.postalCode` | string | ZIP/postal code |
| `address.country` | string | Country code |
| `coordinates.lat` | number | Latitude |
| `coordinates.lng` | number | Longitude |
| `phone` | string | Phone number |
| `hours` | string/object | Operating hours |
| `features` | array | Store features (e.g., Mobile Order, Drive Thru) |
| `mobileOrderEnabled` | boolean | Mobile ordering available |
| `driveThru` | boolean | Has drive-thru |
| `wifi` | boolean | Has WiFi |
| `distance` | number | Distance from search location |
| `scrapedAt` | string | ISO timestamp of scrape |

#### Example Store Output

```json
{
  "type": "store",
  "storeNumber": "12345-67890",
  "name": "Pike Place",
  "address": {
    "street": "1912 Pike Place",
    "street2": null,
    "city": "Seattle",
    "state": "WA",
    "postalCode": "98101",
    "country": "US"
  },
  "coordinates": {
    "lat": 47.6097,
    "lng": -122.3422
  },
  "phone": "(206) 448-8762",
  "hours": "Open 24 Hours",
  "features": ["Mobile Order", "WiFi", "Drive Thru"],
  "mobileOrderEnabled": true,
  "driveThru": true,
  "wifi": true,
  "distance": 0.5,
  "scrapedAt": "2026-01-25T12:00:00.000Z"
}
```

#### Menu Item Output Fields

| Field | Type | Description |
|-------|------|-------------|
| `type` | string | Always `"menu_item"` |
| `name` | string | Item name |
| `price` | string | Price (numeric value) |
| `calories` | string | Calorie count |
| `image` | string | Image URL |
| `url` | string | Product page URL |
| `category` | string | Menu category |
| `scrapedAt` | string | ISO timestamp of scrape |

#### Example Menu Item Output

```json
{
  "type": "menu_item",
  "name": "Caffe Latte",
  "price": "5.45",
  "calories": "190",
  "image": "https://www.starbucks.com/weblx/images/products/caffe-latte.jpg",
  "url": "https://www.starbucks.com/menu/product/407/hot",
  "category": "drinks",
  "scrapedAt": "2026-01-25T12:00:00.000Z"
}
```

### Usage

#### Run on Apify

1. Go to the actor page on Apify
2. Configure input parameters
3. Click "Run"
4. Download results from the Dataset tab

#### Run Locally

```bash
## Install dependencies
npm install

## Set input in storage/key_value_stores/default/INPUT.json
echo '{"mode": "stores", "location": "Seattle, WA"}' > storage/key_value_stores/default/INPUT.json

## Run
npm start
```

### Tech Stack

- Node.js 18+
- Apify SDK 3.x
- Crawlee 3.x
- Playwright (for menu scraping)

### Notes

- Store locations use the Starbucks BFF API with geocoding via OpenStreetMap Nominatim
- Menu scraping uses Playwright to render the React-based menu pages
- Residential proxies recommended for reliable scraping
- Rate limiting is built-in with random delays between requests

# Actor input Schema

## `mode` (type: `string`):

What to scrape

## `location` (type: `string`):

City, ZIP code, or address for store search

## `radius` (type: `integer`):

Search radius for stores

## `menuCategory` (type: `string`):

Menu category to scrape

## `limit` (type: `integer`):

Maximum number of items to return

## `proxyConfiguration` (type: `object`):

Proxy settings

## Actor input object example

```json
{
  "mode": "stores",
  "location": "Seattle, WA",
  "radius": 10,
  "limit": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("fortuitous_pirate/starbucks-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("fortuitous_pirate/starbucks-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call fortuitous_pirate/starbucks-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fortuitous_pirate/starbucks-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/34sCZk0knC6Z5Bo5T/builds/ZD13nvoUNyftqVRi2/openapi.json
