# heytea.dev

> Location discovery for public HeyTea locations, with live wait time, stream, and history for tracked locations.

## Endpoints

- `GET https://api.heytea.dev/locations` - Public locations with catalog metadata and tracking state.
- `GET https://api.heytea.dev/locations/{slug}/status` - Current store state, wait time, notices, observed time, and staleAfter freshness.
- `GET https://api.heytea.dev/locations/{slug}/wait-time` - Current pickup, delivery, cups, and orders values.
- `GET https://api.heytea.dev/locations/{slug}/notice` - Current store notices.
- `GET https://api.heytea.dev/locations/{slug}/closing-notice` - Current closing notices.
- `GET https://api.heytea.dev/locations/{slug}/history?range=today` - Interpolated one-minute current-day points plus a seven-day minute-of-day comparison.
- `GET https://api.heytea.dev/locations/{slug}/stream` - Server-sent `status.updated` events.
- `GET https://api.heytea.dev/openapi.json` - OpenAPI schema.
- `POST https://mcp.heytea.dev/mcp` - JSON-RPC 2.0 MCP endpoint.

## Authentication

No authentication is required. The API exposes public slugs, not upstream shop IDs. There are no menu endpoints, no `/v1` prefix, and no default-location aliases.

## Freshness

Waits are polled continuously by provider region with a configured per-region request cap. Notices and catalog metadata refresh more slowly. Treat live wait data as fresh until `staleAfter`. HTTP `max-age` is based on `max(0, staleAfter - now)`.

## Examples

```bash
curl https://api.heytea.dev/locations
curl https://api.heytea.dev/locations/downtown-metreon/status
curl 'https://api.heytea.dev/locations/downtown-metreon/history?range=today'
curl -N https://api.heytea.dev/locations/downtown-metreon/stream
```

```bash
curl https://mcp.heytea.dev/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_status","arguments":{"slug":"downtown-metreon"}}}'
```
