# North America Fuel Prices: Mexico by Station, US & Canada (`yodeling_november/north-america-fuel-prices`) Actor

⛽ Find the cheapest gas in Mexico and compare it with the US and Canada. Official daily prices from 13,800 Mexican stations, plus EIA averages for US regions, states and cities and Statistics Canada averages for 18 cities, all in USD per litre. Search near any point or track price changes.

- **URL**: https://apify.com/yodeling_november/north-america-fuel-prices.md
- **Developed by:** [João Fernandes](https://apify.com/yodeling_november) (community)
- **Categories:** Travel, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.60 / 1,000 station prices

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## North America Fuel Prices: Mexico by Station, US & Canada

**Find the cheapest gas in Mexico and compare it with the US and Canada, in one currency.**

This Actor collects the **official pump prices of about 13,800 gas stations in Mexico**, published every day by the energy regulator, together with the **official US averages** (national, regions, states and cities) and **Canadian averages** (national and 18 cities). Every price is also converted to **US dollars per litre**, so Tijuana, Texas and Toronto finally compare like for like. No scraping, no proxies: runs take a few seconds.

### ✨ Why use it

- ✅ **Official sources only:** Mexico's Comisión Nacional de Energía, the U.S. Energy Information Administration and Statistics Canada.
- 📍 **Cheapest near any point:** search Mexican stations by GPS point and radius, state or station name.
- 💵 **One unit for three countries:** every price in USD per litre, next to the original currency and unit.
- 🔔 **Only what changed:** *Changes* mode returns just the prices that moved since your last run.
- 💸 **Pay per result:** $0.80 per 1,000 station prices. A "10 cheapest near me" run costs under one cent.

### 🌍 What data you get

- 🇲🇽 **Mexico, by station:** regular and premium gasoline and diesel at about 13,800 stations, from the Comisión Nacional de Energía (CNE), updated daily. About 37,000 prices.
- 🇺🇸 **United States, averages:** weekly regular, midgrade and premium gasoline and diesel from the U.S. Energy Information Administration (EIA): national, 9 PADD regions, 9 states and 10 cities.
- 🇨🇦 **Canada, averages:** monthly regular and premium gasoline and diesel from Statistics Canada: national and 18 cities.
- 🇲🇽 **Mexico, average:** the median of all station prices, computed from the CNE lists.

### 💡 Use cases

- **Drivers and apps in Mexico:** the cheapest regular, premium or diesel near a user in Mexico City, Guadalajara, Monterrey or on the highway.
- **Gas station owners:** watch every competitor within a few kilometres and see who changed their price today.
- **Cross-border comparisons:** Tijuana against the California average, Toronto against New York City, Mexico against the US.
- **Fleets and logistics:** weekly and monthly averages for fuel budgets across the three countries.
- **Developers and AI agents:** feed dashboards and apps through the Apify API, or let an AI agent call it through MCP.

### 🚀 How to use it

1. Click **Try for free** and choose the fuels you want.
2. Narrow it down: a point and a radius such as `19.4326, -99.1332` and 5 km, a state or a station name, or pick the US and Canadian areas to compare.
3. Run it and download the results as **Excel, CSV or JSON**, or read them from the **Apify API**.
4. Want it every day? **Schedule** the run, switch to *Changes* mode, and send the results to Make, Zapier, n8n or a webhook.

### 📥 Input examples

10 cheapest regular gasoline prices within 5 km of the Zócalo in Mexico City:

```json
{ "fuelTypes": ["regular"], "nearLocation": "19.4326, -99.1332", "radiusKm": 5, "maxResultsPerFuel": 10 }
```

Cheapest diesel in Jalisco and Nuevo León:

```json
{ "fuelTypes": ["diesel"], "states": ["MX-JAL", "MX-NLE"], "maxResultsPerFuel": 20 }
```

Averages only: gasoline and diesel in the US, California, Texas, New York City, Canada, Toronto and Mexico, cheapest first in US dollars per litre:

```json
{ "stations": false, "fuelTypes": ["regular", "diesel"], "averageAreas": ["US", "US-CA", "US-TX", "US-NYC", "CA", "CA-YYZ", "MX"] }
```

Daily price-change monitor for all fuels within 3 km of a station in Guadalajara (schedule it):

```json
{ "fuelTypes": ["regular", "premium", "diesel"], "nearLocation": "20.6597, -103.3496", "radiusKm": 3, "mode": "changes", "monitorId": "my-station" }
```

`states` accepts ISO codes (`MX-CMX`, `MX-JAL`…) or names (`Jalisco`, `Ciudad de México`). Average areas use codes such as `US`, `US-PADD3`, `US-TX`, `US-NYC`, `CA`, `CA-YYZ` (Toronto) or `MX`. The input form lists them all with their names.

### 📦 Output

Mexican station prices, with `recordType` set to `station`:

```json
{
  "recordType": "station",
  "country": "MX",
  "stationId": "MX-9985",
  "permitNumber": "PL/8939/EXP/ES/2015",
  "stationName": "CORPORACION GASOLINERA MILLENIUM SA DE CV",
  "state": "Ciudad de México",
  "stateCode": "MX-CMX",
  "latitude": 19.43856,
  "longitude": -99.119,
  "fuelType": "regular",
  "fuelName": "Gasolina regular",
  "price": 22.59,
  "currency": "MXN",
  "unit": "litre",
  "pricePerLitre": 22.59,
  "priceUsdPerLitre": 1.2321,
  "distanceKm": 1.63,
  "source": "Comisión Nacional de Energía (CNE) — precios de gasolinas y diésel reportados por los permisionarios",
  "license": "Open data of the Government of Mexico (Términos de Libre Uso MX): cite the source; this use does not represent an official position of the Government.",
  "fetchedAt": "2026-10-13T15:10:00+00:00"
}
```

Average prices, with `recordType` set to `area-average`:

```json
{
  "recordType": "area-average",
  "country": "US",
  "area": "US-TX",
  "areaName": "Texas",
  "areaType": "state",
  "fuelType": "regular",
  "fuelName": "Regular gasoline (all formulations)",
  "price": 3.874,
  "currency": "USD",
  "unit": "gallon",
  "pricePerLitre": 1.0234,
  "priceUsdPerLitre": 1.0234,
  "priceDate": "2026-10-05",
  "frequency": "weekly",
  "source": "U.S. Energy Information Administration (EIA) — Gasoline and Diesel Fuel Update",
  "license": "U.S. Government work in the public domain. Source: U.S. Energy Information Administration.",
  "fetchedAt": "2026-10-13T15:10:00+00:00"
}
```

In *Changes* mode each row also has `changeType` (`new`, `up` or `down`), `previousPrice` and `priceChange`. The dataset has two views: *Mexico station prices* and *Average prices*.

### 💰 How much does it cost?

You pay only for the results you get:

| Event | Price |
|---|---|
| Station price (one row in Snapshot mode) | $0.0008, i.e. **$0.80 per 1,000 prices** |
| Price change (one row in Changes mode) | $0.0015 |
| Area average (one area and fuel) | $0.002 |

Higher Apify plans get volume discounts. A "10 cheapest near me" run costs under one cent, and all 50 areas for every fuel cost about $0.30. Use filters: a full snapshot of every Mexican price (about 37,000) costs about $30.

You can set a maximum cost per run in the run options. The Actor stops pushing results when that limit is reached.

### 🔍 Data quality

- **Mexico:** prices are **reported by the stations themselves** to the regulator, and the CNE publishes the lists every day. The source has no timestamp per price. Obvious errors, such as 0.01 or 98.95 MXN per litre, are removed by default (prices below 75% or above 150% of the national median for the same fuel). Turn this off with *Exclude implausible prices*.
- **Mexican station names** are the **registered permit holders**, usually company names, which often differ from the brand on the canopy. The **state is worked out from the coordinates**, so a handful of stations right on a coast or state line may land in the neighbouring state.
- **US averages** are the EIA's weekly survey (prices as of Monday), in dollars per gallon as published; `pricePerLitre` converts them. Midgrade exists only in the US. Diesel is published for the national, regional and California levels, not for the other states and cities.
- **Canadian averages** are monthly, so `priceDate` is a month (YYYY-MM). The national figure covers regular gasoline only.
- **US dollars per litre** use the European Central Bank's daily reference rates (`usdRateDate`).
- If one source is temporarily down, the run still returns the others, and the status message says which one is missing.

### 📚 Sources and licences

| Data | Publisher | Licence / terms |
|---|---|---|
| Mexican stations and prices | Comisión Nacional de Energía (formerly Comisión Reguladora de Energía) | Open data of the Government of Mexico, *Términos de Libre Uso MX*: cite the source |
| US averages | U.S. Energy Information Administration | Public domain (U.S. Government work) |
| Canadian averages | Statistics Canada, Table 18-10-0001-01 | Statistics Canada Open Licence |
| Mexican state boundaries | Natural Earth | Public domain |
| Exchange rates | European Central Bank reference rates | Free reuse with source |

Every row carries `source` and `license`. This Actor is not affiliated with or endorsed by any of these publishers, and its use of the data does not represent an official position of any government. No personal data is collected: the records describe business premises only.

### Precios de gasolina en México

Precios oficiales de **gasolina regular, premium y diésel** en unas **13,800 gasolineras de todo México**, a partir de las listas que publica cada día la Comisión Nacional de Energía. Filtra por **estado**, **nombre de la estación** o **distancia** a un punto. Encuentra las **gasolineras más baratas** cerca de ti, compara con Estados Unidos y Canadá en dólares por litro, y sigue los **cambios de precio** cada día.

### ❓ FAQ

**How fresh is the data?** Each run downloads the current data. Mexico updates daily, the US weekly (usually published on Monday or Tuesday) and Canada monthly.

**Can I schedule it?** Yes. Create a task with your filters and add a schedule. *Changes* mode remembers the last prices for each `monitorId`.

**Why are there no station prices for the US or Canada?** Neither government publishes prices per station. The averages are the official figures.

**Why doesn't a Mexican station name match the brand I see?** The source lists the company that holds the permit, not the brand.

**Something looks wrong?** Open an issue on the Actor's Issues tab with the input you used. Issues are answered within a few days.

### 🔗 More official data from the same developer

- [European Fuel Prices](https://apify.com/yodeling_november/eu-fuel-prices): cheapest stations in 6 countries and averages for 29.
- [Public Tenders: Portugal, Spain & EU](https://apify.com/yodeling_november/public-tenders-pt-es-eu): a daily feed of new calls for tender.
- [Public Contract Awards: Portugal & Spain](https://apify.com/yodeling_november/public-contract-awards-pt-es): who wins, at what price and against whom.
- [New Companies & Insolvencies: Spain & France](https://apify.com/yodeling_november/company-events-spain-france): fresh leads and risk alerts from the official gazettes.
- [UK Companies House Search](https://apify.com/yodeling_november/uk-companies-house-search): new UK companies by SIC code and postcode.
- [EU Company Verification (KYB)](https://apify.com/yodeling_november/eu-company-verification): bulk checks in 5 official registries.
- [European Public Data MCP Server](https://apify.com/yodeling_november/public-data-mcp): all of this as tools for your AI agent.

# Actor input Schema

## `stations` (type: `boolean`):

Include the prices at each Mexican gas station (CNE). Turn off to get only the averages below.

## `fuelTypes` (type: `array`):

Regular and premium gasoline and diesel. Midgrade exists only in the US averages.

## `states` (type: `array`):

Optional. Keep only stations in these states. The state is worked out from each station's coordinates.

## `stationName` (type: `string`):

Optional. Keep only stations whose registered name contains this text, e.g. a company name. Case and accents are ignored.

## `nearLocation` (type: `string`):

Optional. Decimal coordinates, e.g. 19.4326, -99.1332 (Zócalo, Mexico City). Adds distanceKm to each result and keeps stations within the radius below.

## `radiusKm` (type: `integer`):

Used with Near location.

## `sortBy` (type: `string`):

Price sorts cheapest first (averages by US dollars per litre). Distance requires Near location.

## `maxResultsPerFuel` (type: `integer`):

Cap per fuel type after sorting, so 'price' + 10 gives the 10 cheapest stations for each fuel. 0 means no cap. Averages are never capped.

## `excludeOutliers` (type: `boolean`):

Drops obvious data-entry errors reported by stations (for example 0.01 or 98.95 MXN/l): prices below 75% or above 150% of the national median for the same fuel.

## `averageAreas` (type: `array`):

Optional. Official average prices: the US from the EIA (weekly: national, PADD regions, 9 states, 10 cities, in USD per gallon) and Canada from Statistics Canada (monthly: national and 18 cities, in CAD per litre). MX is the median of all Mexican station prices. Every row also has pricePerLitre and priceUsdPerLitre. Station filters do not apply.

## `mode` (type: `string`):

Snapshot returns current prices. Changes returns only prices that are new or changed since the previous run with the same Monitor ID, with the previous price, which suits scheduled runs. Averages are included in the changes.

## `monitorId` (type: `string`):

Name for the saved state in Changes mode. Use a different ID for each monitored area or filter set.

## Actor input object example

```json
{
  "stations": true,
  "fuelTypes": [
    "regular"
  ],
  "nearLocation": "19.4326, -99.1332",
  "radiusKm": 5,
  "sortBy": "price",
  "maxResultsPerFuel": 10,
  "excludeOutliers": true,
  "averageAreas": [
    "US",
    "CA",
    "MX"
  ],
  "mode": "snapshot",
  "monitorId": "default"
}
```

# Actor output Schema

## `prices` (type: `string`):

Pump prices per Mexican station and fuel (and, in Changes mode, the changes).

## `averages` (type: `string`):

Average prices for the US, Canada and Mexico, by country, region, state or city.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "fuelTypes": [
        "regular"
    ],
    "nearLocation": "19.4326, -99.1332",
    "radiusKm": 5,
    "maxResultsPerFuel": 10,
    "averageAreas": [
        "US",
        "CA",
        "MX"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("yodeling_november/north-america-fuel-prices").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "fuelTypes": ["regular"],
    "nearLocation": "19.4326, -99.1332",
    "radiusKm": 5,
    "maxResultsPerFuel": 10,
    "averageAreas": [
        "US",
        "CA",
        "MX",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("yodeling_november/north-america-fuel-prices").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "fuelTypes": [
    "regular"
  ],
  "nearLocation": "19.4326, -99.1332",
  "radiusKm": 5,
  "maxResultsPerFuel": 10,
  "averageAreas": [
    "US",
    "CA",
    "MX"
  ]
}' |
apify call yodeling_november/north-america-fuel-prices --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,yodeling_november/north-america-fuel-prices"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/HbQPYCvsd2Wmr6xPb/builds/TeQymPXUKfbLlOM3D/openapi.json
