Petromap API
Live fuel prices, station metadata and country statistics for 90,000+ gas stations across 19 European countries — one normalized REST API.
Quick start
Every endpoint is a plain HTTPS GET returning JSON. Try it right now — no key needed for evaluation:
curl "https://api.petromap.eu/v1/stations?lat=48.21&lng=16.37&rad=10&categoryId=gasoline¤cy=EUR"
Production use requires an API key, sent with every request in the x-api-key header:
curl -H "x-api-key: pm_your_key_here" \ "https://api.petromap.eu/v1/countries/at"
Plans & pricing
| Plan | Requests / day | Price | |
|---|---|---|---|
| Free | 5,000 | Free | Evaluation and hobby projects. All endpoints, attribution required. |
| Starter | 50,000 | €29.99/month | Production apps and internal tools. |
| Pro | 500,000 | €99.99/month | High-volume products and fleet routing. |
| Enterprise | Custom | Contact us | Custom volume, SLA, bulk exports and historical dumps. |
To get a key: create a Petromap account, then activate a developer account and generate keys instantly in your developer dashboard. Free-tier keys are self-serve; upgrade to a paid plan anytime from the dashboard.
The Free plan requires visible attribution (“Fuel prices by Petromap”) wherever the data is shown.
Rate limits
- Anonymous (no key): burst-limited per IP — roughly 60 requests per 10 minutes before responses slow down, then
429. Fine for trying the API, not for production. - With a key: your plan's daily quota, enforced per 24h window. Responses include
X-RateLimit-LimitandX-RateLimit-Remaining; exceeding the quota returns429withRetry-After. - One shared pool: the daily quota belongs to your account, not to each key. Every API key and every registered app draws from the same allowance, so you can create as many credentials as you need (for rotation, environments or per-app separation) without changing your throughput.
Mobile apps — key-free auth with App Attest
Shipping an API key inside a mobile binary means anyone can extract it. Instead, register your iOS app and let each install authenticate with Apple App Attest: the app proves it is a genuine, unmodified instance on a real device, and the server hands back a short-lived token — no secret in the app.
- Register your app under Developer → Mobile apps with its bundle id and Apple Team ID.
- In the app:
POST /v1/attest/challenge→ attest the device key against the challenge →POST /v1/attest/verifywith{ keyId, attestation, challenge, bundleId }to receive a token. - Send the token as the
x-app-tokenheader on data requests. Its traffic is metered against your account's shared quota, exactly like an API key.
Full Swift integration guide: docs/app-attest-ios.md. Android (Play Integrity) is on the roadmap.
Endpoints
GET /v1/stations
Stations inside a radius, with the current price for one fuel category. Coordinates are approximate (~50 m); use the detail endpoints for full data.
lat, lng— center of the search area (required)rad— radius in km, max 25 (default 25)categoryId— fuel category (default gasoline) — see /v1/categoriescurrency— ISO code for returned prices (default EUR)
curl "https://api.petromap.eu/v1/stations?lat=44.43&lng=26.10&rad=15&categoryId=diesel¤cy=RON"
GET /v1/stations/:id
Full station detail by the opaque id returned from /v1/stations: address, brand, all fuel products with prices (EUR), services, amenities, opening data and current exchange rates.
curl "https://api.petromap.eu/v1/stations/<id>"
GET /v1/stations/by-slug/:slug
Same payload as /v1/stations/:id, addressed by the public URL slug (the one in petromap.eu/station/<slug>). For DE/AT the prices are refreshed live on access.
curl "https://api.petromap.eu/v1/stations/by-slug/omv-bucuresti-3f2a1c"
GET /v1/stations/network
All stations of a brand in a country, paginated.
country— ISO-2 country code (required)network— network id (required) — from /v1/countries/:codepage— 1-based page number
curl "https://api.petromap.eu/v1/stations/network?country=RO&network=omv&page=1"
GET /v1/stations/live and /v1/stations/live-at
Live (minutes-fresh) prices for Germany and Austria respectively. Same lat/lng/rad/categoryId parameters as /v1/stations.
curl "https://api.petromap.eu/v1/stations/live-at?lat=48.21&lng=16.37&rad=10"
GET /v1/countries
All covered countries with station counts and average prices per fuel.
GET /v1/countries/:code
Country detail: averages per fuel vs the EU, top cities and networks.
curl "https://api.petromap.eu/v1/countries/de"
GET /v1/countries/:code/cities/:slug
Stations and price statistics for one city, paginated with ?page.
curl "https://api.petromap.eu/v1/countries/at/cities/wien"
GET /v1/categories
Canonical fuel category ids (gasoline, diesel, lpg, premium variants) used by every other endpoint.
GET /v1/rates
Daily EUR exchange rates for every currency in the dataset.
Data coverage & freshness
19 countries: AT BE CH CZ DE DK ES FR GR HR HU IL IT LI LU MD PT RO SI. Germany and Austria are live (minutes); other countries refresh between hourly and daily depending on the national source. Historical price series and bulk exports are available on the Enterprise plan — contact us.