# Apify Gas Price Monitoring

> Monitor gas prices across ZIP codes and cities with the Apify Fuel Prices Scraper Actor (johnvc/fuelprices). Poll a watchlist of locations on a schedule and get one row per station with cash and credit prices plus posted timestamps, ready to diff against your last snapshot for price-change alerts, cash versus credit spreads, and station-level competitive tracking. Use when the user wants gas price monitoring, fuel price monitoring, price-change alerts for fuel, tracking gas prices across multiple ZIP codes or cities, watching diesel or E85 prices for a fleet, or a live feed for a fuel price dashboard. Pay-per-result billing, MCP-ready for Claude and other AI agents.

- Skill: `johnisanerd/apify-gas-price-monitoring` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add johnisanerd/apify-gas-price-monitoring`
- Raw SKILL.md: https://api.skillmd.com/api/skills/johnisanerd/apify-gas-price-monitoring/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- License: MIT
- Author: johnisanerd (https://skillmd.com/u/johnisanerd)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/johnisanerd/apify-gas-price-monitoring

---


# Gas Price Monitoring: Track Per-Station Prices Across Locations

Monitor gas prices with the Apify Fuel Prices Scraper. Poll a watchlist of ZIP codes or cities on a schedule, snapshot one row per station with cash and credit prices and their posted timestamps, and diff snapshots to catch price moves, spreads, and undercutting.

## When to use this skill

- The user wants gas price monitoring or fuel price monitoring across one or more locations.
- They want price-change alerts, a fuel price dashboard feed, or a recurring competitive scan of nearby stations.
- They manage a fleet or delivery routes and want to watch diesel or E85 prices along them.
- They ask to "track gas prices", "watch fuel prices", or "tell me when prices change".

Not for: historical backfill (live prices only, history starts when your polling starts), national or state averages (per-station only), or one-off single lookups (use the gas-prices-api skill).

## What each snapshot returns (one row per station)

`id`, `name`, `priceUnit`, `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). `id` is the join key between snapshots; the postedTime fields tell you whether a price actually moved since your last poll. Prices of 0 or null mean 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 an `APIFY_TOKEN` environment 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

One monitoring poll of a ZIP, fresh prices only:

```bash
apify actors call "johnvc/fuelprices" -i '{"search":"75201","fuel":1,"maxAge":2}' \
  --json \
  --user-agent apify-awesome-skills/apify-gas-price-monitoring \
  2>/dev/null
```

Read a finished poll's rows later, for example from a scheduled run:

```bash
apify datasets get-items <DATASET_ID> --format json --user-agent apify-awesome-skills/apify-gas-price-monitoring 2>/dev/null
```

Every call carries the three flags this repo expects: `--json` (or `--format json`), `--user-agent apify-awesome-skills/apify-gas-price-monitoring`, 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: "Check diesel prices in ZIP codes 75201 and 76102 and tell me which stations dropped since yesterday." MCP setup docs: https://docs.apify.com/platform/integrations/mcp

## Workflow

1. Define the watchlist. One Actor input per location: `search` (ZIP, city, or "lat, lon") plus the `fuel` code to track (1 Regular, 2 Midgrade, 3 Premium, 4 Diesel, 5 E85, 12 Unleaded88). Separate fuels are separate calls.
2. Keep polls fresh. Set `maxAge` (1 to 3 days) so stale stations drop out instead of polluting diffs; it also trims billed rows.
3. Estimate cost per poll and per month, then confirm with the user. See `references/gotchas.md`.
4. Poll and snapshot. Run one call per watchlist entry, stamp rows with your own poll time, and store them keyed on `id`.
5. Diff and alert. Join the new snapshot to the previous one on `id`, compare `price_cash` and `price_credit`, and use the postedTime fields to separate real price moves from unchanged reports. Treat 0 or null prices as no data, not as a price drop.
6. Schedule it. Wrap the same inputs in an Apify Schedule or a cron job; daily is enough for most retail fuel tracking.

## Inputs

- `search` (string, required): ZIP code, city name, or "lat, lon" GPS coordinates, one location per call
- `fuel` (integer, default 1): 1 Regular, 2 Midgrade, 3 Premium, 4 Diesel, 5 E85, 12 Unleaded88
- `maxAge` (integer, days, default 0): freshness window for a monitoring poll; 1 to 3 days recommended
- `lang` (string, default "en"): only English is supported
- `output_file` (string): optional CSV filename for the copy written to run storage, must end in `.csv`

## Cost

Billing is per station row returned, so cost per poll is (stations per location) times (locations). A single ZIP poll is usually a cent or two; a daily 10-ZIP watchlist runs on the order of a few dollars per month. Estimate with the live per-result price in `references/gotchas.md` before scheduling.

## Honest limits

- This is a polled snapshot, not a push feed: your poll interval is your freshness, and history starts when your polling starts. No backfill.
- Per-station only: compute city or corridor averages yourself from the rows.
- Cash and credit report independently; a station can update one and not the other. Alert on each side separately.
- Station sets can shift slightly between polls; a station missing from one snapshot is not proof it closed.
- Coverage is US-first with some Canadian locations.

## Troubleshooting

- Diffs full of "changes" that are not real: you compared prices without checking postedTime; only flag rows whose postedTime advanced.
- Stations flapping in and out of snapshots: raise `maxAge` slightly, or key your store on `id` and tolerate gaps.
- Empty poll for a small town: use the nearest ZIP code instead of the town name.

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

