Metro APImetro.sk ↗
Get current fuel prices from Metro Cash & Carry gas stations across Slovakia. Covers Natural 95, Nafta diesel, and more via 2 simple endpoints.
What is the Metro API?
The Metro.sk API provides access to current fuel prices at Metro Cash & Carry gas stations across Slovakia through 2 endpoints. The get_fuel_prices endpoint returns per-litre EUR pricing for all available fuel types at a specific store, while list_stores enumerates every Metro location in Slovakia that operates a gas station, including geographic coordinates.
curl -X GET 'https://api.parse.bot/scraper/01bbd94b-dac3-4624-8a33-058451ec59a7/get_fuel_prices?store_slug=ivanka-pri-dunaji' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace metro-sk-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: Metro Slovakia fuel prices — list stations, check prices."""
from parse_apis.metro_sk_api import MetroFuel, StoreNotFound
client = MetroFuel()
# List all Metro gas stations in Slovakia
for store in client.stores.list(limit=6):
print(store.store_slug, store.latitude, store.longitude)
# Get fuel prices for a specific store via constructible navigation
station = client.store("ivanka-pri-dunaji")
report = station.fuel_prices()
print(report.store_name, report.store_slug)
for fuel in report.fuel_prices:
print(fuel.fuel_type, fuel.price, fuel.unit)
# Handle a non-existent store gracefully
try:
bad_station = client.store("non-existent-store")
bad_station.fuel_prices()
except StoreNotFound as exc:
print(f"Store not found: {exc.store_slug}")
print("exercised: stores.list / store.fuel_prices / StoreNotFound error")
Retrieve current fuel prices for a specific Metro store's gas station. Returns prices for all available fuel types (Natural 95, Nafta diesel, Super benzín 95, Super nafta) with their EUR/l pricing. Each store page is fetched and parsed for the fuel-prices section.
| Param | Type | Description |
|---|---|---|
| store_slug | string | URL slug identifying the Metro store. Lowercase letters, digits, and hyphens only (e.g. 'ivanka-pri-dunaji', 'zilina', 'devinska-nova-ves', 'nitra', 'zvolen', 'kosice'). Obtain from list_stores endpoint. |
{
"type": "object",
"fields": {
"store_name": "string",
"store_slug": "string",
"fuel_prices": "array of fuel price objects with fuel_type, price, and unit"
},
"sample": {
"data": {
"store_name": "Ivanka pri Dunaji",
"store_slug": "ivanka-pri-dunaji",
"fuel_prices": [
{
"unit": "EUR/l",
"price": "1,59",
"fuel_type": "Natural 95"
},
{
"unit": "EUR/l",
"price": "1,51",
"fuel_type": "Nafta diesel"
},
{
"unit": "EUR/l",
"price": "1,62",
"fuel_type": "Super benzín 95"
},
{
"unit": "EUR/l",
"price": "1,54",
"fuel_type": "Super nafta"
}
]
},
"status": "success"
}
}About the Metro API
Endpoints and Data
The API exposes two endpoints. list_stores requires no input and returns an array of store objects, each containing a store_slug, latitude, and longitude. These slugs follow a lowercase-with-hyphens convention (e.g. ivanka-pri-dunaji) and serve as the primary key for querying individual stations.
Fuel Price Detail
get_fuel_prices accepts a store_slug string and returns the store_name, store_slug, and a fuel_prices array. Each element in that array contains fuel_type (e.g. Natural 95, Nafta, Super benzín 95, Super nafta), price as a numeric value, and unit (EUR/l). Not every station stocks every fuel type, so the array length can vary by location.
Coverage and Freshness
Coverage is limited to Metro Cash & Carry locations in Slovakia that operate their own fuel station. The list_stores endpoint reflects the current set of such stores; locations without a gas station are excluded. Prices returned by get_fuel_prices reflect the current posted price at the time of the request.
The Metro API is a managed, monitored endpoint for metro.sk — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when metro.sk changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official metro.sk API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a fuel price comparison dashboard for Slovak Metro stations using
fuel_typeandpricefields - Find the nearest Metro gas station by comparing
latitudeandlongitudefromlist_storesagainst a user's current coordinates - Monitor daily or weekly fuel price changes at specific stations identified by
store_slug - Alert fleet managers when Nafta diesel prices at any Metro station drop below a threshold
- Integrate Metro fuel prices into a route-planning tool to flag cost-effective refuelling stops
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Metro.sk have an official developer API for fuel prices?+
What fuel types does `get_fuel_prices` return?+
fuel_type label, a numeric price, and the unit (EUR/l). Stations that don't carry a particular grade simply omit it from the array.Does the API cover Metro stores that don't have a gas station?+
list_stores only returns Metro locations that operate a fuel station, so stores without one are excluded. If you need a full directory of all Metro Slovakia store locations regardless of whether they have a fuel station, the API does not currently cover that. You can fork it on Parse and revise to add an endpoint for all store locations.Can I retrieve historical fuel price data?+
How do I identify which store to query in `get_fuel_prices`?+
list_stores first to get the full list of store_slug values along with their coordinates. Pass any slug directly as the store_slug parameter to get_fuel_prices to retrieve that station's current prices.