https://github.com/jgeek00/fuel-stations-spain-api
REST API that provides realtime prices about Spanish fuel stations.
https://github.com/jgeek00/fuel-stations-spain-api
express-js fuel-prices-spain rest-api
Last synced: about 2 months ago
JSON representation
REST API that provides realtime prices about Spanish fuel stations.
- Host: GitHub
- URL: https://github.com/jgeek00/fuel-stations-spain-api
- Owner: JGeek00
- License: gpl-3.0
- Created: 2024-09-24T13:51:13.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2026-04-11T00:15:55.000Z (3 months ago)
- Last Synced: 2026-04-21T07:45:34.954Z (3 months ago)
- Topics: express-js, fuel-prices-spain, rest-api
- Language: TypeScript
- Homepage:
- Size: 216 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog/v1.10.3.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Fuel Stations Spain API
This project is a backend service that offers a REST API and a MCP server. It fetches the realtime prices from the government's public API, and offers them with more filtering options.
Data source: [Spanish government public API](https://datos.gob.es/es/catalogo/e05068001-precio-de-carburantes-en-las-gasolineras-espanolas) | [Endpoints list](https://sedeaplicaciones.minetur.gob.es/ServiciosRESTCarburantes/PreciosCarburantes/help)
## Import historic data
The API fetches the historic data between the last date on the database and the current date when the API is started, and every day at 01:00 AM, however, the database must have some preloaded data in order to fetch that remaining data.
I have created a [tool](https://github.com/JGeek00/historic-fuel-stations-fetcher) to fetch the historic data from the public API and then import it to the persistent database. Follow the instructions on that repository to fetch the data and import to the database.
## API documentation
There's an [OpenAPI file](https://github.com/JGeek00/fuel-stations-spain-api/blob/master/docs/openapi.yaml) with the API specification. You can paste the contents of that file on the [Swagger Editor](https://editor.swagger.io) to have a better look.
## Donations
If you like the project and you want to contribute with the development, you can [become a sponsor on GitHub](https://github.com/sponsors/JGeek00), or you can donate using PayPal.
##### Created by JGeek00