API & MCP
Everything a person can do on Cartograph Country Facts (capital, population, area, languages, neighbours), a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://cartographcountryfacts.usefulweb.site/api/v1/calculate– run Cartograph Country Facts (capital, population, area, languages, neighbours)GET https://cartographcountryfacts.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Cartograph Country Facts (capital, population, area, languages, neighbours)
Shows a fact card for one of 197 countries — capital, population with its estimate year, area, population density, rank in the world, official languages, land neighbours, the flag and its description — with a map of the country and its neighbours, and optionally compares it with a second country. Facts come from the final edition of The World Factbook (public domain) and Wikidata. It is the facts engine of the Cartograph app.
| Field | Type | Default | Description |
|---|---|---|---|
country | text | "France" | Country (English name or ISO code) |
compare | text | — | Compare with (optional) |
Example request
France
curl -X POST https://cartographcountryfacts.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"country":"France"}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://cartographcountryfacts.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
cartograph_country_facts - Local stdio connector:
node src/mcp-stdio.ts --tool=cartograph-country-facts
{
"mcpServers": {
"cartograph-country-facts": { "type": "http", "url": "https://cartographcountryfacts.usefulweb.site/mcp" }
}
}