GasBuddy Fuel Prices Scraper — Stations, All Grades, Batch avatar

GasBuddy Fuel Prices Scraper — Stations, All Grades, Batch

Pricing

from $1.50 / 1,000 station results

Go to Apify Store
GasBuddy Fuel Prices Scraper — Stations, All Grades, Batch

GasBuddy Fuel Prices Scraper — Stations, All Grades, Batch

Scrape live US gas-station fuel prices from GasBuddy — batch many ZIPs or cities in one run and get EVERY grade (Regular, Midgrade, Premium, Diesel) per station in a single pass, plus ratings, brands, offers, outage status, distance and per-price posted time. JSON, CSV or Excel.

Pricing

from $1.50 / 1,000 station results

Rating

0.0

(0)

Developer

Muhamed Didovic

Muhamed Didovic

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

5 days ago

Last modified

Share

GasBuddy Fuel Prices Scraper 🛢️⛽

Scrape US gas-station fuel prices from GasBuddy — batch many ZIP codes and cities in a single run, and get every fuel grade at every station in one pass (Regular, Midgrade, Premium, Diesel), each with cash & credit price, the time it was posted and the member who posted it. Plus full station enrichment: ratings, brands, Pay-with-GasBuddy availability, offers/discounts, emergency/outage status, distance and address.

Built to be a drop-in, richer, better-value replacement for one-grade-per-run fuel-price scrapers.


✨ Why use this scraper (3 differentiators + transparent pricing)

This actorTypical competitor (e.g. johnvc/fuelprices)
1. Batch multi-locationPut dozens of ZIPs/cities in one search array, one run covers them all, stations de-duplicated by id across overlapsUsually one location per run
2. Every fuel grade in one passAll grades returned per station in a single request — no need to re-run per gradeOften one grade per run
3. Full station enrichmentratings, ratingsCount, brands, payStatus, offers/discounts, emergency/outage status, distance, address, and per-price posted time + posting memberUsually just name/address + price
PricingPay-per-result: $0.0015 per fully-enriched station row — you pay only for stations you actually get~$0.001/row for a thinner schema
Output shapeOne clean flat row per station with a nested prices object keyed by gradeVaries

