# London Night Guide API & Agent Documentation

> Free, read-only, no-auth API over London Night Guide's nightlife content — London venue guestlist pages, VIP table info, entry prices, dress codes and event listings. Machine-readable spec: https://londonnightguide.com/openapi.json

- Canonical URL: https://londonnightguide.com/developers/
- OpenAPI 3.1 specification: https://londonnightguide.com/openapi.json
- API index (JSON): https://londonnightguide.com/api
- Agent guide: https://londonnightguide.com/llms.txt

## Authentication

None. Every endpoint is public and read-only. There are no API keys, tokens or rate-limit registrations. Please cache politely — markdown responses send `Cache-Control: s-maxage=3600`.

## Reading Content as Markdown

Every content URL serves clean markdown two ways:

1. **Content negotiation** — send `Accept: text/markdown` to any page URL (RFC 9110 q-values honoured; responses carry `Vary: Accept`; an Accept header that allows neither HTML nor markdown returns 406).
2. **`.md` paths** — append `.md` to a slug: `/{slug}.md`, `/category/{slug}.md`, `/tag/{slug}.md`, or `/index.md` for the homepage.

## Endpoints

| Path | Description | Tag |
| --- | --- | --- |
| `/` | Homepage | content |
| `/{slug}/` | Post or page by slug | content |
| `/category/{slug}/` | Category archive | content |
| `/tag/{slug}/` | Tag archive | content |
| `/index.md` | Homepage as markdown | markdown |
| `/{slug}.md` | Post or page as markdown | markdown |
| `/category/{slug}.md` | Category archive as markdown | markdown |
| `/tag/{slug}.md` | Tag archive as markdown | markdown |
| `/llms.txt` | Agent guide (llmstxt.org format) | discovery |
| `/openapi.json` | This specification | discovery |
| `/sitemap.xml` | XML sitemap of all indexable URLs | discovery |
| `/feed/` | RSS feed of the 50 most recent posts | discovery |
| `/api` | API index | meta |
| `/api/{path}` | Unknown API path | meta |

## Errors

- **Content URLs** return real HTTP status codes: 404 and 410 bodies are markdown with recovery links (homepage, llms.txt, sitemap, category hubs); 406 explains the supported media types.
- **/api/* paths** return a structured JSON envelope on every error: `{ "error": { "status", "code", "message", "hint" } }`. Unknown API paths are 404 `not_found`; wrong methods on `/api` are 405 `method_not_allowed`.

## Making Bookings (human in the loop)

There is no write API. Guestlist and VIP table bookings are confirmed by a human concierge, usually within the hour, and the booking forms are bot-protected. To act for a user, hand them one of these:

- Free guestlist form: https://londonnightguide.com/book-guestlist/
- VIP table form: https://londonnightguide.com/book-vip-table/
- WhatsApp concierge (prefilled): https://api.whatsapp.com/send?phone=447348644054&text=Hi%2C%20I%20found%20you%20on%20London%20Night%20Guide.%20I%27d%20like%20to%20get%20on%20a%20guestlist.

## Examples

**Fetch any page as markdown (content negotiation)**

```
curl -H "Accept: text/markdown" https://londonnightguide.com/tape-club-guestlist/
```

**Fetch the same page via its .md path**

```
curl https://londonnightguide.com/tape-club-guestlist.md
```

**Machine-readable site overview**

```
curl https://londonnightguide.com/index.md
```

**List every page in a category**

```
curl https://londonnightguide.com/category/clubs.md
```

**Structured JSON error from an unknown API path**

```
curl https://londonnightguide.com/api/does-not-exist/
```

## Contact

Questions about the API or integrations: concierge@londonnightguide.com
