Export API Examples¶
This page shows a working request and a sample response for every endpoint of the export API. The base URL is https://api.h2-stations.eu/v1, and every request must carry a bearer token in the Authorization header. See Authentication for how to obtain one. The examples below assume your token is stored in the shell variable TOKEN.
All examples use the fictional station ABCDE. Long arrays are truncated to keep the page readable. The real responses contain one entry per station, fuelling option, or event.
List all stations: GET /hrs¶
curl -H "Authorization: Bearer $TOKEN" https://api.h2-stations.eu/v1/hrs
Returns an array with one object per registered station. The response below is truncated to a single station:
[
{
"hrs_id": "ABCDE",
"name": "Brussels Toison d'Or",
"address": {
"full_address": "Avenue de la Toison d'Or 56-60, 1060 Brussels, Belgium",
"street_address": "Avenue de la Toison d'Or 56-60",
"postal_code": "1060",
"city": "Brussels",
"country": "Belgium"
},
"geolocation": {
"longitude": 4.3520487,
"latitude": 50.8350343
},
"entrance_geolocation": {
"longitude": 4.3521065,
"latitude": 50.8351204
},
"fuel_types": [
{
"fuelling_option": "700car",
"number_of_dispensers": 2,
"is_oem_approved": true,
"is_cep_approved": true
},
{
"fuelling_option": "350bus",
"number_of_dispensers": 1,
"is_oem_approved": false,
"is_cep_approved": false
}
],
"hrs_operator": "Acme Hydrogen Operations",
"owner": "Acme Hydrogen Holding",
"site_operator": "Acme Fuel Stations",
"funders": ["Clean Hydrogen Joint Undertaking"],
"suppliers": ["Acme Hydrogen Technologies"],
"opening_hours": "Mo-Fr 10:00-18:30",
"site_amenities": ["shop", "toilets"],
"capacity": "small (< 100 kg/day)",
"percentage_of_green_hydrogen": 80,
"authorization_methods": ["Acme Corporation FuelCard"],
"payment_methods": ["cash", "credit card"],
"access_restriction_status": "open to the public",
"access_restriction_details": "",
"contact_information": "Hotline: +32 2 555 0100",
"remarks": "Located next to the conventional petrol station."
}
]
Notes on selected fields:
fuel_typeslists the fuelling options provided on the station. Thefuelling_optionvalues are the IDs returned byGET /fuel-type.is_oem_approvedis deprecated and always carries the same value asis_cep_approved.opening_hoursuses the OpenStreetMap opening hours format.access_restriction_statusis eitheropen to the publicorrestricted access. Theaccess_restriction_detailsfield explains the restriction when one is in place.
Retrieve one station: GET /hrs/{hrs_id}¶
curl -H "Authorization: Bearer $TOKEN" https://api.h2-stations.eu/v1/hrs/ABCDE
Returns a single station object with exactly the same fields as one item of the GET /hrs list above. An unknown hrs_id returns HTTP 404 with the body {"detail": "Invalid HRS ID"}.
Status of all stations: GET /hrs/status¶
curl -H "Authorization: Bearer $TOKEN" https://api.h2-stations.eu/v1/hrs/status
Returns the retrieval timestamp and one status entry per station. The hrs_status array below is truncated to a single station:
{
"retrieval_datetime": "2026-06-11T09:30:00+02:00",
"hrs_status": [
{
"hrs_id": "ABCDE",
"last_update": "2026-06-11T09:28:41+02:00",
"fuel_types": [
{
"fuelling_option": "700car",
"status": "available"
},
{
"fuelling_option": "350bus",
"status": "limitedly-available"
}
],
"ongoing_events": [
{
"start_datetime": "2026-06-11T08:00:00+02:00",
"end_datetime": "2026-06-11T16:00:00+02:00",
"subject": "Maintenance activities",
"message": "Please contact the technician on site for support with your filling during maintenance work.",
"expected_availability_status": "limitedly-available"
}
]
}
]
}
Each entry in fuel_types carries one of the five status values available, limitedly-available, unavailable, closed, or unknown. See Understanding Availability Statuses for details. last_update is the time the status last changed and is null when no update has been recorded yet. ongoing_events is empty when no event is in progress.
You can restrict the response to stations providing a specific fuelling option with the fuelling_option query parameter. The fuel_types array of each entry then only contains that option:
curl -H "Authorization: Bearer $TOKEN" "https://api.h2-stations.eu/v1/hrs/status?fuelling_option=700car"
An unknown fuelling option ID returns HTTP 400.
Note: The interactive schema at api.h2-stations.eu/v1/doc currently names two fields differently (last_update_datetime and fuel_type). The responses shown on this page, with last_update and fuelling_option, match what the API actually returns.
Status of one station: GET /hrs/{hrs_id}/status¶
curl -H "Authorization: Bearer $TOKEN" https://api.h2-stations.eu/v1/hrs/ABCDE/status
Returns a single status object, the same shape as one entry of the hrs_status array above, without the retrieval_datetime wrapper:
{
"hrs_id": "ABCDE",
"last_update": "2026-06-11T09:28:41+02:00",
"fuel_types": [
{
"fuelling_option": "700car",
"status": "available"
},
{
"fuelling_option": "350bus",
"status": "limitedly-available"
}
],
"ongoing_events": []
}
Events of one station: GET /hrs/{hrs_id}/events¶
curl -H "Authorization: Bearer $TOKEN" https://api.h2-stations.eu/v1/hrs/ABCDE/events
Returns the ongoing and upcoming events of the station. The events array below is truncated to a single event:
{
"hrs_id": "ABCDE",
"events": [
{
"start_datetime": "2026-06-15T08:00:00+02:00",
"end_datetime": "2026-06-15T17:00:00+02:00",
"subject": "Maintenance activities",
"message": "Annual inspection of the 700 bar dispenser. Refuelling is possible with technician assistance.",
"expected_availability_status": "limitedly-available"
}
]
}
expected_availability_status is one of available, limitedly-available, or unavailable and indicates the availability the operator expects while the event lasts. All timestamps are ISO 8601 with UTC offset.
Station photo: GET /hrs/{hrs_id}/photo¶
curl -H "Authorization: Bearer $TOKEN" https://api.h2-stations.eu/v1/hrs/ABCDE/photo -o station.jpg
Returns binary image data. The Content-Type header states the format, which is usually (but not necessarily) JPEG. If the station has no published photo, the API returns HTTP 404 with the body {"detail": "No photo present"}.
List fuelling options: GET /fuel-type¶
curl -H "Authorization: Bearer $TOKEN" https://api.h2-stations.eu/v1/fuel-type
Returns the full list of fuelling options monitored by H2-Stations. These IDs are the values referenced by fuelling_option fields throughout the API:
[
{
"id": "700car",
"pressure": 700,
"vehicle_type": "car"
},
{
"id": "350car",
"pressure": 350,
"vehicle_type": "car"
},
{
"id": "350bus",
"pressure": 350,
"vehicle_type": "bus"
}
]
pressure is the pressure level of the dispensed hydrogen in bar, and vehicle_type is either car or bus.
Further Reading¶
- How statuses are computed: Availability Status
- Full schema and interactive sandbox: https://api.h2-stations.eu/v1/doc
- Data licence and attribution: Licensing