FuelPrices | Pay Per Result, Easy to Use, No Cookies
Pricing
$1.00 / 1,000 results
FuelPrices | Pay Per Result, Easy to Use, No Cookies
Get live fuel prices, diesel, and gas price data. Pay only for the results you need - no subscriptions, no commitments. Perfect for tracking local fuel costs, building comparison apps, or analyzing price trends. Pay per usage: no setup, no minimums, no subscriptions.
Pricing
$1.00 / 1,000 results
Rating
3.7
(5)
Developer
John
Maintained by CommunityActor stats
14
Bookmarked
159
Total users
36
Monthly active users
0.3 hours
Issues response
a day ago
Last modified
Categories
Share
Fuel Price Scraper
Real-time gas station prices and details by ZIP, city, or place name.
Get current fuel prices and station metadata in real time for any US location. Designed for quick setup, robust scraping, and clean outputs for analysis or downstream automation.
The coverage of this app is mostly in the United States, but does include some international locations such as Canada.
What this Actor does
- Scrapes live prices for a location and fuel type
- Returns clean station data (name, address, distance, ratings, cash/credit prices, timestamps)
- Exports CSV automatically with an optional custom filename
Common use cases:
- Price monitoring across cities/ZIP codes
- Competitive analysis for fuel retail
- Data pipelines feeding dashboards or alerts
Features
- Simple input: just provide
search(ZIP/city). This is the only mandatory input required. - Fuel selection:
fuelnumeric code (see Inputs). This is optional, but the default will be "1" (Regular Gasoline). - Freshness control:
maxAgein days. This is optional, but the default will be "0" (any age). - Localized badges/text:
lang. Currently onlyenis supported. - CSV export: set
output_file, or we generate a timestamped name.output_filemust be a filename ending in.csv(no directory paths).
Quick start
Find this Actor on the Apify Store.
In Python, see our quickstart tutorial here.
- Add the Actor to your Apify account and open it.
- Provide minimal input and run.
Example minimal input:
{"search": "11507"}
Example with options:
{"search": "New York, NY","fuel": 1,"lang": "en","maxAge": 0,"output_file": "stations_nyc.csv"}
Example using GPS coordinates (copy-paste from Google Maps):
{"search": "36.0816642, -115.0534345","fuel": 4}
Input parameters
- search (string, required): Location query - accepts ZIP code, city name, or GPS coordinates copy-pasted directly from Google Maps (e.g.,
"11507","Los Angeles","36.0816642, -115.0534345"). Coordinates resolve to the nearest named area - for example,36.0816642, -115.0534345returns stations near Henderson, Nevada. - fuel (integer, optional, default: 1): Fuel type code. Supported values are:
- lang (string, optional, default: "en"): Language code for localized fields. Current allowed value:
en. - maxAge (integer, optional, default: 0): Maximum age of price data in days. Use 0 for the freshest data available.
- output_file (string, optional): Custom CSV filename. Must match
^[^/\\]+\\.csv$(filename only,.csvextension required). If omitted, a timestamped filename is auto-generated (e.g.,gas_stations_11507_2025-08-19_11-01-12_1.csv).
Output
Results are stored in the Actor dataset and a CSV file is written to the run storage. The dataset schema includes the following key fields:
id,name,distance,priceUnit,ratingsCount,starRating- Address:
address_line1,address_line2,address_locality,address_region,address_postalCode - Prices:
price_cash,price_cash_postedTime,price_credit,price_credit_postedTime
Sample dataset item:
{"id": 123456,"name": "USA","distance": 1.2,"priceUnit": "USD/GAL","ratingsCount": 65,"starRating": 4.5,"address_line1": "222-33 Braddock Ave","address_line2": null,"address_locality": "Queens Village","address_region": "NY","address_postalCode": "11428","price_cash": 2.85,"price_cash_postedTime": "2025-08-19T10:58:00Z","price_credit": 2.95,"price_credit_postedTime": "2025-08-19T10:58:00Z"}
CSV export
- A CSV is always written. Control the name via
output_file, otherwise a timestamped default is used. - Columns include:
id,name,distance,priceUnit,ratingsCount,starRating,address_line1,address_line2,address_locality,address_region,address_postalCode,price_credit,price_credit_postedTime,price_cash,price_cash_postedTime.
Pricing
This Actor uses pay-per-result billing - you only pay for the station records returned.
| What | Cost |
|---|---|
| Per station result | $0.001 |
| 1,000 results | $1.00 |
| Typical run (15-25 stations) | ~$0.02 |
Billing is automatic - Apify charges per item pushed to the dataset. There is no charge for setup or for runs that return no results.
MCP / AI Integration
This Actor works well with Claude Code (free trial) and any MCP-compatible client via the Apify MCP server. An AI agent only needs to pass one parameter - search (a ZIP code, city name, or GPS coordinates) - and gets back structured JSON with station names, addresses, cash and credit prices, distance, and ratings. The output is ready for immediate use in pipelines, dashboards, or further analysis without any transformation.
How to connect via MCP:
- Add the Apify MCP server to your MCP client (Claude Code (free trial), Cursor, or any compatible tool).
- Search for this Actor by name and add it to your toolset.
- Call it with a
searchvalue - ZIP code, city, or GPS coordinates - and get structured station data back instantly.
You can test MCP connectivity with the Tester MCP Client Actor on Apify.
Watch: How to set up and use Apify Actors with MCP
FAQ
No results returned? The search location was not recognized or has no data available. Try a ZIP code instead of a city name - ZIP codes resolve more reliably. Check the run log for a warning message showing which search term returned no data.
What countries are supported? Primarily the United States. Some Canadian locations are covered but availability varies by area.
How fresh is the price data?
Prices are crowd-reported and updated frequently. Use the maxAge parameter to filter out stations that haven't reported prices within a certain number of days (e.g., maxAge: 3 returns only stations with prices from the last 3 days).
What fuel types are supported? Regular (1), Midgrade (2), Premium (3), Diesel (4), E85 (5), and Unleaded 88 (12).
Support
- First, check your run logs in the Apify Console for diagnostics.
- If you need help, open a discussion and we will try to respond as quickly as possible. Please include your run ID so we can quickly review the issue.
Roadmap
- Brand filtering: Search by brand or filter by brand name.
- More fuel types and payment filters: Add more fuel types and payment filters.
- Price freshness filters by hours: Add a freshness filter by hours.
- Alerts and notifications: Add alerts and notifications.
- Search by distance: Search by distance.
- Business metadata: Business metadata.
- category (e.g., gas station vs. convenience store)
- website URL, phone number
- opening hours
- neighborhood field
- Geo data
- latitude/longitude fields
- operational status and ads
- "temporarily closed" / "permanently closed"
- "is advertisement" flag
- reviews and media
- review distribution (1-5 stars breakdown)
- individual reviews
- station images
- Output formats: explicitly export Excel (XLSX) or HTML; we write CSV and dataset items (JSON via Apify dataset export)
- Provenance: explicit "scrape timestamp" and "search query used" fields in each record (only price postedTime from source, not scrape time)
n8n integration
Available as an n8n community node, n8n-nodes-fuel-prices-api. In n8n, open Settings, Community Nodes, install n8n-nodes-fuel-prices-api, then use the Fuel Prices node in any workflow (it also works as an AI Agent tool).
🔌 Integrations: turn this fuel prices API into a recurring price feed
A one-off run answers "what does regular cost in 11507 right now". The value compounds when the same gas prices API runs on a schedule and drops fresh rows into whatever you already use.
Tasks: save an input once, reuse it forever.
Save a location plus a fuel code as a Task (for example search: "77002", fuel: 4) and you can rerun
it from the Console, the API, or a schedule without retyping anything. Every published example under
Applications below is a Task you can copy into your own account.
Schedules: gas price monitoring on a cron. Attach a cron schedule to a Task and you have fuel price monitoring with no server to run:
| Cadence | Cron | Typical use |
|---|---|---|
| Every morning at 6am | 0 6 * * * | Daily per-station snapshot for one metro |
| Every 6 hours | 0 */6 * * * | Intraday movement on a busy corridor |
| Every Monday at 7am | 0 7 * * 1 | Weekly price sheet for a fleet or route planner |
Each run appends a fresh dataset, so consecutive runs give you your own time series even though a single run only ever returns live prices.
Webhooks: push results the moment a run finishes.
Add a webhook on ACTOR.RUN.SUCCEEDED pointing at your endpoint. Apify posts the run id and the dataset
id, and you pull price_credit, price_cash, and address_postalCode from there. See the
webhook docs.
n8n, Make, and Zapier.
The dedicated n8n community node is
n8n-nodes-fuel-prices-api (Settings, Community
Nodes, install n8n-nodes-fuel-prices-api). For Make or Zapier, use the Apify app and point the
"Run Actor" step at johnvc/fuelprices, then map name, price_credit, and price_cash into a sheet,
a Slack alert, or a database row.
MCP: let an agent ask for prices in plain language. Point any MCP client at the Apify MCP server and the Actor becomes a tool an agent can call directly. Claude Code (free trial) works well for this, and the diesel Task pages below were all built to be called this way.
Python: real time gas prices in about ten lines.
from apify_client import ApifyClientclient = ApifyClient("<YOUR_APIFY_TOKEN>")run = client.actor("johnvc/fuelprices").call(run_input={"search": "77002","fuel": 4,"maxAge": 3,})for station in client.dataset(run.default_dataset_id).iterate_items():print(station["name"],station["address_line1"],station["address_postalCode"],station["price_credit"],station["price_cash"],station["price_credit_postedTime"],)
Swap search for a city ("Los Angeles") or a GPS pair copied out of Google Maps and the same script
keeps working. Loop it over a list of ZIP codes and you have multi-market fuel price monitoring.
Applications
These are published, ready-to-run example Tasks. Open one, hit Start, and you get live per-station rows back with no configuration.
Find gas station prices by ZIP code
The core use case: pass a ZIP and get every nearby station with its cash and credit price. This is the one to copy if you want gas prices by zip code in a spreadsheet. Run it
Find live gas prices in any US city by fuel type
Takes a city name plus a fuel code, so the same Task covers Regular, Premium, Diesel, or E85 by
changing one number.
Run it
Find gas prices near GPS map coordinates
Paste a latitude and longitude straight out of Google Maps. Useful when you are pricing a route or a site that has no clean ZIP. Run it
Fetch gas prices in Los Angeles, California by API
A worked California metro example, wired for programmatic calls. Run it
Fetch gas prices in Houston, Texas by API
Texas metro pricing, the usual starting point for fleet and logistics cost models. Run it
Fetch gas prices in New York by API
Dense-market example where per-station spread is widest. Run it
Fetch gas prices in Chicago, Illinois by API
Midwest metro coverage, same shape of output as every other city Task. Run it
Fetch diesel prices in Dallas, Texas by MCP
Same Actor with fuel: 4, set up to be called from an MCP client instead of the Console.
Run it
Fetch diesel prices in Phoenix, Arizona by MCP
An agent-callable Southwest example, handy for cross-metro comparisons. Run it
Twenty-five example Tasks are published in total. Browse them all on the Actor's Examples tab.
🔗 Related Tools
This Actor returns prices. These pair with it when you need the parts it deliberately does not carry.
- Google Maps Places API fills in the
station metadata this Actor does not return: phone, website, and opening hours. Match on
nameplusaddress_line1and you get a full station profile. - Google Maps Directions API turns a list of priced stations into a routing decision, which is how you answer "is the cheaper station actually cheaper after the detour".
- Google Finance API covers the wholesale and commodity side. Retail pump prices lag crude, so pairing the two explains the moves you see at the station level.
- Google News API picks up refinery outages, storm disruptions, and tax changes, which is usually the reason a regional price series jumps.
For contrast, there is also a state-level gas price Actor on the Store that returns one averaged row per state (11 total users and no monthly users at the time of writing). If a state average is all you need, it is a fine choice. It cannot tell you what the station on the next corner is charging, which is the specific thing this Actor exists to answer.
More questions
Is this a GasBuddy API?
No. This is an independent API and it is not affiliated with, endorsed by, or connected to GasBuddy. People usually run that search because they want a developer-friendly way to pull the same kind of data: live, per station retail fuel prices. That is what this API returns. Pass a ZIP code, a city, or GPS coordinates, and every nearby station comes back with its name, full address, price_credit and price_cash for the fuel grade you asked for, the time each price was posted, the distance from your search point, and the station's starRating and ratingsCount. Two honest limits worth knowing before you build on it: it returns currently posted prices only, so there is no price history and no regional or national averages, and it does not return station amenities.
How do I get gas prices by ZIP code as an API instead of a consumer app?
Pass the ZIP as search and read the dataset. You get one row per nearby
filling station with name, address_line1,
address_postalCode, price_cash, price_credit, and the postedTime for each price. Consumer apps
render that on a map; this returns it as JSON or CSV you can put in a pipeline.
ZIP codes resolve more reliably than city names, so prefer them
when you have a choice.
What is the best fuel prices API for real time, per station retail prices?
Most fuel price API vendors sell national or state averages, or wholesale and commodity prices. Those are
different products. If what you need is real time gas prices at the individual station level, filtered by
ZIP, city, or GPS, that is the narrow job this fuel price API does, and it is why the output carries
distance and a per-station address rather than a regional index.
Do I need to build my own gas price scraper?
You can, and then you own the proxies, the retries, the layout changes, and the on-call. Running this instead costs $0.001 per station row and returns clean fields. A typical metro run of 15 to 25 stations lands around two cents. There is no charge for a run that returns nothing.
Can I call this from an MCP client or from Claude Code?
Yes. Add the Apify MCP server to your client, add this Actor to the toolset, and
an agent can ask for prices by location in plain language.
Claude Code (free trial) and Cursor both work. The only required
argument is search, which keeps the tool call simple enough that agents rarely get it wrong.
How can I set up gas price monitoring across multiple ZIP codes?
Save one Task per ZIP, or loop a list of ZIP codes in the Python snippet above, then put the whole thing on a schedule. Because every run appends its own dataset, the accumulated runs become the history. The Actor itself returns live prices only, so the schedule is what builds the series.
Does the output include cash and credit prices separately?
Yes. price_cash and price_credit are separate fields, each with its own timestamp
(price_cash_postedTime, price_credit_postedTime). Some stations report only one of the two, in which
case the other is null. Sort on either to find the cheapest station in the returned set.
How do I get E85 prices by ZIP code instead of a national average?
Set fuel to 5 and pass the ZIP as search. E85 coverage is thinner than regular gasoline because
fewer stations carry it, so expect fewer rows back. The same trick works for Diesel (4), Premium (3),
and Unleaded 88 (12).
Can I export live gas prices data to CSV or a spreadsheet?
A CSV is written on every run, and you can name it with output_file. The dataset also exports to CSV,
JSON, XLSX, and a few other formats from the Console or the API, which is the fastest way to get gas
prices data into Sheets or Excel.
Why do some stations show a price from several days ago?
Prices are crowd-reported, and quiet stations get reported less often. Set maxAge to the number of days
you are willing to accept (for example maxAge: 2) and stale stations drop out of the results.
Where does this price data come from?
The prices are crowd-reported by drivers and posted publicly on GasBuddy, which is
the public source this API reads. To be clear about what that means: this is an independent API, not affiliated
with, endorsed by, or connected to GasBuddy, and it does not try to mirror what that site does. It does one job.
Give it a ZIP, a city, or a GPS pair and it hands back the stations near that point with name, the address
fields, price_credit and price_cash, the time each price was posted, distance, and the station's
starRating and ratingsCount. Currently posted prices only, so there is no price history and no state or
national averages in the output.
How is this different from looking prices up on GasBuddy by hand?
It is mostly the difference between reading a page and getting a table. Checking GasBuddy yourself works fine for one trip and one station. It stops working at forty ZIP codes twice a day, or when the prices need to land in a database instead of on a screen. This API (again: independent, not affiliated with or endorsed by GasBuddy) returns per-station retail prices as rows you can sort, diff, and put on a schedule. Nothing here beats a person for browsing. It beats a person on the hundredth ZIP code.
Data source and posture
Worth saying plainly, because it comes up in support: the retail prices this Actor returns are the crowd-reported prices posted publicly at GasBuddy. This project is an independent API. It is not affiliated with GasBuddy, it is not endorsed by GasBuddy, and it makes no claim to match that site's feature set. GasBuddy is a consumer product with its own apps, rewards, trip planning, and station pages. This is a data endpoint: live per-station prices by ZIP, city, or GPS, returned as JSON or CSV. If you want a station's amenities, a price chart for the past month, or a national average, you will not get any of those here. If you want to know what regular costs at the stations nearest 77002 right now, and you want it inside a pipeline, that is what it was built for.
Last Updated: 2026.07.14