Skip to main content
Data Connectors · Transportation and charging

Open Charge Map

The node queries the Open Charge Map API for electric vehicle charging stations within a rectangle, a radius or an administrative area and emits every station as an object following the Smart Data Model EVChargingStation. It is suited for charging infrastructure maps, utilisation analyses and transferring stations into an NGSI-LD context broker.

  • Data source
  • Trigger-based
  • EVChargingStation
Node type
openchargemap
Package
@htag/node-red-contrib-hypertegrity-transportation
Inputs / outputs
1 / 1
Data source
Open Charge Map API v3 (API key required)

When to use this node​

Open Charge Map (OCM) is a worldwide, community-maintained database of electric vehicle charging stations. The node fetches the stations of an area from the OCM API and brings the key details (location, address, operator, number of charging points, connections, status) into a uniform format that can be used directly for smart city dashboards or a context broker.

Typical use cases are:

  • Charging infrastructure map of a municipality with all publicly known charging stations.
  • Inventory comparison between your own charging point registers and the OCM dataset.
  • Mobility dashboards showing charging points together with sharing services and public transport.

How the node works​

1

Trigger

An incoming message starts the fetch. The node never polls the API on its own.

2

Query

For every configured filter area the node sends a GET request to https://api.openchargemap.io/v3/poi with your API key, at most 1500 results per request.

3

Merge

The responses of all areas are merged by OCM id so that overlapping areas do not produce duplicates.

4

Map and emit

Every station is mapped to an EVChargingStation object; all objects leave the node as one array in msg.payload.

Result: An array of EVChargingStation objects with location, address and connection data for the NGSI-LD Builder.

The node is trigger-based. Combine it with an Inject node that fires, for example, once a day or hourly. The master data of charging stations rarely changes; status information in OCM is maintained by the community and by data providers and is not real time.

Configuration​

The edit dialog has two tabs: Filter Area and Settings.

Tab "Settings"​

FieldTypeDefaultMeaning
NameTextemptyDisplay name of the node in the flow.
API KeyPassword (credential, required)emptyYour Open Charge Map API key. Stored encrypted in the credentials store and passed to the API as parameter key.
User Agent (Email)Text (required)emptyIdentifier of your application, usually a contact e-mail address, as required by OCM. Sent as parameter client and as HTTP header User-Agent.

Tab "Filter Area"​

FieldTypeDefaultMeaning
Area searchSearch fieldemptySearches Nominatim for cities, counties or suburbs. A hit with a boundary polygon is added as a polygon filter; coordinates are rounded to five decimal places.
Filter area (map)Leaflet map with drawing toolsGermany overviewDraw a rectangle (bounding box) or a circle (radius). Existing shapes can be moved and adjusted on the map.
Active Filters (locations)ListemptyShows the stored filters: rectangle with north/south/west/east bounds, point with latitude, longitude and an editable radius in metres, or polygon with place name. Entries can be removed.

The dialog defines one filter area.

Obtaining an API key

Register free of charge at openchargemap.org and create an API key in your profile. OCM requires a key and an identifiable application identifier for access; both fields are therefore mandatory. For high request volumes the OCM fair-use terms apply.

Input​

The input serves only as a trigger. The node does not evaluate any message properties; all parameters come from the configuration. The incoming message is forwarded with a new payload; other properties are preserved.

PropertyTypeMeaning
msg.payloadanyAny value triggers the fetch. The content is not evaluated.

Output​

msg.payload is an array of EVChargingStation objects. Without a configured filter area the array is empty and the node issues a warning.

