# EU Fuel Prices: Spain & France Gas Station Prices (`atesen-software/eu-fuel-prices`) Actor

Diesel, petrol 95/98, LPG and E85 prices per gas station in Spain and France from the official ministry open data. Radius search, cheapest N, brand filter, only-changed mode. Fleet fuel cost and price comparison.

- **URL**: https://apify.com/atesen-software/eu-fuel-prices.md
- **Developed by:** [Atesen Software](https://apify.com/atesen-software) (community)
- **Categories:** Business, Travel, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 station prices

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: Spain & France Gas Station Prices

Get **fuel prices per gas station in Spain and France** as clean JSON, CSV or Excel. The Actor reads the national ministry feeds (no scraping of commercial price sites), gives every station and fuel type one row in one schema, and filters by **location and radius**, postal code, city, province or department, **brand** and fuel type. Ask for the **cheapest N stations** near a point, or run it on a schedule with the **only-changed** mode to track price moves.

Typical searches: *fuel prices API Europe*, *gas station prices Spain France*, *diesel price by location*, *cheapest petrol near me*, *fleet fuel cost*.

### What you get

For every station and fuel type: country, station id, brand and sign (Spain), street address, postal code, city, province/department, latitude and longitude, distance from your centre point, fuel type, **price in EUR per litre**, the time of the source update, the source endpoint and the **attribution text** the publisher requires.

| Country | Official source | Brand in feed | Update time in feed |
|---|---|---|---|
| Spain (ES) | Ministerio de Industria y Turismo / MITECO, price feed of the Geoportal de Gasolineras | yes (sign, e.g. REPSOL) | one timestamp for the whole feed, set by the server when it answers (no per-station time) |
| France (FR) | Ministere de l'Economie, prix-carburants.gouv.fr "flux instantane" on data.economie.gouv.fr (Licence Ouverte 2.0) | no | per fuel and station (the time the station reported the price) |

Fuel types: `diesel`, `diesel_premium` (Spain only), `petrol95` (E5), `petrol95_e10`, `petrol98`, `lpg`, `e85`. Spain's other products (AdBlue, hydrogen, gas) are not returned.

### Example input

```json
{
  "countries": ["ES", "FR"],
  "fuelTypes": ["diesel"],
  "latitude": 42.6887,
  "longitude": 2.8948,
  "radiusKm": 100,
  "maxStations": 5
}
```

The prefilled example is a border search that answers in both countries: the 5 cheapest diesel prices per country within 100 km of Perpignan (France/Spain border), 10 rows at most.

More examples:

- The 10 cheapest diesel prices within 10 km of central Madrid: `{"countries":["ES"],"fuelTypes":["diesel"],"latitude":40.4168,"longitude":-3.7038,"radiusKm":10,"maxStations":10}`
- Cheapest petrol 95 E10 in France near Lyon: `{"countries":["FR"],"fuelTypes":["petrol95_e10"],"latitude":45.764,"longitude":4.8357,"radiusKm":15,"maxStations":20}`
- Cheapest diesel in the province of Valencia, all Repsol and Cepsa stations: `{"countries":["ES"],"region":"Valencia","brands":["Repsol","Cepsa"],"maxStations":50}`
- Daily price monitor: add `"onlyChanged": true` and schedule the run. The first run returns the baseline, later runs return only new or changed prices. Pick or create a key-value store in `stateStore` to keep the history (this also works with limited Actor permissions). Without a store that can be opened, the Actor still runs, but every price counts as new and the run notes say that change history was unavailable.

### Example output

```json
{
  "country": "ES",
  "stationId": "12145",
  "brand": "ALCAMPO",
  "name": "ALCAMPO",
  "address": "CALLE JOSE PAULETE,",
  "postalCode": "28000",
  "city": "MADRID",
  "region": "MADRID",
  "lat": 40.393806,
  "lon": -3.654528,
  "distanceKm": 4.89,
  "fuelType": "diesel",
  "fuelLabel": "Gasoleo A",
  "priceEur": 1.709,
  "currency": "EUR",
  "updatedAt": "2026-11-07T10:15:53.000Z",
  "source": "https://sedeaplicaciones.minetur.gob.es/ServiciosRESTCarburantes/PreciosCarburantes",
  "attribution": "Source: Ministerio de Industria y Turismo / MITECO ..."
}
```

(A Spanish row from a run on 2026-11-07, attribution shortened; every run returns the live feed. For Spain `updatedAt` is the feed timestamp, which is the time of the download, not the time the station changed the price.) A `SUMMARY` record in the key-value store lists counts per country, failed sources, notes and why the run stopped.

### Use cases

- **Fleet fuel cost**: price the cheapest diesel around depots, routes or customer sites and track it daily.
- **Price comparison apps and sites**: feed a comparison widget with official station prices for Spain and France.
- **Route and trip planning**: find the cheapest petrol or LPG within a radius of a point.
- **Research and journalism**: snapshot regional price differences and brand price gaps (Spain) at a point in time.
- **Alerts**: run on a schedule with `onlyChanged` and send new or changed prices to a webhook, Slack or a spreadsheet.

### How it works and what it does not do

- Reads only the official ministry feeds named above, one request per Spanish province (or one paged query for France) and filters the result. No login, no proxy, no browser.
- A radius search in Spain downloads just the provinces the circle touches. A search without coordinates, postal code or province downloads all 52 Spanish provinces, which is much slower, so give a location when you can.
- Prices are what station operators report to the ministries. A pump price can differ from the published one, and a feed can lag behind a price change. France publishes the update time per fuel and station (stored in `updatedAt`; the French dataset labels these times +00:00 although they are Paris local time, so the Actor converts them to real UTC). Spain publishes only one timestamp for the whole feed, set when the server answers, so for Spain `updatedAt` shows when you downloaded the feed, not when a price last changed.
- Prices are passed on exactly as published (euro per litre, the Spanish decimal comma becomes a number). Coordinates are published values too; the few Spanish rows with clearly swapped latitude/longitude are put in the right order, and unusable coordinates become null (such a station is skipped in a radius search). Rows with no price for the fuel, or an implausible price (0.2 EUR or less, 6 EUR or more), are skipped and never charged.
- The ministry server in Spain is sometimes slow. Spanish downloads get a time budget of about 3 minutes per run; what was read until then is returned and the `SUMMARY` lists the provinces that are missing. If Spain fails completely and France answers, the run still succeeds with the French rows and the status message says `partial: ES failed`.
- France publishes no brand, so a brand filter finds no French station. Spain lists a few stations that sell to members only (cooperatives); they are left out unless you set `includeRestrictedSales`.
- Only Spain and France are included in this version. Other countries are not covered.
- Not an official service of any ministry. Keep the `attribution` text when you publish the data; the Spanish conditions ask for the source and the date of the last update, the French Licence Ouverte 2.0 asks for the source and the date of the last update as well.
- No personal data is read: station sign, address and coordinates of the business only. No operator names, e-mails or phone numbers are requested. The Spanish sign (rótulo) is a business sign as the ministry publishes it; for a few small independent stations it can be the trader's own name.

### Input fields

| Field | Meaning |
|---|---|
| `countries` | `ES`, `FR` (default both) |
| `fuelTypes` | one or more fuel types (default `diesel`) |
| `latitude`, `longitude`, `radiusKm` | radius search around a point, 0.1 to 200 km |
| `postalCode`, `city`, `region` | filters; for Spain a postal code or province also limits what is downloaded |
| `brands` | words to match in the sign/brand (Spain) |
| `maxStations` | cheapest (or nearest) N per country and fuel type |
| `sortBy` | `price` or `distance` |
| `stateStore` | key-value store (picker) that keeps the change history; works with limited Actor permissions; pick or create one and use it for every run of the same watchlist |
| `onlyChanged` | return only new or changed prices of this exact query since the last run (state kept in the key-value store you pick in `stateStore`, otherwise in a store named `eu-fuel-prices-state` in your account; if no store can be opened the run still succeeds but has no history, every price counts as new and the run notes say so; at most 20,000 prices per query: narrow a wider query, otherwise no state is saved and every run returns all rows) |
| `includeRestrictedSales` | include members-only stations (Spain) |
| `maxResults` | hard row cap per run |

### Pricing

Pay per event: you are charged for each station price row that is delivered to the dataset. Empty results, failed sources and runs that find no station are free. Set a maximum cost per run in the run options; the Actor stops cleanly when that limit is reached. The current price is on the pricing tab of this page.

**Maximum items is a hard cap on charged rows.** Set `maxItems` in the run options (or `?maxItems=` in the API) and the run stops after that many station prices: it never writes or charges more rows than that number. Leave it empty for no cap. Free status rows are not counted.

### Use via API

One request runs the Actor, waits for it and returns the dataset items as JSON. Send your token in the `Authorization` header, not in the URL:

```bash
curl -X POST "https://api.apify.com/v2/acts/atesen-software~eu-fuel-prices/run-sync-get-dataset-items?timeout=120" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"countries":["ES","FR"],"fuelTypes":["diesel"],"latitude":42.6887,"longitude":2.8948,"radiusKm":100,"maxStations":5}'
```

The synchronous endpoint waits up to 300 seconds. For longer jobs start a run with `POST https://api.apify.com/v2/acts/atesen-software~eu-fuel-prices/runs` and read the dataset when it finishes.

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

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('atesen-software/eu-fuel-prices').call({ countries: ["ES", "FR"], fuelTypes: ["diesel"], latitude: 42.6887, longitude: 2.8948, radiusKm: 100, maxStations: 5 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### Use with AI agents (MCP)

Claude Desktop, Cursor, VS Code and other MCP clients can call this Actor as a tool through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp). Load only this Actor with:

```text
https://mcp.apify.com?tools=atesen-software/eu-fuel-prices
```

Client config (sign in with Apify OAuth when the browser opens, or add an `Authorization: Bearer <APIFY_TOKEN>` header instead):

```json
{
  "mcpServers": {
    "apify": { "url": "https://mcp.apify.com?tools=atesen-software/eu-fuel-prices" }
  }
}
```

Then ask in plain words, for example: "Find the 5 cheapest diesel stations within 100 km of Perpignan in Spain and France." The agent fills the same input fields you see on the Input tab, and runs are billed to your Apify account at the prices on the Pricing tab.

### FAQ

**Is this the official API?** No. It is an independent Actor that reads the ministries' open data feeds. It is not affiliated with or endorsed by any ministry.

**How fresh are the prices?** As fresh as the ministry feed at the moment of the run: the Actor downloads it live on every run and caches nothing. France's instant feed carries a report time per station and fuel (`updatedAt`), and the dataset is refreshed during the day (on 2026-11-07 the newest report was about 15 minutes old). Spain's feed carries no per-station time, so `updatedAt` there is only the download time; a station's price can be older.

**Why is a Spanish run without a location slow?** The Spanish server delivers the national list in 52 province downloads. A radius, postal code or province keeps it to one or a few downloads.

**Can I get Germany, Italy, Austria or Portugal?** Not in this version.

**Can I use the data commercially?** The French feed is under the Licence Ouverte 2.0 (commercial reuse allowed, credit the source and the date of the last update, no suggestion of official endorsement). The Spanish ministry's reuse conditions ask that the content is not altered, the source is cited and the date of the last update is stated. Keep the `attribution` and `updatedAt` fields with the data. The Actor does not grant you any rights beyond those licences, and this is not legal advice.

### Related actors

- [Open Places Lead Finder: Local Business List (Overture)](https://apify.com/atesen-software/open-places-lead-finder)
- [Annual Country Indicators: GDP & Population](https://apify.com/atesen-software/world-bank-indicators)
- [Airbnb Scraper: Listing Prices by Date, Ratings & Hosts](https://apify.com/atesen-software/airbnb-scraper)

# Actor input Schema

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

Official open-data sources to read. Spain (ES) and France (FR) are available. Without a location, region or postal code a country is searched as a whole, which is slow for Spain (the ministry server delivers only a few KB per second per download).

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

Fuel types to return. diesel = standard diesel (Gasoleo A / Gazole). One row is returned per station and fuel type. France does not publish diesel_premium.

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

Centre of a radius search, decimal degrees (for example 40.4168 for Madrid). Give both latitude and longitude, or neither.

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

Centre of a radius search, decimal degrees (for example -3.7038 for Madrid).

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

Search radius around the centre point, 0.1 to 200 km (default 10). Ignored when no latitude and longitude are given.

## `postalCode` (type: `string`):

Only stations whose postal code starts with this value (for example 28013 or 75). For Spain the first two digits also choose the province, so this is a fast way to search without coordinates.

## `city` (type: `string`):

Only stations whose locality contains this text, accents and case ignored (for example Valencia, Lyon). Without coordinates, postal code or province Spain is downloaded in full, which is slow.

## `region` (type: `string`):

Spanish province name or two-digit code (Madrid, Barcelona, 46) or French department name or code (Rhone, 69, 2A). Narrows the search and makes Spanish runs faster.

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

Keep only stations whose sign or brand contains one of these words (for example Repsol, Cepsa, BP). Spain only: the French open feed has no brand field, so a brand filter returns no French station.

## `maxStations` (type: `integer`):

How many stations to return per country and fuel type, cheapest first (or nearest first, see sort order).

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

price = cheapest first, distance = nearest first (needs latitude and longitude). The cut to N stations follows the same order.

## `onlyChanged` (type: `boolean`):

Saves the returned prices of this exact query in a key-value store (the one you pick below, otherwise the store named eu-fuel-prices-state in your account). Later runs with the same query return only new or changed prices, which is useful for scheduled monitoring. The first run returns everything as the baseline.

## `stateStore` (type: `string`):

Key-value store that keeps the prices of each query between runs. Pick or create a store here to use the only-changed mode. This works with the Actor's limited permissions. Leave it empty to use the named store eu-fuel-prices-state in your account, or to run without change history.

## `includeRestrictedSales` (type: `boolean`):

Spain lists some stations (mostly cooperatives) that sell to members only. They are left out unless you switch this on.

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

Hard cap on the rows of one run, as a safety limit on top of your maximum cost per run.

## Actor input object example

```json
{
  "countries": [
    "ES",
    "FR"
  ],
  "fuelTypes": [
    "diesel"
  ],
  "latitude": 42.6887,
  "longitude": 2.8948,
  "radiusKm": 100,
  "maxStations": 5,
  "sortBy": "price",
  "onlyChanged": false,
  "includeRestrictedSales": false,
  "maxResults": 5000
}
```

# Actor output Schema

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

Station prices in euro per litre with address, coordinates, update time and the source attribution

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

Counts per country, failed sources, notes, why the run stopped and the data notice

# 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": [
        "ES",
        "FR"
    ],
    "fuelTypes": [
        "diesel"
    ],
    "latitude": 42.6887,
    "longitude": 2.8948,
    "radiusKm": 100,
    "maxStations": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("atesen-software/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": [
        "ES",
        "FR",
    ],
    "fuelTypes": ["diesel"],
    "latitude": 42.6887,
    "longitude": 2.8948,
    "radiusKm": 100,
    "maxStations": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("atesen-software/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": [
    "ES",
    "FR"
  ],
  "fuelTypes": [
    "diesel"
  ],
  "latitude": 42.6887,
  "longitude": 2.8948,
  "radiusKm": 100,
  "maxStations": 5
}' |
apify call atesen-software/eu-fuel-prices --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,atesen-software/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/6Dl2GY7gQOO8pCSzw/builds/glZBBa62ow9BZLuhT/openapi.json
