# Castles.wiki

> Castles, forts and palaces of the world, sourced from Wikipedia.

This site is agent-friendly: the full dataset is queryable by any attribute via a public JSON API (no API key) and an MCP server. Data is sourced from Wikipedia (CC BY-SA).

## Data
- 7872 castles across 52 countries.

## API (no key, rate-limited per IP)
- Search castles by any attribute: `GET http://castles.tello.app/api/v1/castles?<filters>`
- A single castle: `GET http://castles.tello.app/api/v1/castles/{slug}`
- Countries with counts: `GET http://castles.tello.app/api/v1/countries`
- Machine-readable filter schema (every queryable attribute): `GET http://castles.tello.app/api/v1/schema`
- OpenAPI 3 spec: `GET http://castles.tello.app/openapi.json`

## MCP server
- Endpoint: `http://castles.tello.app/mcp` (Streamable HTTP).
- Tools: `search`, `get`, `list_countries`, `describe_filters`.

## Queryable attributes
- `search` — Name search
- `country` — Country
- `type` — Type
- `architectural_style` — Architectural style
- `condition` — Condition
- `heritage_designation` — Heritage designation
- `materials` — Materials
- `owner` — Owner
- `open_to_public` — Open to public
- `century` — Century built (range: `century_min`, `century_max`)
- `year` — Year built (range: `year_min`, `year_max`)
- `has_image` — Has photo (1 / true)
- `has_coordinates` — Has coordinates (1 / true)
- `has_year` — Has a known build year (1 / true)
- `sort` — one of: name, year_built, century_built, type

## Examples
- Find castles in Norway → `GET http://castles.tello.app/api/v1/castles?country=norway`
- castles with Century built over 100 → `GET http://castles.tello.app/api/v1/castles?century_min=100`

## Per-entry Markdown
Append `.md` to any castle URL (e.g. `http://castles.tello.app/castle/<slug>.md`), or send `Accept: text/markdown`, to get clean Markdown instead of HTML.
