# Fuel Prices by Station: Spain & France (Official Open Data) (`actor-forge/fuel-prices-europe`) Actor

Live pump prices for every petrol station in Spain and France from the official government feeds: diesel, E5/E10, 98, LPG, E85 and more, with brand, address, GPS, opening hours and update time. Filter by province, postcode, city or radius; cheapest first. $0.50 per 1,000 stations.

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

## Pricing

from $0.50 / 1,000 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

## Fuel Prices by Station: Spain & France (Official Open Data)

Live pump prices for every petrol station in Spain and France from the official government feeds: diesel, E5/E10, 98, LPG, E85 and more, with brand, address, GPS, opening hours and update time. Filter by province, postcode, city or radius; cheapest first. $0.50 per 1,000 stations.

**Petrol station prices from the official sources, as clean rows.** Spain and France both publish the live pump price of every station: this actor reads those government feeds and gives you one row per station with **brand, address, postcode, city, province or département, GPS coordinates, and every fuel price** (diesel, premium diesel, 95 E5, 95 E10, 98, LPG, E85, CNG, LNG, renewable diesel, AdBlue, hydrogen where sold), the **time the prices were updated**, opening hours, 24-hour flag and services. Filter by **province or département, postcode prefix, city, or a radius around a point**, keep only stations selling a fuel, and get them **cheapest first**. Use it for **fuel price comparison apps and maps**, fleet and logistics cost planning, price monitoring and market studies, and journalism on fuel prices. **$0.50 per 1,000 stations**, with no compute bill on top; problems return a free status row instead of failing.

### What data does it return?

Every run outputs clean, schema-validated rows like these:

| country | brand | postcode | city | prices | address | distanceKm |
| --- | --- | --- | --- | --- | --- | --- |
| ES | SHELL | 28001 | MADRID | \[object Object] |  |  |
| ES | REPSOL | 28864 | AJALVIR | \[object Object] |  |  |
| FR |  | 75013 |  | \[object Object] | 114 BD DE L HOPITAL | 2.44 |

### How much does it cost?

Transparent pay-per-event pricing — you only pay for what you get, and the
actor **always respects your run budget**: set a maximum total charge and it
stops cleanly at the cap instead of overrunning.

| Event | Price | Charged | Worked example |
| --- | --- | --- | --- |
| `station` | $0.0005 | per station row (all its prices) | 1,000 stations = $0.50 |
| `apify-actor-start` | $0.00005 | per run per GB of memory (platform start fee) | One run at 256 MB = $0.00005 |

### Input options

| Field | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `country` | string | no | `"ES"` | Spain (Ministry for the Ecological Transition's Geoportal) or France (prix-carburants open data). |
| `regions` | array | no | — | Spain: province names or codes (Madrid, Barcelona, Valencia, 28). France: département codes or names (75, 69, 2A, Gironde). Leave empty for the whole country. |
| `postcodes` | array | no | — | Optional postcodes or postcode prefixes (28001, 280, 75011, 69). |
| `cities` | array | no | — | Optional city or town names (Spain: matched within the provinces or postcodes you give, or nationwide). |
| `fuelType` | string | no | — | Optional: only stations that sell this fuel; with "Cheapest first" the list is sorted by its price. |
| `sortByPrice` | boolean | no | `true` | Sort by the price of the chosen fuel (needs Fuel). |
| `nearLatitude` | number | no | — | Optional: search around a point (with Near longitude and Radius). Results include the distance and are sorted by it when no fuel is chosen. |
| `nearLongitude` | number | no | — | Optional: longitude of the point. |
| `radiusKm` | number | no | `10` | Search radius around the point. |
| `maxItems` | integer | no | `500` | Upper limit on stations for the whole run. |

### Limits & honest notes

- **Attribution and responsible use:** Spain: data from the Ministerio para la Transición Ecológica y el Reto Demográfico (Geoportal de Hidrocarburos), reusable under Spanish public-sector information law with attribution. France: "Prix des carburants en France" on data.economie.gouv.fr, Licence Ouverte / Etalab 2.0 (credit the source and the update date). Every row carries its licence line. This actor is not affiliated with either government.
- It calls only the two official open-data APIs (the French portal's robots.txt disallows /api/ for crawlers; this is its documented open-data API used per request), at most one request per second, with an honest user agent (ActorForge-FuelPrices) and no login or proxies.
- Prices are what stations report: Spain updates about every 30 minutes, France per station when prices change (each row has the update time). Prices are in EUR per litre (per kg for CNG and hydrogen). France does not publish brand names in this feed.
- A whole country is large (about 12,000 stations in Spain, 10,000 in France); filter by area to keep runs small. Respects your run budget: set a maximum total charge and the run stops cleanly at the cap. Unknown areas return a free status row.

### Related ActorForge actors

- [Business Places Data](https://apify.com/actor-forge/business-places-data) — other points of interest near the same stations

### Changelog

- **2026-10-23** — Initial release: Spain (Geoportal de Hidrocarburos) and France (prix-carburants flux instantané v2); province/département, postcode, city and radius filters; fuel filter and cheapest-first sorting; licence line per row; free status rows.

***

*Built and maintained by **ActorForge**. Reliability first: every actor in the
portfolio is monitored by an automated nightly self-test, and breakages are
typically fixed the same day.*

# Actor input Schema

## `country` (type: `string`):

Spain (Ministry for the Ecological Transition's Geoportal) or France (prix-carburants open data).

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

Spain: province names or codes (Madrid, Barcelona, Valencia, 28). France: département codes or names (75, 69, 2A, Gironde). Leave empty for the whole country.

## `postcodes` (type: `array`):

Optional postcodes or postcode prefixes (28001, 280, 75011, 69).

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

Optional city or town names (Spain: matched within the provinces or postcodes you give, or nationwide).

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

Optional: only stations that sell this fuel; with "Cheapest first" the list is sorted by its price.

## `sortByPrice` (type: `boolean`):

Sort by the price of the chosen fuel (needs Fuel).

## `nearLatitude` (type: `number`):

Optional: search around a point (with Near longitude and Radius). Results include the distance and are sorted by it when no fuel is chosen.

## `nearLongitude` (type: `number`):

Optional: longitude of the point.

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

Search radius around the point.

## `maxItems` (type: `integer`):

Upper limit on stations for the whole run.

## Actor input object example

```json
{
  "country": "ES",
  "regions": [
    "Madrid"
  ],
  "fuelType": "diesel",
  "sortByPrice": true,
  "radiusKm": 10,
  "maxItems": 50
}
```

# Actor output Schema

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

One row per station: brand, address, postcode, city, GPS, every fuel price, update time, opening hours and distance when searching around a point.

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

Rows delivered, requests made, whether the source refused a request, and billing.

# 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 = {
    "country": "ES",
    "regions": [
        "Madrid"
    ],
    "fuelType": "diesel",
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("actor-forge/fuel-prices-europe").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 = {
    "country": "ES",
    "regions": ["Madrid"],
    "fuelType": "diesel",
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("actor-forge/fuel-prices-europe").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 '{
  "country": "ES",
  "regions": [
    "Madrid"
  ],
  "fuelType": "diesel",
  "maxItems": 50
}' |
apify call actor-forge/fuel-prices-europe --silent --output-dataset

```

## MCP server setup

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

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/UrV3PpDzv1uJwDnJq/builds/bSt3y3JzafczO4NED/openapi.json
