Spain Gas Station Prices API + Cheapest Stop on Route avatar

Spain Gas Station Prices API + Cheapest Stop on Route

Pricing

from $1.00 / 1,000 gas stations

Go to Apify Store
Spain Gas Station Prices API + Cheapest Stop on Route

Spain Gas Station Prices API + Cheapest Stop on Route

Current petrol and diesel prices of ~11,500 gas stations in Spain from Ministry open data: filter by province, brand, radius or open now, and find the cheapest stop on a route counting the detour. No login.

Pricing

from $1.00 / 1,000 gas stations

Rating

0.0

(0)

Developer

Oatpage

Oatpage

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

19 days ago

Last modified

Features

Limited permissions

Share

Spain Gas Station Prices API (Gasolineras) + Cheapest Stop on Your Route

Independent tool. Not an official service and not endorsed, sponsored or supported by the Ministry. Looking for the cheapest petrol or diesel in Spain, near you or along a trip? Get current prices of every gas station in Spain (about 11,500, gasolineras) from the Ministry open data service, filtered by province, town, brand or radius and sorted by price. Plan a route A to B and find the stop that really costs least, counting the detour. No login, no scraping.

Search terms this Actor answers: Spain gas station prices API, gasolineras España precios, cheapest petrol Spain, cheapest diesel near me, precio gasolina hoy, fuel prices by province, route fuel planner Spain, Geoportal Gasolineras API.

Use cases

  • Drivers and travellers: find the cheapest open station on the way from Madrid to Valencia, with total cost including the detour.
  • Fleets and delivery companies: monitor diesel and AdBlue prices by province and brand to choose where to refuel.
  • Apps, comparison sites and media: feed a daily price table or a "cheapest in your town" widget.
  • Analysis: track price differences between brands, towns and provinces over time.

Data source: Fuente de los datos: Ministerio para la Transición Ecológica y el Reto Demográfico, Geoportal de Gasolineras (open data, reuse with attribution, Ley 37/2007 on reuse of public sector information). Prices are as published by the stations and updated by the Ministry several times a day; the field sourceTimestamp shows the Ministry's last-update timestamp. The actor only filters, sorts and structures the data; it does not change prices.

Cheapest stop on your route

Give an origin, a destination (and waypoints if you like) and the actor ranks the stations along the way by what the stop really costs you: liters x price + the detour to reach it. A station that is 3 cents cheaper but 10 km off the road can end up costing more, and one that is closed right now is a wasted trip.

Input (openNow: true keeps only stations open at that moment):

{"fuel":"gasoleo_a","routePoints":[{"latitude":40.4168,"longitude":-3.7038},{"latitude":39.4699,"longitude":-0.3763}],"corridorKm":3,"tankLiters":40,"consumptionL100km":6,"openNow":true}

Output (real run, Madrid to Valencia, diesel, open stations, 11-10-2026): a summary record and then one record per station, cheapest total first.

{"type":"summary","fuel":"gasoleo_a","stations":169,"avgPrice":1.873,"minPrice":1.69,"maxPrice":2.049,"medianPrice":1.889,"cheapest":{"stationId":"13871","brand":"ELDISSER","town":"PATERNA","province":"VALENCIA / VALÈNCIA","price":1.69}}
{"type":"station","stationId":"13871","brand":"ELDISSER","town":"PATERNA","province":"VALENCIA / VALÈNCIA","prices":{"gasoleo_a":1.69},"routeDistanceKm":2.85,"detourKm":5.7,"alongRouteKm":295.93,"routeLengthKm":304.32,"fillCostEur":67.6,"detourCostEur":0.58,"totalCostEur":68.18,"savingVsCorridorAverageEur":6.73,"isOpenNow":true}
  • savingVsCorridorAverageEur compares with filling the same liters at the average price of the stations in the corridor.
  • The route is the straight line between your points (add waypoints to follow the road). The detour is estimated as twice the distance from the route line to the station. It is an estimate, not navigation.
  • isOpenNow is read from the opening hours the Ministry publishes (Spanish local time; null if the text cannot be read). Hours can be out of date.
  • Any search (not only routes) can use openNow and returns the summary record when fuel is set; the summary is not billed.

Input

FieldMeaningDefault
provincesProvince names (e.g. MADRID); empty = all Spainnone
municipalityExact town name, accents ignorednone
brandBrand contains (e.g. REPSOL)none
fuelgasoleo_a, gasolina_95_e5, gasolina_95_e10, gasolina_98_e5, glp, adblue...gasoleo_a
maxPricePerLiterUpper price limit in EUR (needs fuel)none
latitude, longitude, radiusKmStations within a radiusnone
sortByprice, distance or noneprice
routePoints, corridorKm, tankLiters, consumptionL100kmRoute mode (see above)none, 3 km, 40 l, 6 l/100 km
openNowOnly stations open nowfalse
includeSummaryAdd the summary record (not billed)true
maxItems1-20,000100

Output (one record per station)

{"stationId":"16440","brand":"BALLENOIL","address":"CALLE PUERTO COTOS, 25","postalCode":"28935","town":"MOSTOLES","municipality":"Móstoles","province":"MADRID","latitude":40.351694,"longitude":-3.876639,"schedule":"L-D: 24H","saleType":"public","prices":{"gasoleo_a":1.689,"gasolina_95_e5":1.589},"fetchedAt":"2026-10-10T10:21:24Z","sourceTimestamp":"10/10/2026 12:21:20"}

Prices are EUR per liter. Fuels a station does not sell are absent from prices.

Pricing (pay per event)

  • Run start: $0.005
  • Station: $0.001 (100 stations = $0.10)

Limits

  • Spain only (mainland, Balearic and Canary Islands). Marine stations are not included.
  • Prices are those published by the Ministry; they can be a few hours old. Not a guarantee of the price at the pump.
  • Brand names appear only as data of each station; their owners are not affiliated with this tool.

Data protection

Only business data of stations (address, schedule, prices). No personal data.