# Fuel Prices from Official Sources - ES, AT, Quebec (`gratifying_graph/fuel-prices-official`) Actor

Station-level fuel prices from official government open-data feeds, normalized into one schema. No scraping fragile websites: these are the feeds regulators publish. Filter by location, fuel type, or get full country snapshots.

- **URL**: https://apify.com/gratifying\_graph/fuel-prices-official.md
- **Developed by:** [Jimmy A](https://apify.com/gratifying_graph) (community)
- **Categories:** Automation, Other
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 station results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Fuel Prices from Official Sources - Spain, Austria, Quebec

Station-level fuel prices straight from **official government open-data feeds**, normalized into one clean schema. No fragile website scraping, no proxies, no login: these are the same feeds regulators publish for public use, which makes this actor fast, stable, and legal everywhere.

### Coverage

| Region | Source | Stations | Freshness |
|---|---|---|---|
| Spain (ES) | MITECO, Gobierno de España | ~11,500 (all land stations) | Updated continuously |
| Austria (AT) | E-Control (energy regulator) | Location search, cheapest stations near a point | Real time |
| Quebec, Canada (CA-QC) | Régie de l'énergie | ~2,400 (all reporting stations) | Stations must report price changes quickly by law |

More regions are on the roadmap (France, Germany, Italy). Ask in the Issues tab if you need one prioritized.

### What you get

One record per station:

```json
{
  "stationId": "ES-4508",
  "name": "BLANCA",
  "brand": "BLANCA",
  "address": "CALLE ALEJANDRO DUMAS, 17",
  "city": "Madrid",
  "postalCode": "28005",
  "country": "ES",
  "latitude": 40.4053,
  "longitude": -3.7178,
  "distanceKm": 1.28,
  "fuels": [
    { "type": "diesel", "price": 1.579, "currency": "EUR", "unit": "litre", "updatedAt": "10/06/2026 23:25:24" }
  ],
  "source": "MITECO (Gobierno de España)",
  "fetchedAt": "2026-06-10T22:01:11.000Z"
}
````

Fuel types are normalized across countries: `gasoline_95`, `gasoline_98`, `diesel`, `diesel_premium`, `lpg`, `cng`. For North America, `gasoline_95` = regular and `gasoline_98` = premium.

### Filters

- **Location**: `latitude` + `longitude` + `radiusKm` returns stations sorted by distance (required for Austria, optional elsewhere)
- **Fuel type**: only return stations selling the fuel you care about
- **City**: substring match on the municipality name
- **maxResults**: cap the output

### Use cases

- **Price comparison apps and widgets**: cheapest diesel within 10 km of the user
- **Fleet and logistics**: route fuel-cost optimization with real station prices
- **Market analysis**: national price snapshots over time (run on a schedule, export CSV)
- **AI agents**: ask "cheapest gas near X" through the standby API endpoint
- **Journalism and research**: regulator-grade data, citable sources

### API / Standby mode for AI agents

Call the actor as a synchronous HTTP endpoint:

```
GET /?region=ES&fuel=diesel&lat=40.4168&lng=-3.7038&radiusKm=10
```

Returns `{ count, stations: [...] }` immediately. Works as a tool for agent frameworks that support Apify actors.

### Pricing

Pay per event:

| Event | Price |
|---|---|
| Actor start | $0.0005 |
| Per station record | $0.001 |
| API call (standby) | $0.02 |

A daily 50-station radius check costs about $1.60/month. A weekly full-Spain snapshot (~11,500 stations) is about $46/month - tell us your use case and we can add a snapshot event tier.

### FAQ

**Why official feeds instead of scraping GasBuddy or similar?**
Official feeds are published for reuse, do not break when a website redesigns, carry no ToS risk for you, and in Spain and Quebec they are the legally mandated source the consumer sites themselves use.

**How fresh are the prices?**
Spain and Austria update continuously. Quebec stations are required to report price changes promptly to the regulator.

**Why does Austria need coordinates?**
The Austrian regulator's API is a location search by design (it returns the cheapest stations around a point). Pass `latitude` and `longitude` for AT.

**Can I get all of Spain in one run?**
Yes. Leave the location filters empty and you get every land station in the country (~11,500 records).

**CSV export?**
Every Apify dataset exports as CSV, JSON, Excel, or via API.

# Actor input Schema

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

Which official feeds to pull. ES = Spain (MITECO), AT = Austria (E-Control), CA-QC = Quebec, Canada (Regie de l'energie).

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

Normalized fuel type to include. 'all' returns every fuel the source publishes.

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

Center point for location filtering (required for Austria, optional elsewhere).

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

Center point for location filtering.

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

Only return stations within this distance of latitude/longitude.

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

Case-insensitive substring match on city/municipality name.

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

Cap on stations returned per region.

## Actor input object example

```json
{
  "regions": [
    "ES"
  ],
  "fuelType": "all",
  "radiusKm": 25,
  "maxResults": 50000
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("gratifying_graph/fuel-prices-official").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 = {}

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

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

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

```

## CLI example

```bash
echo '{}' |
apify call gratifying_graph/fuel-prices-official --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=gratifying_graph/fuel-prices-official",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Fuel Prices from Official Sources - ES, AT, Quebec",
        "description": "Station-level fuel prices from official government open-data feeds, normalized into one schema. No scraping fragile websites: these are the feeds regulators publish. Filter by location, fuel type, or get full country snapshots.",
        "version": "1.0",
        "x-build-id": "gKMd6bGiaipbtxR5r"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/gratifying_graph~fuel-prices-official/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-gratifying_graph-fuel-prices-official",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/gratifying_graph~fuel-prices-official/runs": {
            "post": {
                "operationId": "runs-sync-gratifying_graph-fuel-prices-official",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/gratifying_graph~fuel-prices-official/run-sync": {
            "post": {
                "operationId": "run-sync-gratifying_graph-fuel-prices-official",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "regions": {
                        "title": "Regions",
                        "type": "array",
                        "description": "Which official feeds to pull. ES = Spain (MITECO), AT = Austria (E-Control), CA-QC = Quebec, Canada (Regie de l'energie).",
                        "items": {
                            "type": "string",
                            "enum": [
                                "ES",
                                "AT",
                                "CA-QC"
                            ],
                            "enumTitles": [
                                "Spain (all ~12,000 stations)",
                                "Austria (location search)",
                                "Quebec, Canada (all stations)"
                            ]
                        },
                        "default": [
                            "ES"
                        ]
                    },
                    "fuelType": {
                        "title": "Fuel type",
                        "enum": [
                            "all",
                            "gasoline_95",
                            "gasoline_98",
                            "diesel",
                            "diesel_premium",
                            "lpg",
                            "cng"
                        ],
                        "type": "string",
                        "description": "Normalized fuel type to include. 'all' returns every fuel the source publishes.",
                        "default": "all"
                    },
                    "latitude": {
                        "title": "Latitude",
                        "type": "string",
                        "description": "Center point for location filtering (required for Austria, optional elsewhere)."
                    },
                    "longitude": {
                        "title": "Longitude",
                        "type": "string",
                        "description": "Center point for location filtering."
                    },
                    "radiusKm": {
                        "title": "Radius (km)",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Only return stations within this distance of latitude/longitude.",
                        "default": 25
                    },
                    "city": {
                        "title": "City filter",
                        "type": "string",
                        "description": "Case-insensitive substring match on city/municipality name."
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Cap on stations returned per region.",
                        "default": 50000
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
