canonical: https://jentic.com/apis/nypl.org/nypl

# Nypl What's On The Menu API

Jentic publishes the only available OpenAPI specification for What's On The Menu API, keeping it validated and agent-ready. The New York Public Library's What's On The Menu API exposes a digitised archive of historical restaurant menus dating from the 1850s onward, including menus, the pages they appear on, and the individual dishes they list. The 9-endpoint surface supports listing and retrieving menus, traversing menu pages and dishes, searching menus, and looking up dishes and the menus that contain them. It is well suited to culinary research projects, food-history apps, dataset builders, and AI agents answering questions about historical dining.

## For AI agents

Search and traverse the New York Public Library's historical menu archive - menus, pages, and dishes from the 1850s onward - using a query-string API key.

## Scope

Does not handle modern restaurant data, ingredient nutrition, or recipes - use for the NYPL historical menu archive only.

## Capabilities

- Search the historical menu collection by free-text query
- Retrieve a menu by ID with its associated pages and metadata
- Traverse the pages of a menu to read items as they appeared on the original document
- List the dishes that appear on a specific menu
- Look up a dish by ID and find every menu it appears on
- Browse the global dish list to build derived datasets and research notes

## Use cases

### Food History Research App

Build a research tool that lets historians and food writers search the NYPL menu archive and cite specific menus and dishes in their work. The combination of the search endpoint, individual menu retrieval, and dish-to-menus traversal supports both broad discovery and citation-grade lookup. The API is small enough that a working integration takes a few hours.

Example prompt: Call GET `/menus/search` with the query 'oyster', then GET `/menus/{id}` for each top result and return the menu titles and dates.

### Culinary Dataset Builder

Compile a dataset of dishes and prices over time by walking the dishes endpoint and joining each dish to the menus it appears on. Researchers and ML teams can use this to study price evolution, ingredient trends, and regional cuisine over a 150-year period. The API's stable IDs make incremental dataset builds straightforward.

Example prompt: Page through GET /dishes, and for each dish call GET `/dishes/{id}/menus` to record the menus and dates it appeared on.

### Agent-Driven Menu Q&A

Let an AI agent answer natural-language questions like 'what cocktails appeared on Manhattan menus around 1920?' by searching menus, pulling pages, and inspecting dish lists. Through Jentic, the agent searches by intent and gets only the operations it needs, with the API token held in the platform's vault rather than in the agent's context.

Example prompt: Search Jentic for 'search NYPL historical menus', load the operation, and return menus from 1915-1925 that mention 'cocktail'.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/menus` | List menus in the archive |
| GET | `/menus/search` | Search menus by free-text query |
| GET | `/menus/{id}` | Retrieve a menu by ID |
| GET | `/menus/{id}/pages` | Get the pages of a menu |
| GET | `/menus/{id}/dishes` | List dishes on a menu |
| GET | `/dishes/{id}` | Retrieve a dish by ID |
| GET | `/dishes/{id}/menus` | List menus containing a dish |

## Key resources

- **Menus** — Historical menus with metadata, pages, and dish lists.
- **Menu Pages** — Individual pages of a menu, showing items as they originally appeared.
- **Dishes** — Individual dish records and the menus they appear on.
- **Search** — Free-text search across the menu collection.

## Why Jentic

- **Setup:** Wiring the What's On The Menu API by hand means passing your token on the query string against api.menus.nypl.org and handling the request plumbing yourself. Through Jentic you install once, import the NYPL menu API from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** The NYPL menu API is read-only, so scope the agent to the operations it needs, such as searching menus or listing the dishes on a menu, and leave the rest out. You choose the operations it may call, so it only reaches the endpoints you list.
- **Credential handling:** Your NYPL menu API token is stored once, encrypted, by your own Jentic One instance and injected as the query token at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'search NYPL historical menus' or 'list dishes on a menu', and Jentic returns the matching NYPL operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Edamam Food and Recipe API** — Pair NYPL historical dish names with modern nutrition and recipe data for hybrid food projects.
- **Spoonacular API** — Recipe search and ingredient analysis to enrich historical dish records with modern equivalents.
- **OpenAI API** — Pair with NYPL data for natural-language summarisation and translation of historical menu text.

## FAQ

### Why is there no official OpenAPI spec for What's On The Menu API?

The New York Public Library does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call What's On The Menu API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the What's On The Menu API use?

The API uses an API token passed as a query parameter named 'token' on each request - there is no header-based auth. Through Jentic, the token is stored encrypted in the vault and added to the request URL at execution time so the agent never holds it directly.

### Can I search the menu collection by keyword?

Yes - GET `/menus/search` accepts a free-text query and returns matching menus. For dish-level traversal, retrieve a menu's dishes via GET `/menus/{id}/dishes`, or look up dishes directly and follow GET `/dishes/{id}/menus` to find every menu containing a given dish.

### What are the rate limits for the API?

The OpenAPI spec does not embed explicit limits. The endpoint runs on a public library service; treat it as a low-throughput resource, batch reads, and back off on any HTTP 429 or 5xx response.

### How do I retrieve menus through Jentic?

Run pip install jentic, then search for 'search NYPL historical menus'. Jentic returns GET `/menus/search` with its input schema; supply the query and execute. Run it through Jentic One, the self-hosted execution layer, to get an agent API key.

### How far back does the archive go?

Menus in the collection date from the 1850s through the 21st century, with the bulk of items concentrated in the late 19th and early 20th century. Each menu record carries a date and venue when known.

### Can I limit what my agent is allowed to do with the NYPL Menu Archive API?

Yes. Because the What's On The Menu API is read-only, you run Jentic One yourself and list only the operations your agent may call, such as searching menus with GET `/menus/search` or listing the dishes on a menu with GET `/menus/{id}/dishes.` Any operations you leave out, like browsing the global dish list or traversing a menu's pages, stay off limits to the agent. Your own rules decide which endpoints and the query token it can use, and the token is injected at execution time rather than exposed to the agent.
