Base URL
https://api.it-stacks.com/fuelAll endpoints are relative to this base URL. HTTPS only.
Authentication
All requests require an API key passed as a Bearer token in the Authorization header.
Authorization: Bearer YOUR_API_KEYGet your API key from the dashboard. Keys are scoped per service — a QR Code key will not work against the Fuel API.
Endpoints
GET
https://api.it-stacks.com/fuel/pricesGet current fuel prices for stations near a UK postcode.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
postcode | string | Yes | Full or partial UK postcode (e.g. BB7 or BB7 1AB) |
radius | integer | No | Search radius in miles (default: 5, max: 25) |
fuel_type | string | No | Filter by fuel type: petrol, diesel, or ev |
Example request
GET https://api.it-stacks.com/fuel/prices?postcode=BB7&radius=5Example response
{
"postcode": "BB7",
"radius_miles": 5,
"stations": [
{
"id": "stn_001",
"name": "Tesco Clitheroe",
"address": "Whalley Road, Clitheroe, BB7 1AB",
"distance_miles": 0.4,
"prices": {
"petrol": 142.9,
"diesel": 150.2
},
"updated_at": "2026-03-24T10:00:00Z"
}
]
}GET
https://api.it-stacks.com/fuel/station/{id}Get full price details for a specific station by its ID.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Station ID returned from /prices or /nearby |
Example request
GET https://api.it-stacks.com/fuel/station/stn_001Example response
{
"id": "stn_001",
"name": "Tesco Clitheroe",
"address": "Whalley Road, Clitheroe, BB7 1AB",
"coordinates": { "lat": 53.869, "lng": -2.392 },
"prices": {
"petrol": 142.9,
"diesel": 150.2,
"ev_per_kwh": null
},
"updated_at": "2026-03-24T10:00:00Z"
}GET
https://api.it-stacks.com/fuel/nearbyGet stations near a set of GPS coordinates.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
lat | float | Yes | Latitude (decimal degrees) |
lng | float | Yes | Longitude (decimal degrees) |
radius | integer | No | Search radius in miles (default: 5, max: 25) |
fuel_type | string | No | Filter by fuel type: petrol, diesel, or ev |
Example request
GET https://api.it-stacks.com/fuel/nearby?lat=53.869&lng=-2.392&radius=3Example response
{
"stations": [
{
"id": "stn_001",
"name": "Tesco Clitheroe",
"distance_miles": 0.4,
"prices": {
"petrol": 142.9,
"diesel": 150.2
}
}
]
}Rate limits
Requests exceeding your plan limit return HTTP 429. Limits reset monthly.
| Plan | Limit |
|---|---|
| Free | 1,000 requests / month |
| Pro | 50,000 requests / month |
| Enterprise | Unlimited |
Error codes
| Code | Meaning |
|---|---|
400 | Missing or invalid parameters |
401 | Missing or invalid API key |
404 | Station not found |
429 | Rate limit exceeded |
500 | Internal server error |
