Place search
METRON Places
Autocomplete, place lookup, reverse lookup, nearby and corridor search on OpenStreetMap data. The IDs match the places in the METRON Maps tiles.
Pricing
Place search (autocomplete session)
Place lookup
Nearby search (page)
Route corridor (page)
Reverse lookup
Charging search Basis
Charging search Pro (live status)
Charging search Enterprise
Charging station details Basis
Charging station details Pro (live status)
Charging station details Enterprise
Departures at a stop (timetable)
Departures with real-time data (Enterprise, once real-time data is connected)
Keys and access
On the server, use an sk_ key in the Authorization header. In the browser, use a pk_ key bound to allowed sites (origins); pass it as the key parameter. Access to METRON Places is enabled per account (scope metron:places).
You are billed on success only. Responses with status 4xx or 5xx cost nothing, and neither do corrections. A redirect (301) to a new ID is free as well; if you follow it, the lookup under the new ID is billed.
Autocomplete sessions
Typing produces many requests. A session groups them so they are not billed one by one. You choose the session identifier yourself.
- The session parameter is required for autocomplete: 16 to 64 characters from A–Z, a–z, 0–9, _ and -. Without a valid session the API answers 400.
- A session is billed once (120 credits), with its first successful request. Further requests of the same session are free.
- The session ends with the selection, meaning a place lookup with the same session (that lookup is then free), after 2 minutes without a request, or after 50 requests.
- A place lookup without a running session costs 120 credits. Generate a new identifier for every new search, for example with crypto.randomUUID().
- The first autocomplete request after a session has ended opens a new session and is billed 120 credits, even if you reuse the same identifier. Use a new identifier for every new search.
Browser example
const session = crypto.randomUUID(); // 36 characters, valid
async function suggest(q) {
const url = new URL("https://api.centra.dbpg.io/v1/metron/places/autocomplete");
url.search = new URLSearchParams({ q, session, key: "pk_your_public_key", lang: "de" });
const res = await fetch(url);
if (!res.ok) throw new Error((await res.json()).error);
return (await res.json()).features;
}
// On selection: the lookup with the same session is free and ends it.
async function select(id) {
const url = new URL(`https://api.centra.dbpg.io/v1/metron/places/${id}`);
url.search = new URLSearchParams({ session, key: "pk_your_public_key" });
return (await fetch(url)).json();
}Place IDs and map features
Every place carries an ID with a source prefix, such as osm:n123456. The letter after the colon is the OpenStreetMap object type: n for node, w for way, r for relation. IDs stay valid across the monthly updates as long as the object exists. If a place was merged into another one, the lookup answers 301 with the new path in the Location header. For removed places, 404 with the code removed is reserved; it is first used with the monthly updates.
Places in the METRON Maps tiles carry the same ID as their feature ID: type times 2^44 plus OSM ID (type 1 node, 2 way, 3 relation). The node osm:n123456 therefore has feature ID 17592186167872 (2^44 + 123456), the way osm:w123456 feature ID 35184372212288. The place lookup accepts both forms, so a click on the map leads straight to the lookup. It answers other numbers with 400 (bad_request).
For a redirect (301) the Location header contains only the new path. With a pk_ key, re-append key (and session, if any) to the URL yourself.
Click on a map feature
map.on("click", "pois", async (e) => {
const featureId = e.features[0].id; // e.g. 17592186167872 = 2^44 + 123456 = osm:n123456
const res = await fetch(
`https://api.centra.dbpg.io/v1/metron/places/${featureId}?key=pk_your_public_key`
);
if (res.status === 404) return; // no details for this place (not_found), not billed
const { feature, details } = await res.json();
});Endpoints
/v1/metron/places/autocompleteSuggests places and addresses for a search term. q and session are required. The session rule is described above. Abbreviations, short and alternative names, operators and brands are recognised (LMU, Hbf, KaDeWe, BK). For a street with house number the address itself comes before the businesses in the building. A suggestion with properties.type "address" is an address; if its id is null it was built from the address parts of a business at that address and there is no place lookup for it. Its name is then "street house number", and address holds street, housenumber, postcode, city and further parts. Hits with a known operator or brand carry properties.operator and properties.brand.
Parameter
qstringYesSearch term, at most 200 characters.
sessionstringYesSession identifier, 16 to 64 characters from A–Z, a–z, 0–9, _ and -. Required.
langstringOptionalLanguage of category labels and place names, for example de or en.
lat, lonfloatOptionalLatitude, −90 to 90. For autocomplete, together with lon as a location bias.
bboxstringOptionalSearch window as minLon,minLat,maxLon,maxLat.
countrystringOptionalCountries as ISO codes, comma-separated, for example DE,AT.
limitinteger 1–10OptionalDefault:5Number of hits.
keystringOptionalpk_ keys only: the public key as a parameter.
Request
curl -G "https://api.centra.dbpg.io/v1/metron/places/autocomplete" \
-H "Authorization: Bearer sk_your_api_key" \
--data-urlencode "q=Brandenburger" \
-d "session=7c9e6679-7425-40de-944b-e07fc1f90ae7" \
-d "lang=de"Response
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": { "type": "Point", "coordinates": [13.3777, 52.5163] },
"properties": {
"id": "osm:n123456",
"name": "Brandenburger Tor",
"category": "attraction",
"category_label": "Attraction",
"address": { "street": "Pariser Platz", "city": "Berlin", "countrycode": "DE" },
"source": "osm",
"license": "ODbL-1.0"
}
}
],
"attribution": "© OpenStreetMap-Mitwirkende"
}/v1/metron/places/{id}Returns the basic data for an ID plus details such as opening hours, website, phone, email, wheelchair access, brand, operator, Wikidata IDs (wikidata, operator_wikidata, brand_wikidata), short and official names (short_name, official_name) and, for stops, the lines. The ID is osm:n123 or the feature ID from the map. With a running session the lookup is free. Details exist mainly for shops, restaurants, sights and stops. For streets and squares, cities, towns and districts, counties, states and countries the lookup returns name, address parts and centre point, plus their extent as bbox [west, south, east, north] where known. For addresses with a house number it answers 404 (not_found); their data is complete in the search result. A 404 is not billed.
Parameter
idstring (path)YesPlace ID (osm:n123) or feature ID from the map.
sessionstringOptionalSession identifier, 16 to 64 characters from A–Z, a–z, 0–9, _ and -. Required.
langstringOptionalLanguage of category labels and place names, for example de or en.
keystringOptionalpk_ keys only: the public key as a parameter.
Request
curl "https://api.centra.dbpg.io/v1/metron/places/osm:n123456?session=7c9e6679-7425-40de-944b-e07fc1f90ae7" \
-H "Authorization: Bearer sk_your_api_key"Response
{
"feature": {
"type": "Feature",
"geometry": { "type": "Point", "coordinates": [13.3777, 52.5163] },
"properties": {
"id": "osm:n123456",
"name": "Brandenburger Tor",
"category": "attraction",
"category_label": "Attraction",
"address": { "street": "Pariser Platz", "city": "Berlin", "countrycode": "DE" },
"source": "osm",
"license": "ODbL-1.0"
}
},
"details": {
"opening_hours": "24/7",
"website": "https://example.org",
"phone": null,
"email": null,
"wheelchair": "yes",
"brand": null,
"lines": []
},
"attribution": "© OpenStreetMap-Mitwirkende"
}/v1/metron/places/reverseReturns the nearest place or address for a coordinate.
Parameter
latfloatYesLatitude, −90 to 90. For autocomplete, together with lon as a location bias.
lonfloatYesLongitude, −180 to 180.
radius_mfloat 1–1000OptionalDefault:100Radius in metres.
limitinteger 1–5OptionalDefault:1Number of hits.
langstringOptionalLanguage of category labels and place names, for example de or en.
keystringOptionalpk_ keys only: the public key as a parameter.
Request
curl -G "https://api.centra.dbpg.io/v1/metron/places/reverse" \
-H "Authorization: Bearer sk_your_api_key" \
-d "lat=52.5163" -d "lon=13.3777"Response
{
"type": "FeatureCollection",
"features": [ ... ],
"attribution": "© OpenStreetMap-Mitwirkende"
}/v1/metron/places/departuresNext departures at a stop or station from the timetable: line, mode, destination, platform and operator. Germany, all modes.
Parameter
stopstringYesID of a place (osm:n123 or map ID), usually a stop or station.
timestring (RFC 3339)OptionalStart of the time window, e.g. 2026-10-30T08:00:00+01:00. Default: now.
durationinteger 1–720OptionalDefault:60Length of the time window in minutes.
limitinteger 1–50OptionalDefault:10Number of hits.
modesstringOptionalComma-separated selection: train, suburban, subway, tram, bus, coach, ferry, cable, monorail, taxi, other.
realtimebooleanOptionalDefault:falsetrue requests real-time data (Enterprise). Not available yet, see Departures.
langstringOptionalLanguage of category labels and place names, for example de or en.
keystringOptionalpk_ keys only: the public key as a parameter.
Request
curl -G "https://api.centra.dbpg.io/v1/metron/places/departures" \
-H "Authorization: Bearer sk_your_api_key" \
-d "stop=osm:n2470201868" -d "limit=5"Response
{
"place": { "id": "osm:n2470201868", "name": "München Hauptbahnhof", "category": "station" },
"stations": [ { "name": "München Hbf", "gtfs_id": "de:09162:6" } ],
"departures": [
{ "time": "2026-10-30T08:01:00+01:00", "line": "S1", "mode": "suburban",
"headsign": "Flughafen München", "platform": null, "agency": "DB Regio AG S-Bahn München" },
{ "time": "2026-10-30T08:02:00+01:00", "line": "RE72", "mode": "train",
"headsign": "Memmingen, Bahnhof ZOB", "platform": "26", "agency": "Arverio Bayern GmbH" }
],
"realtime": { "requested": false, "available": false },
"schedule": { "stand": "2026-10-24", "valid_from": "2026-10-10", "valid_until": "2026-12-12", "stale": false },
"timezone": "Europe/Berlin",
"attribution": "DELFI e.V.",
"license": "CC-BY-4.0"
}/v1/metron/places/nearbyPlaces around a coordinate, sorted by distance, up to 50 hits per page. Each page is billed separately; fetch the next page with next_cursor. With operator or brand you get all sites of an operator or brand, for example operator=LMU or brand=Q125054.
Parameter
latfloatYesLatitude, −90 to 90. For autocomplete, together with lon as a location bias.
lonfloatYesLongitude, −180 to 180.
radius_mfloat 1–50000OptionalDefault:1000Radius in metres.
qstringOptionalSearch term, at most 200 characters.
categorystringOptionalCategory key; an unknown key gives 400.
operatorstringOptionalOnly places of this operator: Wikidata ID (Q55044) or name (LMU, Stadtwerke München). A name matches the operator from its start and every Wikidata ID known for that name.
brandstringOptionalOnly places of this brand: Wikidata ID (Q125054) or name (Aldi, Burger King), as for operator.
sortstringOptionalDefault:distancedistance (default) or relevance; relevance ranks by name match with q.
cursorstringOptionalnext_cursor of the previous page.
limitinteger 1–50OptionalDefault:20Number of hits.
langstringOptionalLanguage of category labels and place names, for example de or en.
keystringOptionalpk_ keys only: the public key as a parameter.
Request
curl -G "https://api.centra.dbpg.io/v1/metron/places/nearby" \
-H "Authorization: Bearer sk_your_api_key" \
-d "lat=52.5163" -d "lon=13.3777" -d "radius_m=500" -d "limit=50"Response
{
"type": "FeatureCollection",
"features": [
{ "type": "Feature", "geometry": { ... },
"properties": { "id": "osm:n123456", "distance_m": 120, ... } }
],
"next_cursor": "…",
"attribution": "© OpenStreetMap-Mitwirkende"
}/v1/metron/places/corridorPlaces along a line, such as a route, within width_m metres. The line is a GeoJSON LineString or an encoded polyline. Each page is billed separately; fetch the next page with next_cursor and an unchanged body.
Parameter
lineobjectYesGeoJSON LineString with [lon, lat] or {"polyline": "…", "precision": 5 | 6}.
width_mfloat 1–5000YesCorridor width in metres, 1 to 5,000.
qstringOptionalSearch term, at most 200 characters.
categorystringOptionalCategory key; an unknown key gives 400.
sortstringOptionalDefault:distancedistance (default) or relevance; relevance ranks by name match with q.
cursorstringOptionalnext_cursor of the previous page.
limitinteger 1–50OptionalDefault:20Number of hits.
langstringOptionalLanguage of category labels and place names, for example de or en.
Request
curl -X POST "https://api.centra.dbpg.io/v1/metron/places/corridor" \
-H "Authorization: Bearer sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"line": { "type": "LineString", "coordinates": [[13.40, 52.52], [13.74, 51.05]] },
"width_m": 1000,
"category": "fuel",
"limit": 50
}'Response
{
"type": "FeatureCollection",
"features": [ ... ],
"next_cursor": null,
"attribution": "© OpenStreetMap-Mitwirkende"
}/v1/metron/places/correctionsReports a wrong or missing place, or inappropriate content in a place's data. The report is free.
Parameter
kind"wrong" | "missing" | "inappropriate"Yeswrong (place is wrong), missing (place is missing) or inappropriate (illegal or offensive content).
idstring | integerAlternativeID of the place concerned (osm:n123 or feature ID). Either id or point.
point[lat, lon]Alternative[lat, lon] for a missing place. Either id or point.
textstringYesFree text, at most 2,000 characters.
donation_consentbooleanOptionaltrue if the report may be passed on to open data projects such as OpenStreetMap. Required for wrong and missing; no effect for inappropriate.
Request
curl -X POST "https://api.centra.dbpg.io/v1/metron/places/corrections" \
-H "Authorization: Bearer sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"kind": "wrong",
"id": "osm:n123456",
"text": "Opening hours are outdated.",
"donation_consent": false
}'Response
{ "id": "0b7f6a8e-5d3c-4c0a-9a55-3f1c2f7d1e11" }const res = await fetch("https://api.centra.dbpg.io/v1/metron/places/nearby?lat=52.5163&lon=13.3777&limit=50", {
headers: { Authorization: "Bearer sk_your_api_key" },
});
const { features, next_cursor } = await res.json();Charging stations
Public charging stations in Germany with operator, address, plug types and charging power, optionally with the current status of every charge point. Search works around a point and along a line, for example for charging stops on a route. You choose the tier per request with tier:
- Basis: location, operator, address, plug types, highest power, number of charge points, open around the clock.
- Pro: also the current status of every charge point (available, occupied, out of order) with the data time; the available filter is only possible here and in Enterprise.
- Enterprise: also an availability summary per site (available, occupied, out of order, share available, fast charging) and the age of each status.
The status is updated every five minutes. If it is older than 20 minutes, Pro and Enterprise still return the sites, with live: false and without status. Charge points from the charging register have no live status (no_live_status).
Every site carries license and attribution of its source. Show the attribution with every site you display.
/v1/metron/places/charging/nearbyCharging sites within a radius, nearest first. Billed per page by tier.
Parameter
latfloatYesLatitude, −90 to 90. For autocomplete, together with lon as a location bias.
lonfloatYesLongitude, −180 to 180.
radius_mfloat 1–50000OptionalDefault:5000Radius in metres.
tier"basis" | "pro" | "enterprise"OptionalDefault:basisTier of the answer: basis, pro (with live status) or enterprise (with availability summary). Sets the price.
min_kwfloatOptionalOnly sites with at least one charge point of this power (kW).
plugstringOptionalOnly sites with this plug type, e.g. IEC_62196_T2_COMBO (CCS), IEC_62196_T2, CHADEMO.
availablebooleanOptionalDefault:falseOnly sites with at least one matching free charge point. Only with tier=pro or enterprise.
limitinteger 1–50OptionalDefault:20Number of hits.
keystringOptionalpk_ keys only: the public key as a parameter.
Request
curl -G "https://api.centra.dbpg.io/v1/metron/places/charging/nearby" \
-H "Authorization: Bearer sk_your_api_key" \
-d "lat=48.1374" -d "lon=11.5755" -d "radius_m=3000" \
-d "tier=pro" -d "min_kw=50" -d "available=true"Response
{
"type": "FeatureCollection",
"live": true,
"as_of": "2026-10-30T10:22:00+00:00",
"features": [
{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [11.5712, 48.1401] },
"properties": {
"id": "charging:123456", "category": "charging_station",
"operator": "Stadtwerke München", "max_kw": 150, "plugs": ["IEC_62196_T2_COMBO"],
"charge_points": 2, "distance_m": 420,
"evses": [ { "evse_id": "DE*SWM*E1", "status": "available", "max_kw": 150, "plugs": ["IEC_62196_T2_COMBO"] } ],
"license": "CC BY 4.0", "attribution": "Bundesnetzagentur" } }
]
}/v1/metron/places/charging/corridorCharging sites along a line, ordered in driving direction (along_m: metres from the start of the line, distance_m: distance to the line). Billed per page by tier.
Parameter
lineobjectYesGeoJSON LineString with [lon, lat] or {"polyline": "…", "precision": 5 | 6}.
width_mfloat 1–5000YesCorridor width in metres, 1 to 5,000.
tier"basis" | "pro" | "enterprise"OptionalDefault:basisTier of the answer: basis, pro (with live status) or enterprise (with availability summary). Sets the price.
min_kwfloatOptionalOnly sites with at least one charge point of this power (kW).
plugstringOptionalOnly sites with this plug type, e.g. IEC_62196_T2_COMBO (CCS), IEC_62196_T2, CHADEMO.
availablebooleanOptionalDefault:falseOnly sites with at least one matching free charge point. Only with tier=pro or enterprise.
limitinteger 1–50OptionalDefault:20Number of hits.
Request
curl -X POST "https://api.centra.dbpg.io/v1/metron/places/charging/corridor" \
-H "Authorization: Bearer sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"line": { "type": "LineString", "coordinates": [[11.58, 48.14], [9.18, 48.78]] },
"width_m": 2000,
"tier": "enterprise",
"min_kw": 150
}'Response
{
"type": "FeatureCollection",
"live": true,
"features": [
{ "type": "Feature", "geometry": { ... },
"properties": { "id": "charging:98765", "along_m": 61240, "distance_m": 380,
"availability": { "available": 3, "occupied": 1, "out_of_order": 0,
"available_share": 0.75, "fast_charging": true }, ... } }
]
}/v1/metron/places/charging/{id}One charging site with all charge points. Billed per request by tier.
Parameter
idstring (path)YesId from a search result (charging:…).
tier"basis" | "pro" | "enterprise"OptionalDefault:basisTier of the answer: basis, pro (with live status) or enterprise (with availability summary). Sets the price.
keystringOptionalpk_ keys only: the public key as a parameter.
Request
curl "https://api.centra.dbpg.io/v1/metron/places/charging/charging:123456?tier=pro" \
-H "Authorization: Bearer sk_your_api_key"Response
{ "type": "Feature", "geometry": { ... }, "properties": { "id": "charging:123456", "live": true, "evses": [ ... ], ... } }Corrections
A correction reports that a place is wrong (kind wrong), that it is missing (kind missing) or that its data contains illegal or offensive content (kind inappropriate), each with free text and either an ID or a coordinate. We store the report, the ID or coordinate, the account and the time, and no personal data about the reporter. For wrong and missing, the donation_consent field states whether the report may be passed on to open data projects such as OpenStreetMap. You obtain that consent from your users. We review reports with kind inappropriate ourselves; they are never passed on automatically, so donation_consent is not evaluated for them and is stored as false. Reports are kept without a time limit. The response contains the report ID (status 201).
Departures
stop is the ID of a METRON Places place, for example from search or a map click. We link it to nearby timetable stops whose name matches, with all their platforms. Without a stop, stations is empty. Times are in Europe/Berlin. If the time lies outside the timetable's validity, schedule.stale is set.
Basis: the stop itself as a place (place lookup). Pro: plus the scheduled departures (this request). Enterprise: the timetable combined with real-time data via realtime=true. Real-time data is not connected yet; until then the request returns the timetable with realtime.available=false and is billed as Pro.
License and attribution
The data comes from OpenStreetMap and is licensed under the Open Database License (ODbL 1.0). Show “© OpenStreetMap contributors” visibly in your application. Every hit carries the fields source and license, every response the field attribution. You must show the source notice even if you copy hits into your own data sets.
The timetable data comes from DELFI e.V. under CC BY 4.0. Show “DELFI e.V.” visibly in your application when you display departures; every response carries the fields attribution and license.
The attribution field contains “© OpenStreetMap-Mitwirkende” (German). The English wording “© OpenStreetMap contributors” is equivalent; you may show either.
In this stage all hits are based exclusively on OpenStreetMap data. Coverage follows the METRON Maps map; places in regions not yet built there are not found yet. The data is refreshed monthly.
Privacy
Search terms and positions are not stored. The usage log only records the endpoint, the credits and the status. Responses are cached for at most 24 hours, keyed by a hash of the request. Correction reports you submit deliberately are the exception.
Errors
Errors are returned as JSON with an error field. They cost nothing.
bad_requestParameters are missing or invalid; for autocomplete this includes a missing or invalid session.query_too_longThe search term is longer than 200 characters.too_many_resultsThe search with sort=relevance matches too many places; reduce the radius.corridor_too_largeThe line is too long, too complex or crosses the antimeridian (line_too_long, line_too_complex, line_crosses_antimeridian, corridor_too_large).not_foundThere is no data for this ID (404, code not_found), for example for addresses with a house number. Nothing is billed.removedReserved for removed places (404, code removed); not issued at present. Nothing is billed.request_timeoutThe service did not answer within 15 seconds (504, code request_timeout). Retry the request; nothing is billed.- 401 and 403 for a missing key or scope, 402 for insufficient balance, 429 when the limit is exceeded, 503 when the service is unavailable.