John Cole

Jul 02, 2026 • 3 min read

How to Get Live Gas Prices by ZIP, City, or GPS with One API

A pay-per-result fuel prices API on Apify that returns station-level gas and diesel data as JSON or CSV, and plugs into Claude over MCP.

How to Get Live Gas Prices by ZIP, City, or GPS with One API

Gas prices change daily, sometimes hourly, and there has never been an easy public API for them. If you want to know what regular unleaded costs across Dallas right now, your options are scraping a consumer app yourself or paying for an enterprise data feed. I wanted a third option, so I built one.

FuelPrices is a fuel prices API that runs on Apify. Give it a US ZIP code, a city name, or GPS coordinates, and it returns live gas station prices as structured data. No subscription; it costs $1 per 1,000 stations returned.

What it returns

Each result is one row of gas station data:

  • Station name and street address

  • Distance from your search point

  • User rating

  • Cash and credit prices for the grade you asked for

  • The timestamp each price was posted

It covers six fuel grades: Regular, Midgrade, Premium, Diesel, E85, and Unleaded 88. A freshness filter drops stations whose prices are older than a set number of days, and every run can write a CSV alongside the JSON dataset.

Run it in three steps

  1. Open the Actor on Apify and enter a location. "11507", "Austin", and "36.08, -115.05" all work.

  2. Pick a fuel type. Regular is the default.

  3. Hit Run. Results land in a dataset you can read in the console, download as CSV, or pull from the REST API.

If you would rather start from a working configuration, find gas station prices by ZIP code is the fastest example to try: it returns every station near a ZIP so you can spot the cheapest gas in seconds.

Use it as a REST API

Every Apify Actor is also an HTTP endpoint. Start a run with one POST request, then read the dataset items as JSON. The gas prices in New York by API example shows the exact call, ready to copy into your app, a cron job, or a dashboard.

Wire it into Claude with MCP

This is the part I use most. The Actor is exposed over MCP (Model Context Protocol), so any MCP-compatible AI client, Claude included, can call it as a tool. Once connected, you just ask in plain language: "what do diesel prices look like around Dallas right now?" The assistant runs the Actor and hands back structured station rows. No scraping code, no manual exports. The diesel prices in Dallas by MCP example is a working setup.

What people build with it

  • Price trackers that watch a set of ZIP codes and alert on drops

  • Fleet and delivery dashboards that budget diesel by route

  • Competitive benchmarking for fuel retailers

  • Price-comparison features inside consumer apps

25 ready-made examples

The Actor ships with 25 runnable examples covering major US cities, by API and by MCP. Each one opens pre-configured, so you can run it without writing any input. Browse them on the Examples page or see the full write-up on my Peerlist project.

FAQ About Scraping Gas Prices

What does the FuelPrices API cost?

$1 per 1,000 results, pay per event. No subscription, no monthly minimum.

Does it cover my area?

Any US ZIP code, city, or GPS point, with some Canadian coverage.

Can AI assistants use it?

Yes. It runs over MCP, so Claude and other MCP clients can call it directly as a tool.

Can I call it as a REST API?

Yes. Start a run with one POST request and read the dataset items as JSON; the New York example shows the exact call.

If you try it and something is off, open an issue on the Actor page. I answer within a day.

Join John on Peerlist!

Join amazing folks like John and thousands of other builders on Peerlist.

peerlist.io/

It’s available... this username is available! 😃

Claim your username before it's too late!

This username is already taken, you’re a little late.😐

0

0

0