// PUBLIC_API
Free smart city data API
Live smart city rankings, evidence-linked assessment scores and data-coverage maps for 386 cities across 71 nations — free, no API key, CC BY 4.0. Built for developers, data journalists and AI agents.
Base URL https://citymirror.io/api · JSON · CORS enabled · attribution: link to citymirror.io
/api/assessments?framework=smart-citiesSmart city rankings
The full ranking: every assessed city with its smart score, evidence coverage and criteria counts, plus the framework's axes and categories. Frameworks: smart-cities (DC20) and smart-cities-iso (ISO-aligned).
curl "https://citymirror.io/api/assessments?framework=smart-cities"{ "frameworkId": "smart-cities", "count": 386, "ranking": [ { "scopeId": "singapore", "name": "Singapore", "smartnessPct": 98.3, "evidencePct": 100, "present": 79, "total": 82 }, … ] }/api/assessments/scope?scopeId={id}&framework=smart-citiesPer-city assessment
One city's full assessment: score, and every criterion with its status (present / partial / absent), the written finding, confidence and source URLs. scopeId examples: uk.manchester, singapore, new-york-city.
curl "https://citymirror.io/api/assessments/scope?scopeId=uk.manchester&framework=smart-cities"{ "name": "Manchester", "score": { "smartnessPct": 77.6, "present": 59, "total": 82 }, "categories": [ { "name": "Open Data by Default", "criteria": [ { "name": "Official open data portal", "status": "present", "finding": "…", "sources": [{ "url": "…" }] } ] } ] }/api/coverage/query?pattern={slug}Data coverage for a scope
What data a city/region/country publishes across transport, energy, water, environment, connectivity and housing — and what's missing, stale or siloed. The pattern is a colon-separated slug — nation:place:domain:dataset — where any tier can be * (trailing wildcards optional): uk, uk:manchester, uk:manchester:environment, *:*:transport.
curl "https://citymirror.io/api/coverage/query?pattern=uk:manchester"{ "pattern": "uk:manchester", "matched": 58, "scopes": 1, "type": "FeatureCollection", "features": [ … ] }/api/coverage/recentRecently updated coverage
The most recently re-grounded coverage entries — useful for change feeds.
curl "https://citymirror.io/api/coverage/recent"/api/search?q={query}Natural-language search
Interprets a plain-English query (place, country, topic) and returns matching assessed cities with their smart scores plus a coverage summary for the interpreted slug — built for agents. Use /api/interpret for the intent parse alone.
curl "https://citymirror.io/api/search?q=manchester%20air%20quality"{ "q": "manchester air quality", "slug": "uk:manchester:environment", "interpreted_intent": { "place": "manchester", "country": "uk", "topic": "environment" }, "results": { "cities": [ { "scopeId": "uk.manchester", "name": "Manchester", "smartnessPct": 77.7, "assessment": "/api/assessments/scope?…" } ], "coverage": { "pattern": "uk:manchester:environment", "matched": 12, "query": "/api/coverage/query?…" } } }/api/resources?scopeId={id}City data repositories & news
Official data portals, repositories and recent local/national news for a city.
curl "https://citymirror.io/api/resources?scopeId=uk.manchester"/api/compare?scopeIds={a},{b}&framework=smart-cities-isoCompare cities
Side-by-side comparison of 2–5 cities: every framework criterion with each city's evidence status. The raw-JSON counterpart of the explore app's Compare tool.
curl "https://citymirror.io/api/compare?scopeIds=uk.manchester,uk.leeds&framework=smart-cities-iso"{ "cities": [ { "scopeId": "uk.manchester", "name": "Manchester", "score": { "smartnessPct": 77.7 } }, … ], "criteria": [ { "criterionId": "open-data-portal", "name": "Official open data portal", "category": "Open Data & Transparency", "statuses": { "uk.manchester": "present", "uk.leeds": "present" } }, … ] }/api/gaps?criterion={id}&status=absent,partial&country={CC}Gap search
Every city where a criterion is verifiably missing or incomplete — an evidenced prospect list. Optional 2-letter ?country= filter; ?status= defaults to absent,partial.
curl "https://citymirror.io/api/gaps?criterion=open-data-portal&status=absent,partial&framework=smart-cities-iso"{ "criterionId": "open-data-portal", "count": 80, "results": [ { "scopeId": "bristol", "name": "Bristol", "countryCode": "GB", "smartnessPct": 71.8, "status": "partial" }, … ] }/api/countries?framework=smart-cities-isoCountry rollups
Per-country aggregates: city count, average smart score and the ranked city list for every covered country.
curl "https://citymirror.io/api/countries?framework=smart-cities-iso"{ "count": 71, "countries": [ { "countryCode": "GB", "cityCount": 75, "avgSmartnessPct": 67, "cities": [ … ] }, … ] }Usage, licence & fair use
- Data is licensed CC BY 4.0: free for articles, dashboards, research and products — credit "Citymirror" with a link to citymirror.io.
- No key needed. Please cache responses and keep request rates reasonable; heavy or commercial-scale users should get in touch via datacorridor.io.
- Methodology: scores come from the DC20 smart city framework — every finding carries its source URL, so results are independently checkable.
- Prefer tool calls over raw HTTP? Connect Claude, Cursor or any MCP client via the MCP server — same data, no API key.
- AI agents: machine-readable site overview at /llms.txt.