# Grubhub All-in-One API (`romy/grubhub-all-in-one-api`) Actor

Unofficial always-on REST API for live Grubhub (US) data: restaurant search, autocomplete, and full restaurant detail + menu. No account needed.

- **URL**: https://apify.com/romy/grubhub-all-in-one-api.md
- **Developed by:** [Romy](https://apify.com/romy) (community)
- **Categories:** E-commerce, Developer tools
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event + usage

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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does Grubhub All-in-One API do?

**Grubhub All-in-One API** is a REST endpoint for live Grubhub (US) data — restaurant search, autocomplete, and full restaurant detail + menu — from a single always-on API powered by [Apify Standby](https://docs.apify.com/platform/actors/development/programming-interface/standby).

It talks directly to the same API the official Grubhub Android app uses. No Grubhub account, no API key — call the endpoint, get JSON back.

### Why use Grubhub All-in-One API?

- **No anti-bot wall on the core search path** — confirmed live: search, autocomplete, and menu all clear with no challenge
- **Anonymous session, no account needed** — every endpoint works fully anonymously, token minted per-call automatically
- **Full menu, not a thin stub** — `/menu` returns every category and item (name, description, price, availability), flattened from Grubhub's much larger raw payload
- **Always-on** — Standby mode means no cold start, responds in milliseconds
- **Use cases:** restaurant discovery, menu/price monitoring, delivery-market research, content aggregation

Grubhub only operates in the US, so requests are routed through a US-based proxy.

### Endpoints

| Method | Path            | Description                                        |
| ------ | --------------- | --------------------------------------------------- |
| `GET`  | `/search`       | Restaurant search near a point                      |
| `GET`  | `/autocomplete` | Search-as-you-type suggestions                       |
| `GET`  | `/menu`         | Full restaurant detail + menu                        |

### How to use Grubhub All-in-One API

1. Open this Actor's Standby API URL (shown on the Actor's page, under the API tab).
2. Call any endpoint — for example:
   ```bash
   curl "https://romy--grubhub-all-in-one-api.apify.actor/search?lat=40.7128&lon=-74.006&queryText=pizza"
   curl "https://romy--grubhub-all-in-one-api.apify.actor/autocomplete?lat=40.7128&lon=-74.006&prefix=chick"
   curl "https://romy--grubhub-all-in-one-api.apify.actor/menu?restaurantId=1945160"
   ```

See the full [OpenAPI schema](.actor/web_server_openapi.json) for every parameter.

### Input

This Actor takes no run input. All parameters are passed per-request as HTTP query parameters on the Standby API — see the endpoint table above or the OpenAPI schema.

### Output

Each endpoint returns its result directly as the HTTP response body (JSON) — this Actor does not write to a dataset.

### Pricing

Pay-per-event:

| Event          | What it charges for         |
| -------------- | ---------------------------- |
| `search`       | One `/search` call           |
| `autocomplete` | One `/autocomplete` call     |
| `menu`         | One `/menu` call              |

See the Actor's Pricing tab for current per-tier prices.

### Known limitations

- Grubhub only operates in the US; requests go through a US proxy.
- `/menu`'s upstream payload can be large for restaurants with big menus — this Actor flattens it to the useful fields (name, description, price, availability per item) rather than returning the raw blob.
- This is an unofficial wrapper around Grubhub's own public app API, not an official partnership or API.

# Actor input Schema

## Actor input object example

```json
{}
```

# Actor output Schema

## `api` (type: `string`):

This Actor doesn't write to a dataset — every response is returned directly over HTTP by its Standby web server. See the README / web server OpenAPI schema (webServerSchema) for the full endpoint list and response shapes (GET /search).

# 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("romy/grubhub-all-in-one-api").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("romy/grubhub-all-in-one-api").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 romy/grubhub-all-in-one-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,romy/grubhub-all-in-one-api"
        }
    }
}
```

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/rPuKjFO1wyVY6Dg10/builds/S8snD1VqS2H6XtD5L/openapi.json
