GasBuddy Stations API Documentation Search fuel stations by ZIP, city or coordinates. Prices are numbers with a currency, ids work unchanged in the station route, dates use ISO 8601 and image URLs are full size. US uses USD per gallon and Canada uses CAD cents per litre. 1 credit per request. Failed and empty results are never billed. An empty result returns a hint with a city and state or lat and lng.
Run this endpoint
Endpoint
Parameters
Start with the required fields, then add optional filters only when your use case needs them.
Runnable path
This endpoint has no required query parameters.
7 optional filters available.
string
Optional
ZIP code or City, ST. Send search or both lat and lng
example
number
Optional
Latitude, send with lng instead of search
10
number
Optional
Longitude, send with lat instead of search
10
integer
Optional
Fuel id: 1 regular, 2 midgrade, 3 premium, 4 diesel, 5 E85, 12 UNL88
10
integer
Optional
Brand id from a GasBuddy search result
1234567890
integer
Optional
Maximum price age in hours, 0 means no limit
10
string
Optional
Pagination token from a previous stations cursor.next
0
Response Schema
Example response fields are illustrative; inspect the JSON before integrating.
Example response fields
Scan these fields before integrating.
data
meta
success
{
"data": {
"trends": [
{
"today": 3.19,
"trend": "steady",
"country": "US",
"areaName": "Arizona",
"todayLow": 3.05
}
],
"stations": {
"count": 2,
"cursor": {
"next": "1"
},
"results": [
{
"id": 205033,
"name": "Sunoco",
"brands": [
{
"name": "Shell",
"brandId": 122,
"imageUrl": "https://example.com/brand.png"
}
],
"prices": [
{
"cash": {
"price": 4.15,
"postedTime": "2026-11-16T22:08:51.514Z"
},
"price": 4.15,
"fuelProduct": "regular",
"formattedPrice": "$4.15"
}
],
"currency": "USD",
"priceUnit": "dollars_per_gallon",
"starRating": 4.2,
"ratingsCount": 87
}
]
},
"countryCode": "US",
"displayName": "85396"
},
"meta": {
"billable": true,
"endpoint_family": "stations"
},
"success": true
}
Errors
Handle these documented responses before retrying or showing customer-facing failures.
Validation Error
Send search or both lat and lng, or use an unsupported fuel id. Failed requests are not billed.
Temporarily Unavailable
Fuel price data is temporarily unreachable. Failed requests are not billed.
Generate Code with AI
Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.
Try It Live
Test this endpoint in our interactive playground with real data.