Transparent, usage-based pricing: $0.07 per run start (this covers the live Cloudflare bypass — a managed CAPTCHA solve + residential proxy — that every run needs to reach GasBuddy's price data) + $0.0015 per station row. No monthly rental, no per-grade multiplication. A 100-station run costs about $0.22; a big multi-city run amortizes the start fee to noise. The actor prints a 💰 cost preview at the start of every run so you know the ceiling before it spends anything.


📥 Input

FieldTypeDescription
searcharrayUS locations — ZIP codes, city names, or "city, ST". One run covers every entry. Same field competitors use, so migration is drop-in. E.g. ["90210", "Austin, TX", "10001"]
fuelselectPrimary grade that drives the sort — Regular (default), Midgrade, Premium, Diesel. Every grade is still returned per station regardless of this.
lat / lngnumberOptional coordinate search (provide both).
maxStationsPerSearchintegerCap on stations per search location. Default 100.
maxPagesintegerCap on cursor pages walked per location. Default 10.
maxItemsintegerHard cap on total rows across all locations. Default 1000.
maxRetriesintegerPer-page retries on a Cloudflare challenge, each on a fresh proxy session. Default 5.
proxyproxyResidential proxies are mandatory (see below). Defaults to Apify Proxy RESIDENTIAL.

Example input

{
"search": ["90210", "Austin, TX", "10001"],
"fuel": "Regular",
"maxStationsPerSearch": 50,
"maxPages": 5,
"maxItems": 500,
"proxy": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}

📤 Output

One clean, flat row per station. Prices are nested under prices, keyed by grade.

{
"searchTerm": "90210",
"primaryFuel": "Regular",
"stationId": "6258",
"name": "76",
"brand": "76",
"brands": [{ "brandId": 15, "name": "76", "imageUrl": "https://images.gasbuddy.io/b/15.png", "brandingType": "fuel" }],
"address": {
"line1": "427 N Crescent Dr", "line2": "", "city": "Beverly Hills",
"state": "CA", "postalCode": "90210-4815", "country": "US",
"full": "427 N Crescent Dr, Beverly Hills, CA, 90210-4815"
},
"distance": "0.4 mi",
"starRating": 4.2,
"ratingsCount": 74,
"payAvailable": true,
"offers": [{ "id": "…", "use": "…", "discounts": [{ "grades": ["regular_gas"], "pwgbDiscount": 0.25, "receiptDiscount": null }] }],
"emergencyStatus": { "hasGas": null, "hasDiesel": null, "hasPower": null },
"hasActiveOutage": false,
"enterprise": false,
"fuels": ["regular_gas", "midgrade_gas", "premium_gas", "diesel"],
"priceUnit": "dollars_per_gallon",
"prices": {
"Regular": { "fuelProduct": 1, "grade": "Regular", "cash": { "price": 4.99, "postedTime": "2026-07-20T15:03:00Z", "member": "fuelfan22" }, "credit": { "price": 5.09, "postedTime": "…", "member": "…" }, "discount": null },
"Premium": { "fuelProduct": 3, "grade": "Premium", "cash": { "price": 5.49, "postedTime": "…", "member": "…" }, "credit": null, "discount": null },
"Diesel": { "fuelProduct": 4, "grade": "Diesel", "cash": { "price": 5.29, "postedTime": "…", "member": "…" }, "credit": null, "discount": null }
},
"searchCentroid": { "displayName": "90210", "latitude": 34.09, "longitude": -118.41, "regionCode": "CA", "countryCode": "US" },
"stationUrl": "https://www.gasbuddy.com/station/6258",
"scrapedAt": "2026-07-20T15:04:11.000Z"
}

Export as JSON, CSV, or Excel from the run's dataset.


⚙️ How it works

How it works — GasBuddy Fuel Prices Scraper: search → Cloudflare bypass & GraphQL fetch → one enriched station row per station

GasBuddy serves all of its station + price data from a single GraphQL operation (LocationBySearchTerm). The whole domain is behind a Cloudflare interactive challenge, and the /graphql price endpoint adds a second Fastly edge gate that requires a per-page CSRF token. This actor clears both — pure HTTP, no headless browser: it solves the Cloudflare challenge to mint a cf_clearance cookie, pins the residential exit IP so the cleared session stays valid, scrapes the page's gbcsrf token, and calls the GraphQL endpoint with the exact headers the web app uses — then paginates through stations.cursor.next. Stations are de-duplicated by id across overlapping searches. Residential proxies are mandatory. If a session is blocked it is rotated and retried automatically (maxRetries); a systemically blocked run fails loudly rather than silently returning zero rows, so you are never billed for a dead run.


❓ FAQ

Which fuel grades are included? Regular (87), Midgrade (89), Premium (91–93) and Diesel — all of them, per station, in one pass. The fuel input only sets the sort key.

Do I really get cash and credit prices? Yes — each grade in prices carries a cash and a credit entry (when the station reports both), each with the posted time and the GasBuddy member who posted it.

Can I scrape many cities at once? Yes — that's the point. Put every ZIP/city in the search array; one run covers them all and de-duplicates stations by id.

How much does it cost? $0.07 per run (covers the per-run Cloudflare bypass) + $0.0015 per station row. A cost preview is logged at the start of every run, so you always see the ceiling before it spends.

Do I need my own proxies? No — the actor defaults to Apify RESIDENTIAL. Residential is required; datacenter IPs will be challenged.

Why did my run return 0 rows? Either the ZIP has no GasBuddy coverage (finishes SUCCEEDED with a notice) or every session was blocked by Cloudflare (fails loudly — retry with residential proxies).


🔎 SEO keywords

gas prices scraper, fuel price api, gasbuddy scraper, gas station data, fuel prices scraper, gas price api, gasoline prices scraper, diesel price scraper, us gas prices, station level fuel prices, gasbuddy data extraction, gas price monitoring, fuel price tracker, cheapest gas near me data, gas station locator api


⚠️ Disclaimer

This actor is an independent tool and is not affiliated with, endorsed by, or sponsored by GasBuddy or any of its brands. "GasBuddy" and all brand names are trademarks of their respective owners. Fuel-price data on GasBuddy is crowd-sourced and may be delayed or inaccurate; verify prices at the pump. Use this actor in compliance with applicable laws, GasBuddy's terms, and only for data you are permitted to collect. You are responsible for how you use the collected data.