Mexico Gas Station Prices API
Current regular, premium and diesel pump prices in Mexican pesos at gas stations across Mexico, joined with each station's name, CRE permit number and coordinates, searchable by distance from any point.
$0.50 per 1,000 records
You pay only for the records you get. Zero records cost zero. 10,000 free records of this API to start (5,000 at the base price of $1 per 1,000), no card.
Data from publicacionexterna.azurewebsites.net/publicaciones/prices
Get this data
Try it here with a few records, download the sample, fill a Google Sheet, or call it from your own code.
Try it
Run it on this page, or call it from your code with the endpoint in the developer section. A free key covers 10,000 records of this API, no card. Create a free key
For developers: the API and MCPThe endpoint, code in curl, JavaScript and Python, every input, and files for your tools
- Small runs answer in the same request; longer ones answer
202with a run to poll. fieldsreturns only the fields you name. The examples send the ones picked on this page.Idempotency-Keyis optional. A retry with it is never charged twice.- You pay for records returned. Zero records cost zero.
curl -X POST "https://pullrow.dev/v1/apis/mexico-fuel-prices/run" \
-H "Authorization: Bearer $PULLROW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"near":"19.4326,-99.1332"},"max_items":50}'Inputs
Send them as input in the request body. Leave one out to use its default.
What's in each record
9 fields: 8 here, 1 technical one under Technical details.
Basics
- Name
Registered name of the station's operator.
Example OPERADORA DE MINIESTACIONES COMBUSERV S.A. DE C.V.
- Cre permit
CRE permit number of the station.
Example PL/10909/EXP/ES/2015
- Latitude
Latitude of the station.
Example 19.42713
- Longitude
Longitude of the station.
Example -99.1392
- Distance (km)
Distance from the centre point in kilometres, when near is given.
Example 0.88
Prices
- Regular price MXN
Regular gasoline price per litre in Mexican pesos.
Example 23.99
- Premium price MXN
Premium gasoline price per litre in Mexican pesos.
Example 28.99
- Diesel price MXN
Diesel price per litre in Mexican pesos.
Example 26.99
Technical detailsField names and types for developers, and the 1 field hidden above
Hidden by default
This field comes with each record too. It is an internal code, a note about how the record was read or a copy of what was searched for, so the lists above leave it out.
- Place ID
place_idThe regulator's id of the station.
Field names and types
The names your code reads in each record. "Filled" counts how many of the 3 sample records carry the field.
| Field name | Type | Shown on this page as | Filled |
|---|---|---|---|
place_id | text | Place ID (hidden) | 3 of 3 |
name | text | Name | 3 of 3 |
cre_permit | text | Cre permit | 3 of 3 |
lat | number | Latitude | 3 of 3 |
lon | number | Longitude | 3 of 3 |
regular_price_mxn | number | Regular price MXN | 3 of 3 |
premium_price_mxn | number | Premium price MXN | 3 of 3 |
diesel_price_mxn | number | Diesel price MXN | 2 of 3 |
distance_km | number | Distance (km) | 3 of 3 |
How it reads the site
Runs on a reader we built and maintain by hand for this site.
Save as pipeline
A pipeline remembers this API, your inputs and the fields you picked. It can run on a schedule and email you the results.
Sample records
| Record | Name | Cre permit | Latitude | Longitude | Distance (km) | Regular price MXN | Premium price MXN | Diesel price MXN |
|---|---|---|---|---|---|---|---|---|
| 1 | OPERADORA DE MINIESTACIONES COMBUSERV S.A. DE C.V. | PL/10909/EXP/ES/2015 | 19.42713 | -99.1392 | 0.88 | 23.99 | 28.99 | — |
| 2 | ESTACIÓN DE SERVICIO MENORCA S.A. DE C.V. | PL/6759/EXP/ES/2015 | 19.42305 | -99.1293 | 1.14 | 23.99 | 28.99 | 26.99 |
| 3 | ESTACIÓN DE SERVICIO PARA AUTOS CENTRO S.A. DE C.V. | PL/8771/EXP/ES/2015 | 19.42038 | -99.13423 | 1.36 | 22.99 | 28.49 | 26.99 |
Sample records from the example output this API publishes. Email addresses and phone numbers in them are masked. Hover over a column name to see the field name your code reads.
Reliability
Counted from real runs. Our own health checks are left out. A run succeeded when it finished and the site neither blocked it nor broke it.
Incidents and repairs
How it is kept working What a repair can't do
A ready-made API, maintained by us. It is not part of the daily check or the automatic rebuild yet.
- You pay only for records returned. A run that returns none costs nothing.
- The source lists about 15,000 stations in two national files; every run reads both files in full (about 5 MB) before it filters, so a run takes several seconds whatever the number of records.
- Stations carry only the prices they report: many have no premium or no diesel price, so those fields are empty for them. With the fuel input set, only stations that report that fuel are returned.
- The source gives the station's name and permit number and coordinates, but no street address, brand, or time of last price update.
- Prices are Mexican pesos per litre as the regulator publishes them; the files are refreshed by the regulator during the day.
- Results are sorted by distance when near is given, otherwise by place_id. One run returns at most 20,000 records.
- Data is the public price publication of the Mexican energy regulator (CRE/CNE); credit the regulator when you republish. Not affiliated with it.
Version history
A run uses the live version unless the request names another one with version.
Manage this API
Only your workspace sees this part.
Automatic repair
Off: a rebuilt version is stored and waits for you in the version history.
Delete this API
Removes the API, its versions and the saved records of its runs. Calls to its address then answer 404. Records already charged stay charged. This cannot be undone.