Gas prices

Live US gas prices. Parsed JSON. One flat-rate call.

POST /v1/scrape/gas-prices 10 credits Site-specific

Live US fuel prices for any ZIP or city/state combination. Returns structured JSON with brand, address, price, reporter, freshness, and the state-level low/average, not HTML you still have to parse. Supports the five fuel grades: regular, midgrade, premium, diesel, and E85.

The hard part

Public fuel-price listings are awkward to consume programmatically, and some markets sit behind a cookie banner. Other scraping APIs hand you raw HTML and an invoice for their AI extraction add-on. We ship clean, parsed JSON instead. One flat credit cost, one stable schema.

What it does

  • All five fuel grades via `grade=regular|midgrade|premium|diesel|e85`.
  • Structured station data: brand, sub-brand, station_id, address, city, state, price, reporter, freshness.
  • State-level stats: lowest plus average for the requested grade.
  • Accepts a 5-digit ZIP, ZIP+4, `City, ST`, or `City, State` (no separate geocoder call).
  • 10 credits flat. Cache hits 1 credit. Failures don't bill.

Send a call

curl -X POST https://scrapenest.dev/v1/scrape/gas-prices \
  -H "Authorization: Bearer sn_••••" \
  -H "Content-Type: application/json" \
  -d '{
        "location": "37122",
        "grade": "regular"
      }'

Request body

{
  "location": "37122",
  "grade": "regular",
  "limit": 20
}

Response shape

{
  "location": {
    "query": "37122",
    "zip": "37122",
    "city": null,
    "state": "TN"
  },
  "grade": "regular",
  "stations": [
    {
      "brand": "Kroger",
      "sub_brand": "Kroger Fuel Center",
      "station_id": "21847",
      "address": "401 S Mt Juliet Rd",
      "city": "Mount Juliet",
      "state": "TN",
      "price": 2.79,
      "currency": "USD",
      "unit": "USD/gallon",
      "reporter": "anon_18234",
      "updated_relative": "37 Minutes Ago"
    }
  ],
  "region_stats": {
    "state": "TN",
    "region": "Tennessee",
    "region_type": "state",
    "lowest_price": 2.69,
    "average_price": 2.95
  },
  "source_url": "https://scrapenest.dev",
  "fetched_at": "2026-05-19T14:30:00Z",
  "took_ms": 4823,
  "cache_hit": false,
  "credits_charged": 10
}

What it costs

10 credits flat. Cache hits bill at 1 credit. The cache TTL defaults to 10 minutes (prices change slowly); override via `cache_ttl_seconds` up to 1 hour.

  • Pricing freshness is reporter-driven: stations update every few minutes to several hours. The `updated_relative` field on each station tells you how stale that specific price is.
  • Stations without a reported price for the requested grade are omitted from the response (the source shows them as `- - -`).

questions

Gas prices FAQ

How do I get gas prices by ZIP code?

POST a 5-digit ZIP as the location and you get back the stations near it with their current per-gallon price, brand, and street address as JSON. The endpoint also accepts ZIP+4, "City, ST", and "City, State", so you don't need to run a geocoder first.

Is there a free gas prices API?

You can call this one on the free tier: every account starts with 1,000 credits a month and no card, and a gas-price lookup costs 10 credits (1 on a cache hit). That's roughly 100 fresh lookups a month before you pay anything.

Which fuel grades are available?

All five: regular, midgrade, premium, diesel, and E85. Pass the one you want as `grade`. Stations that haven't reported a price for that grade are left out of the response rather than returned with a null price.

How current are the prices?

Prices are crowd-reported, so freshness varies by station — anywhere from a few minutes to several hours old. Every station carries an `updated_relative` field so you can see exactly how stale that specific price is and drop anything past your own threshold.

Do I get state or regional averages too?

Yes. Alongside the station list, every response includes a `region_stats` block with the lowest and average price for the requested grade, so you can show a local price against its benchmark without a second call.