GasBuddy APIgasbuddy.com ↗
Search gas station prices by area and fuel type, then fetch detailed station info including amenities, ratings, and reviews via the GasBuddy API.
What is the GasBuddy API?
The GasBuddy API covers 2 endpoints for retrieving real-time gas price data across US locations. Use search_gas_prices to get up to 20 stations sorted by price for any city and fuel type, then drill into a specific station with get_station to retrieve fuel grades, amenities, coordinates, customer reviews, and phone number — all keyed by GasBuddy's numeric station ID.
curl -X GET 'https://api.parse.bot/scraper/a71391a0-8e09-4599-ba13-eb2cc981e986/search_gas_prices?area=austin&fuel_type=regular®ion_code=TX' \ -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 gasbuddy-com-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: GasBuddy SDK — bounded, re-runnable; every call capped."""
from parse_apis.gasbuddy_com_api import GasBuddy, FuelType, StationNotFound
client = GasBuddy()
# Search for cheap regular gas in Austin, TX
for station in client.station_summaries.search(area="austin", region_code="TX", fuel_type=FuelType.REGULAR, limit=3):
print(station.name, station.brand, station.prices[0].credit_price)
# Drill down into the first result for full details
hit = client.station_summaries.search(area="austin", region_code="TX", limit=1).first()
if hit:
full = hit.details()
print(full.name, full.star_rating, full.amenities[:3])
for price in full.prices:
print(price.fuel_product, price.cash_price, price.credit_price)
# Fetch a station directly by ID with error handling
try:
station = client.stations.get(station_id="215189")
print(station.name, station.address.locality, station.address.region)
except StationNotFound as e:
print(f"Station not found: {e.station_id}")
print("exercised: station_summaries.search / StationSummary.details / stations.get")
Search gas stations and their prices in a given area. Returns up to 20 stations sorted by price, each with current fuel prices, address, brand, and coordinates. Results are a single page of the top stations for the area.
| Param | Type | Description |
|---|---|---|
| arearequired | string | City or locality name (e.g. 'austin', 'los angeles'). Spaces are converted to hyphens internally. |
| fuel_type | string | Type of fuel to search prices for. |
| region_coderequired | string | US state code, two uppercase letters (e.g. 'TX', 'CA'). |
{
"type": "object",
"fields": {
"stations": "array of station objects with prices",
"fuel_type": "string — the fuel type queried",
"display_name": "string — the resolved area display name"
},
"sample": {
"data": {
"stations": [
{
"id": "215189",
"name": "Minimax Travel Center",
"brand": "Shell",
"prices": [
{
"cash_price": 3.28,
"posted_time": "2026-07-27T14:39:17.690Z",
"credit_price": 3.48,
"fuel_product": "regular_gas"
}
],
"address": {
"line1": "13320 US-290 Unit #100",
"region": "TX",
"country": "US",
"locality": "Manor",
"postal_code": "78653"
},
"latitude": 30.350422403814,
"longitude": -97.517038272821
}
],
"fuel_type": "regular",
"display_name": "Austin"
},
"status": "success"
}
}About the GasBuddy API
Search Gas Prices by Area
search_gas_prices accepts a area string (city or locality name) and a two-letter region_code (US state abbreviation such as TX or CA), with an optional fuel_type filter. It returns up to 20 station objects sorted by price, each carrying current fuel prices, brand name, address, and coordinates. The display_name field confirms how GasBuddy resolved the location, which is useful when input names are ambiguous. Results represent a single page — there is no pagination parameter.
Station Detail
get_station takes a numeric station_id obtained from a search_gas_prices response and returns a full station record. The response includes a structured address object (line1, line2, locality, region, postal_code, country), a prices array covering all available fuel grades, a fuels array listing supported fuel types, an amenities array, a reviews array with customer text, aggregate ratings, and latitude/longitude coordinates. The brand field may be null for independent stations.
Data Scope and Identifiers
Station IDs are GasBuddy-specific numeric strings (e.g. 215189). They are stable references that can be stored and reused for subsequent get_station calls without re-running a search. Coverage is limited to US locations — the region_code parameter accepts only US state codes. Price freshness reflects community-reported data as aggregated by GasBuddy.
The GasBuddy API is a managed, monitored endpoint for gasbuddy.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when gasbuddy.com 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 gasbuddy.com 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?+
- Display a ranked list of cheapest nearby stations for a given city and fuel type in a mobile app
- Monitor regular unleaded or diesel price trends across multiple Texas cities using search_gas_prices with region_code TX
- Build a route-planning tool that surfaces low-cost stations along a highway corridor by querying multiple area/region_code pairs
- Populate a station detail page with amenities, phone number, and customer reviews from get_station
- Aggregate and compare fuel prices across competing brands in a metropolitan area
- Alert users when prices at a saved station_id drop below a threshold by polling get_station periodically
| 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.