# Cheapest Fuel Prices Near Me: France & Spain Petrol, Diesel (`wooden_scanner_c1n/official-fuel-prices`) Actor

Cheapest diesel, petrol, LPG and more near a point, along a route or in postcodes, straight from the French and Spanish government price feeds. One normalised schema with EU fuel codes, distances, price-change tracking and source + licence on every record.

- **URL**: https://apify.com/wooden_scanner_c1n/official-fuel-prices.md
- **Developed by:** [Sean](https://apify.com/wooden_scanner_c1n) (community)
- **Categories:** Travel, Developer tools, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 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

## Official Fuel Prices: France & Spain (Near Me & Along a Route)

Find the **cheapest petrol, diesel, LPG, CNG, HVO, E85, AdBlue or hydrogen** near a point, along a driving route, or in a set of postcodes, using the **governments' own fuel price feeds** for France and Spain. About 21,000 stations, returned in **one normalised schema** with EU fuel codes, distances, and the **source and licence on every record**.

No API key, no account, no scraping of commercial apps. Just the official open data, geo-searched and ranked for you.

### What it does

- **Near me**: give a latitude/longitude and a radius (up to 50 km). Get stations ranked by price or by distance.
- **Along a route**: give waypoints or an encoded polyline from Google Directions, OSRM, GraphHopper, Mapbox or Valhalla, plus a corridor width. Get the cheapest stations within that distance of the road, with **how far along the route** each one is (`routePositionKm`) and **how far off the route** (`distanceFromRouteKm`). Cross-border routes such as Barcelona to Montpellier work in one run.
- **Postcodes**: full codes or prefixes (`75` = all of Paris, `28` = Madrid province, `08` = Barcelona province).
- **One fuel vocabulary**: `diesel` (B7), `petrol95` (cheapest of E5 / E10 95-octane), `petrol98`, premium grades, `lpg`, `cng`, `lng`, `e85`, `hvo` (XTL renewable diesel), `hydrogen`, `adblue`. The original fuel name and the exact published price text are kept too.
- **Price changes since your last run**: set a `monitorName` and schedule the Actor. Each price then carries `previousPrice` and `priceChange`.
- **Stale and out-of-stock prices filtered**: French out-of-stock fuels and closed stations are removed, and prices older than `maxPriceAgeDays` (default 30) are ignored.

### Who it's for

- Fleet, logistics and trucking tools planning fuel stops on a route
- Travel, camper and road-trip apps
- Price comparison sites and fuel-card providers
- Analysts and journalists tracking pump prices in France and Spain
- **AI agents**: "where is the cheapest diesel on my way from Lyon to Barcelona?" is one tool call. The Actor works through the [Apify MCP server](https://mcp.apify.com), so Claude, ChatGPT, Cursor and other MCP clients can call it directly.

### Input examples

Cheapest diesel within 5 km of central Paris (the default):

```json
{ "searchMode": "near", "latitude": 48.8566, "longitude": 2.3522, "radiusKm": 5, "fuelType": "diesel", "maxResults": 20 }
```

Cheapest diesel within 2 km of the route Barcelona → Perpignan → Montpellier, tracked over time:

```json
{
  "searchMode": "route",
  "routePoints": ["41.3874,2.1686", "42.6887,2.8948", "43.6108,3.8767"],
  "corridorKm": 2,
  "fuelType": "diesel",
  "maxResults": 15,
  "monitorName": "bcn-montpellier"
}
```

Using a real road route: pass `routePolyline` (the encoded `overview_polyline` from Google Directions, or OSRM's `geometry`) instead of `routePoints`. Use `polylinePrecision: 6` for Valhalla or OSRM `polyline6`.

All LPG stations in Paris:

```json
{ "searchMode": "postalCode", "postalCodes": ["75"], "fuelType": "lpg", "maxResults": 100 }
```

### Output example (one record per station)

```json
{
  "rank": 1,
  "stationId": "ES-12788",
  "country": "ES",
  "brand": "PETROPRIX",
  "stationType": null,
  "address": "CARRETERA C-17 KM. 25",
  "postalCode": "08400",
  "city": "GRANOLLERS",
  "region": "BARCELONA",
  "latitude": 41.59,
  "longitude": 2.27,
  "distanceFromRouteKm": 0.68,
  "routePositionKm": 25.9,
  "selectedFuel": "diesel",
  "selectedFuelCode": "B7",
  "selectedFuelName": "Gasoleo A",
  "selectedPrice": 1.699,
  "selectedPriceUnit": "EUR/l",
  "selectedServiceMode": null,
  "selectedPriceUpdatedAt": "2026-11-03T23:10:54+01:00",
  "selectedPriceChangeSinceLastRun": -0.02,
  "savingVsMostExpensiveInResults": 0.416,
  "isCheapestInResults": true,
  "prices": [
    { "fuel": "B7", "fuelCategory": "diesel", "fuelName": "Gasoleo A", "price": 1.699, "priceText": "1,699", "unit": "EUR/l", "currency": "EUR", "serviceMode": null, "updatedAt": "2026-11-03T23:10:54+01:00", "previousPrice": 1.719, "priceChange": -0.02 },
    { "fuel": "E5", "fuelCategory": "petrol95", "fuelName": "Gasolina 95 E5", "price": 1.559, "priceText": "1,559", "unit": "EUR/l", "currency": "EUR", "serviceMode": null, "updatedAt": "2026-11-03T23:10:54+01:00" }
  ],
  "openingHours": "L-D: 24H",
  "googleMapsUrl": "https://www.google.com/maps/search/?api=1&query=41.59,2.27",
  "sourceUpdatedAt": "2026-11-03T23:10:54+01:00",
  "source": "Ministerio para la Transición Ecológica y el Reto Demográfico – Geoportal Gasolineras (ServiciosRESTCarburantes)",
  "sourceUrl": "https://datos.gob.es/es/catalogo/e05068001-precio-de-carburantes-en-las-gasolineras-espanolas",
  "licence": "Spanish public-sector information reuse conditions (Ley 37/2007, art. 8 as amended by Ley 18/2015)",
  "licenceUrl": "https://sede.serviciosmin.gob.es/es-ES/Paginas/aviso.aspx",
  "attribution": "Fuente: Ministerio para la Transición Ecológica y el Reto Demográfico (Geoportal Gasolineras). Fecha de última actualización: 03/11/2026 23:10:54.",
  "retrievedAt": "2026-11-03T22:12:00Z"
}
```

(Values above are illustrative.) Times are ISO 8601 in the station's local time with its UTC offset.

### Pricing

Pay per event:

- **$0.005** per run (Actor start)
- **$0.002 per station returned**

A "20 cheapest stations near me" query costs about **$0.045**. You control the cost with `maxResults`.

### Data sources and licences

| Country | Feed | Freshness | Licence |
|---|---|---|---|
| France | prix-carburants.gouv.fr instant feed (`donnees.roulez-eco.fr/opendata/instantane_ruptures`), Ministère de l'Économie | about every 10 minutes; per-fuel update time | [Licence Ouverte / Open Licence 2.0](https://www.etalab.gouv.fr/wp-content/uploads/2017/04/ETALAB-Licence-Ouverte-v2.0.pdf) |
| Spain | Ministerio para la Transición Ecológica, `ServiciosRESTCarburantes` REST service | every 30 minutes; one snapshot time | Reuse conditions of [Ley 37/2007](https://sede.serviciosmin.gob.es/es-ES/Paginas/aviso.aspx): cite the source, state the last-update date, do not alter the data |

Every record carries `source`, `sourceUrl`, `licence`, `licenceUrl` and a ready-to-display `attribution` line (for Spain, this includes the last-update date the reuse conditions ask for). Prices are passed through exactly as published: `priceText` is the original string, and `price` is the same value as a number. This Actor is independent and is **not endorsed by** any of these ministries.

**Privacy:** organisation-level data only: station location, brand (Spain) and prices. France's feed has no station or operator names.

### Limits and notes

- **Coverage**: metropolitan France and Corsica; mainland Spain plus the Balearic and Canary Islands, Ceuta and Melilla. **Italy is planned** (the parser for the MIMIT open data is built), but the ministry's server does not currently accept connections from cloud servers. Mexico and Austria were left out because their per-station feeds have no clear open licence for this use.
- **France has no brand names** in the official feed, so a `brands` filter excludes French stations.
- Distances are straight-line (great-circle), not driving distance. In route mode, stations are measured against the polyline you pass, so a detailed road polyline gives the best results.
- Units: litres for liquid fuels, kilograms for CNG, LNG and hydrogen (`unit` says which).
- Each run downloads only the feeds whose country touches your search area, so a Paris query never downloads Spain.
- If one country's feed is down, the run still returns the others and says which feed was unavailable in the status message.

### FAQ

**How fresh are the prices?** As fresh as each government publishes: France about every 10 minutes, Spain every 30 minutes. `selectedPriceUpdatedAt` tells you exactly when.

**Can I track prices over time?** Yes. Schedule the Actor with a `monitorName`, and each run reports the change versus the previous run with the same name.

**Can I get every station in a country?** Use postcode mode with broad prefixes and a high `maxResults` (up to 1,000 per run).

# Actor input Schema

## `searchMode` (type: `string`):

Where to look: around a point (near), along a route corridor (route), or inside postal codes (postalCode).

## `fuelType` (type: `string`):

Fuel to rank by. petrol95 = cheapest of 95-octane E5/E10 at each station; petrol98 = 98-octane; hvo = renewable diesel (XTL); any = all fuels, sorted by distance. Every record still lists all fuels the station sells.

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

Centre point latitude in decimal degrees (WGS84). Default: central Paris.

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

Centre point longitude in decimal degrees (WGS84).

## `radiusKm` (type: `number`):

Straight-line search radius around the point, 0.1 to 50 km.

## `routePoints` (type: `array`):

Two or more 'latitude,longitude' points in driving order, e.g. \['41.3874,2.1686', '43.6108,3.8767']. Straight lines join them, so for a real road route pass an encoded polyline instead (or more waypoints).

## `routePolyline` (type: `string`):

An encoded polyline from Google Directions, OSRM, GraphHopper, Mapbox or Valhalla. Overrides routePoints.

## `polylinePrecision` (type: `integer`):

5 for Google, OSRM, Mapbox polyline; 6 for Valhalla and OSRM polyline6.

## `corridorKm` (type: `number`):

Maximum straight-line distance from the route, 0.1 to 20 km.

## `postalCodes` (type: `array`):

Full postal codes or prefixes: '75' = all of Paris, '28001' = central Madrid, '08' = Barcelona province. Matched in every selected country.

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

Feeds to use. Only feeds whose country touches the search area are downloaded. (Italy is planned: its ministry server does not currently accept connections from cloud servers.)

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

price = cheapest first; distance = nearest first (distance from the route in route mode); routePosition = in driving order along the route.

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

Maximum number of stations returned (and charged). 1 to 1000.

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

Only stations whose brand contains one of these words, e.g. 'repsol', 'cepsa'. France's feed has no brands, so a brand filter excludes French stations.

## `maxPriceAgeDays` (type: `number`):

Drops prices whose last update is older than this. 0 = keep all.

## `includeAllPrices` (type: `boolean`):

On: each record lists every fuel the station sells. Off: only the selected fuel.

## `monitorName` (type: `string`):

Give a name and schedule the Actor: each record then shows previousPrice and priceChange versus the last run with the same name.

## Actor input object example

```json
{
  "searchMode": "near",
  "fuelType": "diesel",
  "latitude": 48.8566,
  "longitude": 2.3522,
  "radiusKm": 5,
  "polylinePrecision": 5,
  "corridorKm": 2,
  "countries": [
    "FR",
    "ES"
  ],
  "sortBy": "price",
  "maxResults": 20,
  "maxPriceAgeDays": 30,
  "includeAllPrices": true
}
```

# Actor output Schema

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

All stations returned by 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 = {
    "searchMode": "near",
    "fuelType": "diesel",
    "latitude": 48.8566,
    "longitude": 2.3522,
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("wooden_scanner_c1n/official-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 = {
    "searchMode": "near",
    "fuelType": "diesel",
    "latitude": 48.8566,
    "longitude": 2.3522,
    "maxResults": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("wooden_scanner_c1n/official-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 '{
  "searchMode": "near",
  "fuelType": "diesel",
  "latitude": 48.8566,
  "longitude": 2.3522,
  "maxResults": 20
}' |
apify call wooden_scanner_c1n/official-fuel-prices --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,wooden_scanner_c1n/official-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/bfEfipsPsKw2bDAsk/builds/EXk0KmAHTPrN4ZAyf/openapi.json