[
{
"id": "urn:ngsi-ld:EVChargingStation:OCM-123456",
"type": "EVChargingStation",
"name": "Town Hall Car Park",
"description": "Access via the Market Street entrance",
"location": {"type": "Point", "coordinates": [7.7689, 49.4447]},
"address": {
"streetAddress": "Market Street 1",
"addressLocality": "Example Town",
"postalCode": "67655",
"addressCountry": "DE"
},
"capacity": 4,
"operator": "Example Town Utilities",
"Connections": [{"ID": 987, "ConnectionTypeID": 25, "PowerKW": 22, "Quantity": 2}],
"status": "Operational",
"contactPoint": {"url": "https://www.example-utilities.org"},
"usageType": "Public",
"usageCost": "0.49 EUR/kWh",
"dateLastVerified": "2026-08-12T09:30:00Z",
"dataQualityLevel": 3,
"dataProvider": {"name": "Open Charge Map Contributors", "url": "https://openchargemap.org", "license": "Licensed under Creative Commons Attribution ShareAlike 4.0"},
"dateLastStatusUpdate": "2026-09-30T18:05:00Z"
}
]
FieldMeaning
idurn:ngsi-ld:EVChargingStation:OCM- followed by the OCM id of the station.
typeAlways EVChargingStation.
nameTitle of the station from AddressInfo.Title, or "Unknown Station" with id as fallback.
descriptionGeneral comments (GeneralComments), if present.
locationGeoJSON point [longitude, latitude].
addressStreet, locality, postal code and ISO country code from AddressInfo. Empty sub-fields are omitted.
capacityNumber of charging points (NumberOfPoints).
operatorName of the operator (OperatorInfo.Title).
ConnectionsUnchanged OCM list of connections with connector type, power in kW and quantity.
statusOperational status according to OCM (StatusType.Title), for example "Operational".
contactPointWebsite of the operator, if present.
usageType, usageCostUsage type (public, private, …) and cost information as free text.
dateLastVerified, dateLastStatusUpdateTimestamps of the last verification and the last status change in OCM.
dataQualityLevelOCM quality level of the record.
dataProviderName, website and licence of the data provider; without one the text Open_Charge_Map.

Texts are sanitised for further processing: German umlauts and ß are rewritten as ae, oe, ue, ss; round brackets and the characters <, >, ", ', = and ; are removed. Fields without a value are omitted.

Example flow​

The package ships with an example flow. Import it in Node-RED via Menu → Import → Examples → @htag/node-red-contrib-hypertegrity-transportation → openchargemap. Alternatively download openchargemap.json and import it via Menu → Import. Enter API key, user agent and filter area after importing.

Step 1

Inject

An Inject node triggers the fetch manually or at a fixed interval.

Step 2

Open Charge Map

The node queries the charging stations within the configured area and emits them as an EVChargingStation array.

Step 3

Debug

A Debug node shows the array in the sidebar.

Show example flow as JSON
[
{"id": "tab1", "type": "tab", "label": "Openchargemap", "disabled": false, "info": ""},
{"id": "inject1", "type": "inject", "z": "tab1", "name": "", "props": [{"p": "payload"}], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 140, "y": 160, "wires": [["ocm1"]]},
{"id": "ocm1", "type": "openchargemap", "z": "tab1", "name": "", "locations": [], "userAgent": "", "x": 330, "y": 160, "wires": [["debug1"]]},
{"id": "debug1", "type": "debug", "z": "tab1", "name": "EvChargingStations", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "x": 590, "y": 160, "wires": []}
]

Status and errors​

IndicatorMeaning
Blue dot "Fetching data..."The requests to the OCM API are running.
Green dot "Found 12 stations"The fetch is complete; the number names the emitted stations.
Red ring "Missing configuration"API key or user agent are missing. The node additionally reports an error and sends no message.
Red ring "Error"A request failed. The error message contains the API response (for example for an invalid key) or the network error message.
Warning "No location filter configured for Open Charge Map"No filter area is configured. The node sends an empty array.

Errors are reported via node.error and can be handled with a Catch node.

Notes​

  • API key and terms of use: Open Charge Map provides the API free of charge but requires an API key and an identifiable application identifier. Observe the terms of use and the data licence (attribution of Open Charge Map and the respective data providers, see field dataProvider).
  • Result limit: Every request returns at most 1500 stations (maxresults). For very large areas, split the area across several nodes.
  • Metric units: The radius of a circle is edited in metres in the dialog and passed to the API in kilometres. Charging power in Connections is given in kW.
  • Editor services: The area search uses Nominatim; the map loads Leaflet and OSM map tiles from the internet.
  • Personal data: OCM records may contain, in GeneralComments or for private charging points (usageType), information that points to private individuals, such as addresses of residential buildings. Before publishing, check whether to filter out stations with a non-public usage type.
  • Output format: The object follows the Smart Data Model EVChargingStation but additionally contains the unchanged OCM field Connections. The complete NGSI-LD entity is created downstream in the NGSI-LD Builder.

References​