# Grubhub Restaurant Scraper (`crawlerbros/grubhub-scraper`) Actor

Scrape Grubhub restaurant listings and menus. Search by address, fetch a single restaurant with full menu, or scrape from a Grubhub restaurant URL. Extracts ratings, delivery info, cuisine types, and menu items.

- **URL**: https://apify.com/crawlerbros/grubhub-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 11 total users, 3 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Grubhub Restaurant Scraper

Scrape Grubhub restaurant listings and menus. Search by address or city to find nearby restaurants, fetch a single restaurant with its full menu, or scrape from a Grubhub URL. Extracts ratings, delivery info, cuisine types, menu items, and more.

### What data can you scrape?

- **Search restaurants** — find restaurants near any US address or city with cuisine and rating filters
- **Single restaurant + menu** — full restaurant details plus all menu items with prices
- **From URL** — paste any Grubhub restaurant URL to scrape its data and menu

### Input

| Field | Type | Description |
|---|---|---|
| `mode` | select | `search`, `byRestaurantId`, or `byUrl` |
| `address` | string | Address or city for search (e.g. "New York, NY") |
| `cuisine` | select | Cuisine filter (American, Italian, Chinese, etc.) |
| `sortBy` | select | Sort: default, rating, delivery\_time, minimum\_order\_amount |
| `openNow` | boolean | Only open restaurants (default: true) |
| `minRating` | float | Minimum rating 0-5 |
| `maxDeliveryTime` | integer | Max estimated delivery time in minutes |
| `restaurantId` | string | Restaurant ID for byRestaurantId mode |
| `url` | string | Grubhub URL for byUrl mode |
| `maxItems` | integer | Max records to emit (default: 50) |

### Output — Restaurant record

```json
{
  "restaurantId": "987654",
  "name": "The Great Burger Joint",
  "slug": "great-burger-joint",
  "cuisines": ["American", "Burgers"],
  "categories": ["Fast Food"],
  "rating": 4.7,
  "ratingCount": 1250,
  "deliveryFee": 1.99,
  "deliveryTime": 35,
  "minimumOrder": 10.00,
  "address": "456 Burger Ave, New York, NY",
  "city": "New York",
  "state": "NY",
  "zip": "10002",
  "phone": "+12125551234",
  "isOpen": true,
  "acceptsPickup": true,
  "acceptsDelivery": true,
  "promoText": "Free delivery on orders over $15",
  "imageUrl": "https://res.cloudinary.com/grubhub/...",
  "restaurantUrl": "https://www.grubhub.com/restaurant/great-burger-joint/987654",
  "recordType": "restaurant",
  "siteName": "Grubhub",
  "scrapedAt": "2026-05-10T12:00:00+00:00"
}
```

### Output — Menu item record (byRestaurantId mode)

```json
{
  "itemId": "item_001",
  "name": "Classic Cheeseburger",
  "description": "A juicy beef patty with melted cheese",
  "price": 12.99,
  "calories": 650,
  "categoryName": "Burgers",
  "imageUrl": "https://res.cloudinary.com/grubhub/...",
  "recordType": "menuItem",
  "siteName": "Grubhub",
  "scrapedAt": "2026-05-10T12:00:00+00:00"
}
```

### FAQs

**Do I need a Grubhub account?**
No account is required, but anonymous search access is session- and geo-sensitive. Direct restaurant lookups via `byRestaurantId` or `byUrl` are the most reliable modes.

**Which cities are supported?**
Grubhub operates in the US. Provide a US address or city for search mode, and use a US residential proxy for the best chance of success.

**Does byRestaurantId return menu items?**
Yes. When using `byRestaurantId` or `byUrl`, both the restaurant record and all menu items are emitted.

**What should I use for scheduled smoke tests?**
Use `byRestaurantId` with a known restaurant. `byUrl` usually works too, but direct restaurant IDs are the most stable choice for monitoring. Search mode depends on Grubhub's current anonymous geolocation/session gating and is best treated as best-effort.

**How many restaurants can I scrape?**
Set `maxItems` up to 1000. Pagination is handled automatically.

# Actor input Schema

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

How to find restaurants.

## `address` (type: `string`):

Address or city to search near, e.g. 'New York, NY' or '123 Main St, Chicago, IL'.

## `cuisine` (type: `string`):

Filter results to a specific cuisine type.

## `sortBy` (type: `string`):

Result ordering.

## `openNow` (type: `boolean`):

Only include restaurants currently open for delivery.

## `minRating` (type: `number`):

Only include restaurants with a rating at or above this value.

## `maxDeliveryTime` (type: `integer`):

Only include restaurants with estimated delivery time at or below this value.

## `restaurantId` (type: `string`):

Grubhub restaurant ID (numeric) from the restaurant URL.

## `url` (type: `string`):

Paste a Grubhub restaurant URL to scrape its data and menu.

## `maxItems` (type: `integer`):

Maximum number of records to emit.

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

Apify proxy configuration. Residential proxy is recommended for reliable access to Grubhub.

## Actor input object example

```json
{
  "mode": "byRestaurantId",
  "address": "New York, NY",
  "cuisine": "",
  "sortBy": "default",
  "openNow": false,
  "restaurantId": "2879580",
  "url": "https://www.grubhub.com/restaurant/plum-vietnamese-restaurant-210-w-94th-st-new-york/2879580",
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `records` (type: `string`):

Dataset containing all scraped Grubhub restaurants and menu items.

# 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 = {
    "mode": "byRestaurantId",
    "address": "New York, NY",
    "cuisine": "",
    "sortBy": "default",
    "openNow": false,
    "restaurantId": "2879580",
    "url": "https://www.grubhub.com/restaurant/plum-vietnamese-restaurant-210-w-94th-st-new-york/2879580",
    "maxItems": 5,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/grubhub-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 = {
    "mode": "byRestaurantId",
    "address": "New York, NY",
    "cuisine": "",
    "sortBy": "default",
    "openNow": False,
    "restaurantId": "2879580",
    "url": "https://www.grubhub.com/restaurant/plum-vietnamese-restaurant-210-w-94th-st-new-york/2879580",
    "maxItems": 5,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/grubhub-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 '{
  "mode": "byRestaurantId",
  "address": "New York, NY",
  "cuisine": "",
  "sortBy": "default",
  "openNow": false,
  "restaurantId": "2879580",
  "url": "https://www.grubhub.com/restaurant/plum-vietnamese-restaurant-210-w-94th-st-new-york/2879580",
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call crawlerbros/grubhub-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawlerbros/grubhub-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/y9Uf1b0ni5JjpfYvj/builds/TuPXEWVNGa80vltBR/openapi.json
