# Italy Fuel Prices – Cheapest Petrol & Diesel Stations (`nobler_zirconia/italy-fuel-prices`) Actor

Daily petrol, diesel, LPG and CNG prices for 23,000+ Italian fuel stations from the MIMIT open data (IODL 2.0). Radius, region, province, town and brand search; sort by price or distance. One charge per station.

- **URL**: https://apify.com/nobler_zirconia/italy-fuel-prices.md
- **Developed by:** [Federico Rossi](https://apify.com/nobler_zirconia) (community)
- **Categories:** Travel, Open source, Business
- **Stats:** 2 total users, 1 monthly users, 20.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 results

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

## Italy Fuel Prices – Cheapest Petrol & Diesel Stations

Daily **petrol, diesel, LPG, CNG and LNG prices for 23,000+ Italian fuel stations** from the open data of the Italian Ministry of Enterprises (MIMIT – *Osservatorio prezzi carburanti*). By law, stations must report their prices to this database. Search **within a straight-line radius** of a point or by region, province, town, brand or station type. Rank stations **cheapest first on one explicit product**, monitor a **watchlist** of stations, or get **aggregates** per province, region or brand.

No API key, no scraping: the Actor downloads MIMIT's two official daily files (licence **IODL 2.0**), validates them, and joins stations with prices.

*Prezzi carburanti ufficiali MIMIT: trova il distributore più economico, il prezzo del gasolio oggi e i distributori economici vicino a te.*

### Use cases

- **Fleet & logistics managers**: cheapest diesel around depots or cities. Distance is straight-line, not along roads.
- **Apps & websites**: a "cheapest fuel near me" feature or a price widget via API.
- **Station watchlists**: monitor the same competitor or depot stations every day with `stationIds`.
- **Market analysis & journalism**: average/min/max per province, region or brand, self vs attended, standard vs premium.

### Fair price comparisons

- Each price row has `fuelVariant`: `standard` (Benzina, Gasolio, GPL, Metano, GNL), `premium` (Blue Diesel, Hi-Q, V-Power…) or `hvo`, plus its `unit` (`EUR/L`, or `EUR/kg` for CNG/LNG).
- **Cheapest first** compares exactly one product: `sortFuelCategory` (e.g. `gasolio`) + `sortServiceType` (`self` / `served` / `any`), standard variant only unless `comparisonVariant: "any"`. Stations without that product are excluded from the ranking (counted in the summary). Each result gets `comparisonPrice`, `comparisonFuel`, `comparisonService` and `rank`.
- The columns `benzinaSelf`, `benzinaServed`, `gasolioSelf`, `gasolioServed`, `gpl`, `metano` and `gnl` show the **standard** product's lowest price. Their Italian names are stable; all prices, premium included, are in `prices[]`.
- `includePremium: false` drops premium/HVO rows, and `maxPrice` drops expensive ones.

**Area filters and the radius combine with AND.** If you set Lazio *and* Milan coordinates you get nothing; a warning is logged.

### Example tasks

Cheapest self-service diesel in the province of Bologna (the prefilled demo):

```json
{ "fuelCategories": ["gasolio"], "provinces": ["BO"], "sortBy": "price", "maxResults": 20 }
```

Cheapest diesel within 10 km of central Milan:

```json
{ "fuelCategories": ["gasolio"], "latitude": 45.4642, "longitude": 9.19, "radiusKm": 10, "sortBy": "price", "sortServiceType": "self", "maxResults": 20 }
```

Lombardy comparison by province:

```json
{ "regions": ["Lombardia"], "fuelCategories": ["benzina", "gasolio"], "outputMode": "aggregates", "aggregateBy": "province" }
```

Brand / station watchlist on a daily schedule:

```json
{ "stationIds": ["62939"], "outputMode": "prices" }
```

#### Use it from code

**curl** (runs the Actor and returns the results in one call):

```bash
curl -X POST "https://api.apify.com/v2/acts/nobler_zirconia~italy-fuel-prices/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"fuelCategories": ["gasolio"], "provinces": ["BO"], "sortBy": "price", "maxResults": 20}'
```

**JavaScript** (`npm i apify-client`):

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('nobler_zirconia/italy-fuel-prices').call({"fuelCategories": ["gasolio"], "provinces": ["BO"], "sortBy": "price", "maxResults": 20});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

**Python** (`pip install apify-client`):

```python
from apify_client import ApifyClient
client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("nobler_zirconia/italy-fuel-prices").call(run_input={"fuelCategories": ["gasolio"], "provinces": ["BO"], "sortBy": "price", "maxResults": 20})
items = client.dataset(run["defaultDatasetId"]).list_items().items
```

You can also use it from Make, Zapier, n8n, schedules, webhooks or the Apify MCP server for AI agents.

### Output (station mode)

```json
{
  "resultType": "STATION",
  "stationId": "62939",
  "name": "ENI 05522",
  "brand": "Agip Eni",
  "stationType": "Stradale",
  "address": "Piazza Manfredi Azzarita 9/A 40122",
  "street": "Piazza Manfredi Azzarita 9/A",
  "postalCode": "40122",
  "comune": "BOLOGNA",
  "province": "BO",
  "latitude": 44.499364,
  "longitude": 11.332766,
  "region": "Emilia-Romagna",
  "distanceKm": 0.925,
  "distanceType": "straight-line",
  "benzinaSelf": null,
  "benzinaServed": null,
  "gasolioSelf": 2.19,
  "gasolioServed": null,
  "gpl": null,
  "metano": null,
  "gnl": null,
  "lastPriceUpdate": "2026-10-12T07:41:07",
  "prices": [
    {
      "fuel": "Gasolio",
      "fuelCategory": "gasolio",
      "fuelVariant": "standard",
      "price": 2.19,
      "unit": "EUR/L",
      "selfService": true,
      "updatedAt": "2026-10-12T07:41:07"
    },
    {
      "fuel": "Blue Diesel",
      "fuelCategory": "gasolio",
      "fuelVariant": "premium",
      "price": 2.29,
      "unit": "EUR/L",
      "selfService": true,
      "updatedAt": "2026-10-12T07:41:07"
    }
  ],
  "mapsUrl": "https://www.google.com/maps/search/?api=1&query=44.499364,11.332766",
  "stationDataDate": "2026-10-14",
  "priceDataDate": "2026-10-14",
  "dataFreshness": "CURRENT",
  "comparisonPrice": 2.19,
  "comparisonFuel": "Gasolio",
  "comparisonService": "self",
  "comparisonUnit": "EUR/L",
  "rank": 1,
  "source": "MIMIT – Osservatorio prezzi carburanti (prezzi praticati e anagrafica impianti)",
  "sourceUrl": "https://www.mimit.gov.it/it/open-data/elenco-dataset/carburanti-prezzi-praticati-e-anagrafica-degli-impianti",
  "license": "IODL 2.0",
  "licenseUrl": "https://www.dati.gov.it/iodl/2.0/",
  "attribution": "Fonte: Ministero delle Imprese e del Made in Italy (IODL 2.0). Not endorsed by MIMIT or the Italian government.",
  "retrievedAt": "2026-10-15T09:28:17.121Z"
}
```

| Field | Description |
|---|---|
| `resultType` | `STATION`, `PRICE` (prices mode), `AGGREGATE` or `LOOKUP_STATUS` (free watchlist status rows: `FOUND`, `FOUND_NO_MATCHING_PRICE`, `NOT_FOUND`) |
| `stationId`, `name`, `brand`, `stationType` | Station identity (type: `Stradale` road / `Autostradale` motorway) |
| `address`, `street`, `postalCode`, `comune`, `province`, `region`, `latitude`, `longitude`, `mapsUrl` | Location. `postalCode` is filled only when the address ends with a 5-digit CAP. |
| `distanceKm`, `distanceType` | Straight-line distance from your point (radius search only) |
| `rank`, `comparisonPrice`, `comparisonFuel`, `comparisonService`, `comparisonUnit` | Present when sorted by price |
| `benzinaSelf` … `gnl` | Lowest standard-product price per type |
| `prices[]` | `fuel`, `fuelCategory`, `fuelVariant`, `price`, `unit`, `selfService`, `updatedAt` (Italian local time) |
| `lastPriceUpdate` | Most recent price communication of the station |
| `stationDataDate`, `priceDataDate` | Extraction dates of the two MIMIT files |
| `dataFreshness` | `CURRENT`, or `STALE_FALLBACK` (see below) |
| `source`, `sourceUrl`, `license`, `licenseUrl`, `attribution`, `retrievedAt` | Provenance on every item: data source, licence (IODL 2.0), required attribution, and the UTC time the data was retrieved |

The `SUMMARY` record has `complete`, `truncatedReason`, `matchingStations`, `excludedNoComparablePrice`, `billableUnits` (separate from `datasetItemsWritten`), both data dates, `dataFreshness` and `sourceRoute` (how MIMIT was reached).

### Data freshness and reliability

MIMIT publishes the files every morning with the prices in force **at 8:00 of the previous day**. Every run downloads both files, with retries and backoff, and **validates** them: each file must have an extraction date at most 7 days old, at least 15,000 stations, price coverage of at least 60% of stations, consistent IDs between the two files, and few malformed rows. **If validation or the download fails, the run fails.** It never quietly returns old or partial data.

**Reachability:** MIMIT's servers sometimes accept connections only from Italian IP addresses. The Actor connects directly first; if that fails it automatically retries once through an Italian Apify Proxy exit when your Apify plan includes one (or through the proxy you set in `proxyConfiguration`). The whole download phase is capped at 2.5 minutes, so if MIMIT cannot be reached the run fails quickly with a clear message and **nothing is charged**.

Optional `allowStaleFallback` (off by default): your own earlier runs with this option save the last validated snapshot. If the fresh download then fails, that snapshot (at most `maxFallbackAgeHours` old) is used, and **every item is flagged `dataFreshness: "STALE_FALLBACK"` with a warning**.

**Price history:** schedule the Actor and send the results to a **named dataset** (unnamed run datasets expire under Apify's data retention). History does not build up automatically.

### Pricing

**$0.001 per returned station** ($1 per 1,000, pay per event `result`), plus Apify's tiny start event. Station mode returns one row per station. Prices mode returns one row per fuel product, and both modes bill **one event per station**. Aggregates mode bills one event per aggregate row. The 20 cheapest stations cost $0.02. The default cap is 200 stations per run. Watchlist status rows are free. The Actor writes rows first and then charges for them, so you never pay for rows you don't get.

### Data source, licence and privacy

- Source: [MIMIT – Carburanti: prezzi praticati e anagrafica degli impianti](https://www.mimit.gov.it/it/open-data/elenco-dataset/carburanti-prezzi-praticati-e-anagrafica-degli-impianti), licence [IODL 2.0](https://www.dati.gov.it/iodl/2.0/) (commercial reuse with attribution). Attribution: "Fonte: Ministero delle Imprese e del Made in Italy – Osservatorio prezzi carburanti".
- The station operator ("gestore") can be a private person (sole trader), so the name is **excluded by default** (`includeOperatorName`). Station names are public signage and may contain names.
- Prices are those reported by stations to the Ministry. Prices at the pump can differ.

### Disclaimer

This Actor is an independent tool. It is **not affiliated with, endorsed by or sponsored by** MIMIT or any Italian government body. The data is reproduced from official open data under its licence. It is provided "as is", may contain errors or delays from the source, and is not legal or fiscal advice.

# Actor input Schema

## `fuelCategories` (type: `array`):

Keep only these fuel types. Empty = all.

## `includePremium` (type: `boolean`):

Off = only the standard products (Benzina, Gasolio, GPL, Metano, GNL). Each price row has fuelVariant standard / premium / hvo.

## `serviceType` (type: `string`):

Filter prices by self-service or attended pumps.

## `maxPrice` (type: `number`):

Drop prices above this value (EUR per litre, or per kg for CNG/LNG).

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

Drops prices a station last communicated more than this many days ago (an unchanged price is not necessarily wrong; each price has updatedAt). 0 = keep all.

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

e.g. BO, MI, RM. Combined with AND with every other location filter, including the radius.

## `regions` (type: `array`):

Combined with AND with the other location filters.

## `comuni` (type: `array`):

Town names, e.g. Bergamo, Roma.

## `latitude` (type: `number`):

Centre of a radius search in decimal degrees, e.g. 44.4949 (Bologna). Give both latitude and longitude, or neither. Distance is straight-line, not by road.

## `longitude` (type: `number`):

e.g. 11.3426

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

Used only with latitude/longitude.

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

Contains-match, e.g. Eni, Q8, IP, Esso, Tamoil, Pompe Bianche (unbranded).

## `stationTypes` (type: `array`):

Empty = both.

## `stationIds` (type: `array`):

MIMIT station IDs (stationId in the output) to monitor on a schedule. Each ID gets a free status row: FOUND, FOUND_NO_MATCHING_PRICE or NOT_FOUND.

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

Defaults to nearest first when coordinates are set.

## `sortFuelCategory` (type: `string`):

Product used for 'cheapest first'. Defaults to the first selected fuel type (or diesel). Stations without it are excluded from the ranking.

## `sortServiceType` (type: `string`):

Service used for 'cheapest first'.

## `comparisonVariant` (type: `string`):

By default premium/HVO products are not ranked against standard fuel.

## `outputMode` (type: `string`):

Shape of the dataset.

## `aggregateBy` (type: `string`):

Only for Aggregates output.

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

Maximum billable units: stations (stations/prices modes) or aggregate rows. Default 200.

## `allowStaleFallback` (type: `boolean`):

Off (default): if MIMIT cannot be downloaded or fails validation, the run FAILS. On: the last validated snapshot (saved by your own earlier runs with this option on) is used, and every item is flagged dataFreshness=STALE_FALLBACK with a warning.

## `maxFallbackAgeHours` (type: `integer`):

Oldest snapshot accepted as fallback.

## `proxyConfiguration` (type: `object`):

Normally leave empty. The actor connects to MIMIT directly and, if MIMIT refuses non-Italian connections, automatically retries once through an Italian Apify Proxy exit when your plan includes one. Set a proxy here only if you have an Italian proxy of your own.

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

The operator can be a sole trader, i.e. a private person. Off by default (data minimisation).

## Actor input object example

```json
{
  "fuelCategories": [
    "gasolio"
  ],
  "includePremium": true,
  "serviceType": "any",
  "maxPriceAgeDays": 30,
  "provinces": [
    "BO"
  ],
  "radiusKm": 5,
  "sortBy": "price",
  "sortServiceType": "self",
  "comparisonVariant": "standard",
  "outputMode": "stations",
  "aggregateBy": "province",
  "maxResults": 20,
  "allowStaleFallback": false,
  "maxFallbackAgeHours": 48,
  "includeOperatorName": false
}
```

# Actor output Schema

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

Default dataset, overview table view. Each item includes source, licence, attribution and retrievedAt.

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

SUMMARY record: result count, warnings, finish time.

## `aggregates` (type: `string`):

Only populated in Aggregates output mode.

# 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 = {
    "fuelCategories": [
        "gasolio"
    ],
    "provinces": [
        "BO"
    ],
    "sortBy": "price",
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("nobler_zirconia/italy-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 = {
    "fuelCategories": ["gasolio"],
    "provinces": ["BO"],
    "sortBy": "price",
    "maxResults": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("nobler_zirconia/italy-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 '{
  "fuelCategories": [
    "gasolio"
  ],
  "provinces": [
    "BO"
  ],
  "sortBy": "price",
  "maxResults": 20
}' |
apify call nobler_zirconia/italy-fuel-prices --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nobler_zirconia/italy-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/z8OWtt7OZ20pcEWcv/builds/3nWvWpFn3boxAAUKi/openapi.json
