Fuel prices API reference
The API runs on Apify. You need an Apify account and an API token (Console → Settings → API & Integrations). One synchronous HTTP call runs the query and returns the rows.
Endpoint
POST https://api.apify.com/v2/acts/sste~official-fuel-prices/run-sync-get-dataset-items with header Authorization: Bearer <APIFY_TOKEN> and a JSON body (the input). An OpenAPI definition is available.
cURL
curl -X POST "https://api.apify.com/v2/acts/sste~official-fuel-prices/run-sync-get-dataset-items" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"latitude":48.8566,"longitude":2.3522,"radiusKm":3,"fuelTypes":["diesel"],"maxResults":10}'
Python
# pip install apify-client
import os
from apify_client import ApifyClient
client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("sste/official-fuel-prices").call(run_input={
"latitude": 41.3874, "longitude": 2.1686, "radiusKm": 5,
"fuelTypes": ["gasoline_95"], "maxResults": 10,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
print(row["price"], row["currency"], row["brand"], row["address"], row["distanceKm"])
JavaScript
// npm install apify-client
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('sste/official-fuel-prices').call({
latitude: 45.4642, longitude: 9.19, radiusKm: 3,
fuelTypes: ['diesel'], sortBy: 'distance', maxResults: 10,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
Input parameters
| Field | Type | Description |
|---|---|---|
countries | array | FR, ES, IT, AU-WA. Empty → detected from the location, or all sources. |
fuelTypes | array | Normalized fuel types, e.g. diesel, gasoline_95, gasoline_95_e10, gasoline_98, lpg, cng. Empty → all. |
latitude, longitude | number | Search centre (WGS84). |
radiusKm | number | 0.1–500, default 10. |
postalCodes | array | Prefix match; France and Spain only. |
cities | array | Exact city or suburb, case- and accent-insensitive. |
brands | array | Brand contains any of these words (not available for France). |
maxPriceAgeHours | integer | Drop older prices. |
excludeRestricted | boolean | Drop Spanish members-only stations. |
sortBy | string | price (default), distance, none. |
maxResults | integer | 1–200,000, default 1,000. You pay per row. |
Output fields
One row per fuel price per station: country, region, city, postalCode, address, stationId, stationName, brand, latitude, longitude, fuelType, fuelName, price, currency, unit, serviceType, accessRestricted, priceUpdatedAt, distanceKm, sourceKey, source, sourceUrl, license, fetchedAt. Fields a government does not publish are null.
{
"country": "IT",
"city": "MILANO",
"address": "Via Giuseppe Ripamonti 567 20142",
"stationName": "IP",
"brand": "Api-Ip",
"latitude": 45.4713,
"longitude": 9.1919,
"fuelType": "gasoline_95",
"fuelName": "Benzina",
"price": 1.99,
"currency": "EUR",
"unit": "L",
"serviceType": "full",
"priceUpdatedAt": "2026-09-30T19:42:31+02:00",
"distanceKm": 0.8,
"source": "Ministero delle Imprese e del Made in Italy (MIMIT) — Osservaprezzi Carburanti",
"license": "IODL 2.0"
}
Errors and limits
- Invalid input (unknown country or fuel, latitude without longitude, sorting by distance without a location) fails immediately with a clear message.
- A location outside the four covered regions is rejected unless
countriesis set. - If one government feed is down, the other countries are still returned and the run's
SUMMARYrecord lists the failure. - Prices are as published: EUR or AUD per litre, per kg for CNG, LNG and hydrogen. Distances are straight-line.
Pricing: pay per use on Apify — $0.005 per run plus $0.0005 per price row ($0.50 per 1,000). A "cheapest 10 stations near a point" query costs about $0.01. You set maxResults, so you only pay for the rows you ask for.