# EU Fuel Prices per Station – Italy, France, Spain (`mattbonfanti/eu-fuel-prices`) Actor

Fuel prices for every petrol station in Italy, France and Spain from official government open data. Filter by city, province, postcode, radius, brand and fuel; sort by cheapest. Normalized fuel types.

- **URL**: https://apify.com/mattbonfanti/eu-fuel-prices.md
- **Developed by:** [Matteo Bonfanti](https://apify.com/mattbonfanti) (community)
- **Categories:** Travel, Business, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.50 / 1,000 fuel stations

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## EU Fuel Prices per Station – Italy, France, Spain (official data)

Get **current fuel prices for every petrol station** in **Italy (~23,900 stations)**, **France (~9,800)** and **Spain (~11,400)** in one clean, normalized dataset. Data comes straight from the **official government open-data feeds** – no scraping of price-comparison apps, no proxies, no browser – so runs are fast (≈ 10–40 s), cheap and reliable.

Ideal for fleet managers, logistics & delivery companies, route planners, mobility apps, price-intelligence analysts, journalists and researchers.

### Why this Actor

- 🇮🇹🇫🇷🇪🇸 **Three countries, one schema.** Fuel names are normalized (`gasoline95`, `diesel`, `lpg`, `cng`, `lng`, `e85`, `hvo`, premium variants…) while keeping the original name.
- 📍 **Filter** by city, province/department, postcode prefix, **radius around a point**, brand, fuel type, price freshness.
- 💶 **Sort by cheapest** gasoline / diesel / LPG / CNG, or by distance.
- 📊 Spreadsheet-friendly **flat columns** (`price_diesel`, `price_gasoline95`, …) plus the full price list per station (self-service vs served in Italy, update timestamps).
- 🛡️ Robust to source format changes (e.g. the Italian CSV separator change of Feb 2026 and names containing separators) with retries and a daily health check.

### Input example

```json
{
  "countries": ["IT"],
  "latitude": "45.4642",
  "longitude": "9.19",
  "radiusKm": 5,
  "fuelTypes": ["diesel"],
  "selfServiceOnly": true,
  "maxPriceAgeDays": 7,
  "sortBy": "diesel",
  "maxResults": 50
}
```

Other examples: `{"countries":["FR"],"provinces":["75"],"sortBy":"gasoline95"}` · `{"countries":["ES"],"cities":["Madrid"],"brands":["repsol"]}` · `{"countries":["IT","FR","ES"],"maxResults":100000}` (full dump).

### Output example (one item = one station)

```json
{
  "country": "IT",
  "stationId": "IT-47183",
  "sourceId": "47183",
  "name": "8212",
  "brand": "Tamoil",
  "stationType": "Stradale",
  "address": "ROMAGNA 0 20133",
  "city": "MILANO",
  "province": "MI",
  "region": null,
  "postalCode": "20133",
  "latitude": 45.47795827726888,
  "longitude": 9.223964594897586,
  "prices": [
    {
      "fuel": "Benzina",
      "fuelType": "gasoline95",
      "price": 2.099,
      "currency": "EUR",
      "unit": "l",
      "service": "self",
      "updatedAt": "2026-10-24T12:49:10"
    },
    {
      "fuel": "Gasolio",
      "fuelType": "diesel",
      "price": 2.129,
      "currency": "EUR",
      "unit": "l",
      "service": "self",
      "updatedAt": "2026-10-24T21:39:53"
    }
  ],
  "dataDate": "2026-10-26",
  "source": "MIMIT - Osservatorio prezzi carburanti (prices in force at 8:00 of the previous day)",
  "license": "IODL 2.0",
  "distanceKm": 3.06,
  "price_gasoline95": 2.099,
  "price_gasolinePremium": null,
  "price_diesel": 2.129,
  "price_dieselPremium": null,
  "price_lpg": null,
  "price_cng": null,
  "price_e85": null,
  "price_hvo": null,
  "scrapedAt": "2026-10-27T20:35:49.342Z"
}
```

### Data sources, freshness & licences

| Country | Source | Update frequency | Licence |
|---|---|---|---|
| Italy | MIMIT – Osservatorio prezzi carburanti (open data CSV) | daily, prices in force at 08:00 of the previous day | IODL 2.0 |
| France | prix-carburants.gouv.fr via data.economie.gouv.fr | ~10 minutes | Licence Ouverte 2.0 |
| Spain | MITECO Geoportal de gasolineras (REST) | ~every 30 minutes | Reuse under Ley 37/2007 (cite source & update date) |

Every item carries `source`, `license` and `dataDate` so you can attribute correctly. Prices are those reported by station operators to the authorities; always double-check on site. This Actor is not affiliated with or endorsed by any of these administrations.

### Notes

- France does not publish station names or brands – only address, services, opening hours and stock-outs (`outOfStock`).
- Implausible prices (e.g. 1.000 or 9.999 placeholders, >35% away from the national median for that fuel) are dropped by default; set `excludeOutliers: false` to get raw values.
- Italian data is served from a cache refreshed twice a day from MIMIT (the source publishes once a day).
- When `sortBy` is a fuel, stations without that fuel are dropped.
- Italy: the operator (company) name is off by default because small operators may be sole traders; enable `includeOperatorName` if you need it.
- Each station returned is one billable result. Use filters and `maxResults` to control cost.

### Scheduling

Schedule it daily (Italy) or hourly (France/Spain) and connect the dataset to Google Sheets, Make, Zapier, n8n or a webhook to build price alerts and dashboards.

### Issues

Found a problem? Open an issue in the Issues tab – sources are health-checked daily.

# Actor input Schema

## `countries` (type: `array`):

IT = Italy (MIMIT, daily), FR = France (real-time ~10 min), ES = Spain (MITECO, ~every 30 min).

## `cities` (type: `array`):

Exact city/municipality names, case- and accent-insensitive, e.g. Milano, Paris, Madrid.

## `provinces` (type: `array`):

Italy: province code (MI, RM, TO). France: department code (75, 13, 2A) or name. Spain: province name (MADRID, BARCELONA).

## `postalCodePrefixes` (type: `array`):

e.g. 201 (Milan area), 75 (Paris), 28 (Madrid). Italian postcodes are parsed from the address and may be missing for some stations.

## `latitude` (type: `string`):

Center latitude, e.g. 45.4642. Use with longitude and radius.

## `longitude` (type: `string`):

Center longitude, e.g. 9.19.

## `radiusKm` (type: `integer`):

Only stations within this distance of the center.

## `fuelTypes` (type: `array`):

Keep only stations selling at least one of these (normalized across countries).

## `brands` (type: `array`):

e.g. Eni, Q8, Repsol, Cepsa. Italy and Spain only (France publishes no brand).

## `selfServiceOnly` (type: `boolean`):

Drop 'served' prices (Italy publishes both).

## `maxPriceAgeDays` (type: `integer`):

Drop prices not updated within N days (stale reports).

## `sortBy` (type: `string`):

Cheapest first for a fuel type, or nearest first (radius search).

## `maxResults` (type: `integer`):

Maximum number of stations to output (each station = 1 result).

## `includeOperatorName` (type: `boolean`):

Italian registry lists the station operator; small operators may be sole traders (personal names), so this is off by default.

## `excludeOutliers` (type: `boolean`):

Drop prices that differ more than 35% from the national median for that fuel (typically placeholder values such as 1.000 or 9.999 reported by operators).

## Actor input object example

```json
{
  "countries": [
    "IT"
  ],
  "selfServiceOnly": false,
  "sortBy": "none",
  "maxResults": 1000,
  "includeOperatorName": false,
  "excludeOutliers": true
}
```

# Actor output Schema

## `results` (type: `string`):

One item per petrol station and fuel with price, location, brand and update time.

## `summary` (type: `string`):

RUN_SUMMARY record with counts and finish time of the run.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "countries": [
        "IT"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mattbonfanti/eu-fuel-prices").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "countries": ["IT"] }

# Run the Actor and wait for it to finish
run = client.actor("mattbonfanti/eu-fuel-prices").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "countries": [
    "IT"
  ]
}' |
apify call mattbonfanti/eu-fuel-prices --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mattbonfanti/eu-fuel-prices"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/hO7b908AAxy4BSDaY/builds/kPtcH0mqRMTjuWxKL/openapi.json
