Spain Fuel Prices - Ministry Open Data (unofficial)
Pricing
from $0.50 / 1,000 station results
Spain Fuel Prices - Ministry Open Data (unofficial)
Fuel prices for ~11,500 Spanish service stations from the official Ministry open-data feed (MINCOTUR). Find the cheapest station near any coordinates or filter by province, brand and fuel. Refreshed every 30 min; ready-to-open CSV/Excel included. Unofficial: not affiliated with the Spanish Ministry.
Pricing
from $0.50 / 1,000 station results
Rating
0.0
(0)
Developer
Riccardo Pongetti
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
12 hours ago
Last modified
Categories
Share
Spain Fuel Prices API – Official Gas Station Data
Query official Spanish fuel prices for 11,000+ gasolineras across Spain. This Apify Actor reads the Ministry's public MINCOTUR feed, filters the feed, and returns one structured result per matching station.
Use it for precio gasolina lookups, fuel-price monitoring, location-based search, spreadsheets, automations, and AI agents. No third-party scraping, API key, cookies, or affiliation with the Ministry is required.
What this Actor does
- Finds the cheapest fuel near latitude/longitude coordinates.
- Filters by radius, province, municipality, brand, fuel, and maximum price.
- Downloads one official province source file when
provinceIdscontains exactly one ID. - Returns a complete Spain-wide dataset when no province optimization is selected.
- Includes price statistics in a free
SUMMARYkey-value record. - Creates ready-to-open CSV and XLSX files for every run by default.
- Works with Apify API calls, n8n, Make, MCP-based agents, and custom applications.
The source feed is refreshed by the Ministry approximately every 30 minutes. Each station result includes its source attribution and the source update timestamp.
Pricing
Pay only for the value returned:
| Charge | Price |
|---|---|
| Execution start | $0.00005 once per run (Apify synthetic event) |
station-result | $0.0005 per station returned ($0.50 per 1,000) |
| Maximum billable station results | 4,000 per run |
SUMMARY, CSV, XLSX | Free |
Examples:
- 20 nearby stations: 20 × $0.0005 + $0.00005 = $0.01005 ≈ $0.01.
- Madrid province (862 stations in the latest smoke test): 862 × $0.0005 + $0.00005 = $0.43105 ≈ $0.43.
- Complete Spain query: about $2.00 maximum — 4,000 × $0.0005 + $0.00005 = $2.00005 ≈ $2.00.
Apify displays event prices per 1,000 events, so station-result appears as $0.50 / 1,000 results. Apify's pricing table does not display the Actor's 4,000-charge limit per execution; that cap is enforced by the Actor and documented here.
The first 4,000 matching stations are billed and all matching stations are delivered. provinceIds only optimizes which official source file is downloaded; it never changes the price. If the user spending limit is reached, the Actor stops cleanly and does not return unbilled station results.
Quick start
Nearby cheapest gasolineras
{"searchMode": "nearest","products": ["gasolina95", "gasoleo_a"],"latitude": 40.4168,"longitude": -3.7038,"radiusKm": 5,"priceProduct": "gasolina95","maxResults": 20}
One province
{"searchMode": "cheapest","provinceIds": ["28"],"products": ["gasoleo_a"],"priceProduct": "gasoleo_a","maxResults": 0}
28 is the official province ID for Madrid. Use provinces when you want name-based filtering or multiple provinces.
Complete Spain export
{"searchMode": "all","products": ["gasolina95", "gasoleo_a", "gasolina98"],"onlyWithPrices": true,"exportFiles": ["csv", "xlsx"],"exportLanguage": "en","maxResults": 0}
The same three inputs are available in examples/input-cheapest-nearby.json, examples/input-province-cheapest.json, and examples/input-all-spain.json.
Inputs
searchMode:cheapest,nearest, orall.latitude,longitude,radiusKm: location and radius filters.provinces,municipalities,brands,excludeBrands: accent-insensitive text filters.provinceIds: one official province ID to optimize the source download.products: fuel types to include in each station'spricesobject.priceProduct,maxPrice,requireProducts: price and availability filters.maxResults:0returns every matching station; a positive value limits the returned set.exportFiles:csv,xlsx, or both.exportLanguage:esorenfor file headers and sheet names.
Output
The default dataset contains one item per returned station:
{"stationId": "15210","brand": "PETROPRIX","address": "AVENIDA DE LOS REYES, 2","town": "COLMENAR VIEJO","province": "MADRID","postalCode": "28770","latitude": 40.656917,"longitude": -3.754472,"prices": {"gasoleo_a": 1.769},"cheapestProduct": "gasoleo_a","cheapestPrice": 1.769,"cheapestUnit": "EUR/litre","distanceKm": 2.4,"priceUpdatedAt": "20/09/2026 11:11:03"}
A SUMMARY record is also saved in the run's key-value store. Its billing block reports the actual billing state:
{"stationsReturned": 20,"stationsCharged": 20,"capApplied": false,"userLimitReached": false}
Price statistics include count, minimum, quartiles, median, maximum, and average for the selected reference fuel. Fuels with different units, such as EUR/litre and EUR/kg, are not compared as if they were equivalent.
Exported files
With the default exportFiles setting, the run's key-value store contains:
stations-es.csvorstations-en.csv: RFC-4180 CSV with comma delimiters, dot decimals, and UTF-8 encoding.stations-es.xlsxorstations-en.xlsx: Excel workbook with numeric price cells, frozen headers, autofilter, a station sheet, a provincial summary, and source information.
These exports are free and do not create additional billable events.
Use cases
- Cheapest fuel nearby: power a mobile, fleet, or travel workflow with the cheapest gasolineras around coordinates.
- Province and brand monitoring: compare Repsol, Cepsa, Ballenoil, Plenoil, or any other brand by province.
- National Excel export: create a current Spain-wide fuel-price workbook for analysis or reporting.
- n8n and Make: trigger an Actor run, read the dataset or exported file, and send alerts or update a spreadsheet.
- AI agents via MCP: let an agent answer questions such as “find the cheapest precio gasolina near Madrid” using structured station results.
FAQ
Is this data official?
The Actor consumes the public MINCOTUR fuel-price feed and preserves source attribution. It is an independent, unofficial integration and is not affiliated with, endorsed by, or operated by the Spanish Ministry.
Are CSV and Excel files charged separately?
No. SUMMARY, CSV, and XLSX exports are included at no additional charge.
Does provinceIds reduce the price?
No. It only selects a smaller official source download. Billing is based on station results returned.
What happens at the 4,000-result cap?
The first 4,000 station results are billed; all matching stations are still delivered. The cap is per execution.
Which fuels are supported?
Gasóleo A/B/Premium, Gasolina 95/98 and blends, GLP, GNC, GNL, AdBlue, hydrogen, biodiesel, bioethanol, methanol, and the other products exposed by the official catalogue.
Source and disclaimer
Source: Spanish Ministry public fuel-price data (MINCOTUR). This Actor is an independent data product. Verify critical commercial, legal, or safety decisions against the official source.