Apify gas prices api
Skill johnisanerd/claude-skill-gas-prices-api/apify-gas-prices-api
Turn live US fuel prices into a gas prices API with the Apify Fuel Prices Scraper Actor (johnvc/fuelprices). Give a ZIP code, city, or GPS coordinates plus a fuel type (Regular, Midgrade, Premium, Diesel, E85, Unleaded88) and get one row per station with name, address, starRating, ratingsCount, cash and credit prices, and the time each price was posted. Use when the user wants a gas prices api, fuel prices api, gas price api, gas prices by zip code, real time gas prices as JSON or CSV, gas price data for an app or pipeline, or per-station fuel price extraction. Pay-per-result billing, MCP-ready for Claude and other AI agents.From its SKILL.md
npx -y skills add johnisanerd/claude-skill-gas-prices-api --skill apify-gas-prices-apiAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
3 things to look at
- 27 days oldThe repository was created 27 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
6.2 KB, ~1.5k tokens by cl100k_base, as published. Nobody here has run it
Gas Prices API: Live Per-Station Fuel Prices to Structured JSON
Use the Apify Fuel Prices Scraper as a gas prices API. One call takes a US ZIP code, city, or GPS coordinates plus a fuel type and returns one flat row per station: name, full address, ratings, cash price, credit price, and the timestamp each price was last posted.
When to use this skill
- The user wants a gas prices API or fuel prices API for an app, script, or pipeline.
- They want gas prices by ZIP code, city, or coordinates as JSON or CSV.
- They want real time per-station prices for a specific fuel: Regular, Midgrade, Premium, Diesel, E85, or Unleaded88.
- They ask to "get gas price data", "pull fuel prices", or "export gas station prices".
Not for: historical price series (live prices only), national or state averages (per-station only), or station amenities such as phone, hours, or websites (not in the output).
What you get (one row per station)
id, name, priceUnit (dollars_per_gallon), starRating, ratingsCount, address_line1, address_line2, address_locality, address_region, address_postalCode, price_cash, price_cash_postedTime, price_credit, price_credit_postedTime, and distance (returned null on ZIP searches in testing, so do not rely on it). Prices of 0 or null with a null postedTime mean the station has no recent report for that payment type.
Prerequisites
- Apify account (sign up at https://apify.com?fpr=9n7kx3&fp_sid=skillrepo).
- Authentication via
apify login, or anAPIFY_TOKENenvironment variable (Apify Console, Settings, Integrations).
The Actor
- Store page: https://apify.com/johnvc/fuelprices?fpr=9n7kx3&fp_sid=skillrepo
- Actor ID:
johnvc/fuelprices - Pricing: pay per station result returned (see
references/gotchas.md).
Run it with the Apify CLI
Regular gas prices for a ZIP code:
apify actors call "johnvc/fuelprices" -i '{"search":"11507","fuel":1}' \
--json \
--user-agent apify-awesome-skills/apify-gas-prices-api \
2>/dev/null
Diesel prices near GPS coordinates, fresh within two days:
apify actors call "johnvc/fuelprices" -i '{"search":"36.0816642, -115.0534345","fuel":4,"maxAge":2}' \
--json \
--user-agent apify-awesome-skills/apify-gas-prices-api \
2>/dev/null
Every call carries the three flags this repo expects: --json, --user-agent apify-awesome-skills/apify-gas-prices-api, and 2>/dev/null.
Run it from Claude or another AI agent (MCP)
The Actor is MCP-ready. Add the hosted server URL:
https://mcp.apify.com/?tools=actors,docs,johnvc/fuelprices
Then ask, for example: "Get diesel prices by ZIP code 75201 and export the stations as CSV." MCP setup docs: https://docs.apify.com/platform/integrations/mcp
Workflow
- Build the location.
searchis the only required field: a ZIP code, a city name, or GPS coordinates pasted as "lat, lon". Coverage is primarily the United States, with some Canadian locations. - Pick the fuel.
fuelis an integer code: 1 Regular (default), 2 Midgrade, 3 Premium, 4 Diesel, 5 E85, 12 Unleaded88. - Bound freshness if needed.
maxAgein days drops stations whose prices are older; 0 (default) returns all. - Run the Actor and read the dataset. One flat row per station; no pagination needed.
- Clean and deliver. Treat 0 or null prices as no data, dedupe across runs on
id, and hand back JSON or CSV. The run also writes a CSV file to the run's storage (output_filenames it).
Inputs
search(string, required): ZIP code, city name, or "lat, lon" GPS coordinatesfuel(integer, default 1): 1 Regular, 2 Midgrade, 3 Premium, 4 Diesel, 5 E85, 12 Unleaded88maxAge(integer, days, default 0): drop stations with prices older than this; 0 = no limitlang(string, default "en"): only English is supportedoutput_file(string): optional CSV filename for the copy written to run storage, must end in.csv
Cost
Billing is per station row returned. One location lookup returns a handful to a few dozen rows, so a single call usually costs a cent or two. Estimate first for bulk sweeps across many locations; live prices and thresholds are in references/gotchas.md.
Honest limits
- Live prices only:
price_cash_postedTimeandprice_credit_postedTimeare last-report timestamps, not a history. No historical series. - Per-station data only: no national, state, or city averages. Compute aggregates yourself from the rows.
- No brand filter input, and no phone, website, hours, or latitude/longitude fields in the output.
- Cash and credit prices report independently; either can be 0 or null when no one has posted it recently.
- Coverage is US-first with some Canadian locations; small or rural areas can return few rows.
Troubleshooting
- Empty dataset: the location did not resolve; try a ZIP code instead of a town name, or a nearby larger city.
- Rows with 0 or null prices: no recent report for that station and payment type; set
maxAge(for example 2) to keep only fresh prices. - Fewer stations than expected: normal for less common fuels such as E85 (5) or Unleaded88 (12); those networks are sparse.
See references/gotchas.md for cost guardrails and error recovery, and references/actor-index.md for the Actor routing table.
Related location-data Actors
- Google Maps Places API, station phone, hours, and websites: https://apify.com/johnvc/google-maps-places-api?fpr=9n7kx3&fp_sid=skillrepo
- Google Maps Directions API, routes and drive times between stations: https://apify.com/johnvc/google-maps-directions-api?fpr=9n7kx3&fp_sid=skillrepo
What ships with it: 2 files
4.0 KB alongside SKILL.md
references/
- actor-index.md1.5 KB
- gotchas.md2.5 KB