Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Cernion Energy Tools Municipality API
version: 0.99.22
description: 'MicroService Agent System for Energy Markets - REST API with AI integration.
CERNION_TOKEN: request at https://cernion.de/ or by email: dev@stromdao.com.
For the public instance at https://api.cernion.de/, create your token at https://cernion.de/cet-token/.'
servers:
- url: https://api.cernion.de
description: API Server
tags:
- name: Municipality
paths:
/api/municipality/lookup:
get:
summary: Look up a German municipality by name, PLZ, or AGS
tags:
- Municipality
operationId: municipality_lookup
parameters:
- name: municipality
in: query
required: false
schema:
type: string
example: Hockenheim
description: Municipality name or 5-digit PLZ.
- name: ags
in: query
required: false
schema:
type: string
example: 08226032
description: Amtlicher Gemeindeschlüssel, takes priority over municipality.
- $ref: '#/components/parameters/TokenQuery'
responses:
'200':
description: Municipality profile (found:false if unresolved)
content:
application/json:
schema:
type: object
properties:
found:
type: boolean
name:
type:
- string
- 'null'
ags:
type:
- string
- 'null'
state:
type:
- string
- 'null'
postalCode:
type:
- string
- 'null'
population:
type:
- integer
- 'null'
areaSqKm:
type:
- number
- 'null'
sourceStatus:
type: string
description: Resolves a municipality profile (AGS, name, Bundesland, population, PLZ) from a municipality name, a 5-digit PLZ, or an Amtlicher Gemeindeschlüssel (AGS). Offline lookup against Destatis Gemeindegrenzen 2022 (GV100, 10,990 municipalities) — no external API call. found:true with population:null means the name/PLZ resolved but there was no Destatis GV100 match (name+state known only).
/api/municipality/reverse-geocode:
get:
summary: Resolve a German municipality (AGS) from WGS84 coordinates
tags:
- Municipality
operationId: municipality_reverseGeocode
parameters:
- name: lat
in: query
required: true
schema:
type: number
example: 49.3183
- name: lon
in: query
required: true
schema:
type: number
example: 8.5495
- $ref: '#/components/parameters/TokenQuery'
responses:
'200':
description: Municipality profile resolved from coordinates (found:false if unresolved)
content:
application/json:
schema:
type: object
properties:
found:
type: boolean
name:
type:
- string
- 'null'
ags:
type:
- string
- 'null'
state:
type:
- string
- 'null'
postalCode:
type:
- string
- 'null'
population:
type:
- integer
- 'null'
areaSqKm:
type:
- number
- 'null'
sourceStatus:
type: string
description: Reverse-geocodes a lat/lon pair via OpenStreetMap Nominatim to a German Amtlicher Gemeindeschlüssel (AGS), then joins it against the same Destatis GV100 profile as GET /municipality/lookup. found:false means the coordinates do not fall inside a German municipality boundary known to Nominatim (e.g. outside Germany, or open water). Live external call — not cached; the public Nominatim instance is rate-limited to ~1 request/second, set NOMINATIM_ENDPOINT for a private mirror under sustained load.
components:
parameters:
TokenQuery:
name: token
in: query
required: false
schema:
type: string
description: Optional Cernion MCP token as URL query parameter. If provided, it overrides CERNION_TOKEN for this request. Prefer Authorization Bearer header in production to reduce token exposure in URLs/logs.
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-API-Key
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: 'Optional Cernion MCP token. If not provided, falls back to CERNION_TOKEN from environment. Request token at https://cernion.de/ or by email: dev@stromdao.com.'