Brazil Fuel Prices by Gas Station: Gasoline, Ethanol, Diesel avatar

Brazil Fuel Prices by Gas Station: Gasoline, Ethanol, Diesel

Pricing

from $2.00 / 1,000 station price rows

Go to Apify Store
Brazil Fuel Prices by Gas Station: Gasoline, Ethanol, Diesel

Brazil Fuel Prices by Gas Station: Gasoline, Ethanol, Diesel

Weekly fuel prices for every gas station in the ANP survey (gasoline, ethanol, diesel, CNG, LPG) in BRL, USD and EUR, plus the ethanol/gasoline parity by municipality (the 70% rule). 2004 to today, ~21M station prices. API and AI-agent (MCP) ready.

Pricing

from $2.00 / 1,000 station price rows

Rating

0.0

(0)

Developer

Lucas Huber Pissaia

Lucas Huber Pissaia

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Categories

Share

What does it do?

Returns weekly fuel prices from the Brazilian oil agency (ANP) price survey: gasoline, premium gasoline, ethanol, diesel (and diesel S10), CNG (GNV) and LPG cooking gas, one row per gas station, product and week (about 21 million station prices, May 2004 to October 2026, 893 municipalities), in one clean English schema with prices in BRL, USD and EUR. A second dataset gives the ethanol/gasoline parity by municipality and week: the median price of each fuel, the ratio, and whether ethanol is the cheaper choice at the 70% rule of thumb. Use it as an API, schedule it, or call it as an MCP tool from an AI agent (see "Use with AI agents (MCP)").

Data last updated: 20 October 2026 (latest prices in the data: week of 9 October 2026; ANP files downloaded 20 Oct 2026; the RUN_SUMMARY of every run carries data_build_date and data_until). Refreshed weekly.

Try before you pay: the municipality-level prices (mean, median, quartiles by municipality, product and week, 1.9 million rows) and the weekly coverage table are a free dataset on Hugging Face: https://huggingface.co/datasets/pracadata/brazil-fuel-prices. Check the schema, the coverage notes and the quality there, then come back for the per-station rows, the parity table and the API. The registered vehicle fleet by municipality and fuel type is free at https://huggingface.co/datasets/pracadata/brazil-vehicle-fleet.

What is the 70% rule? In Brazil most cars are flex-fuel. As a rule of thumb, ethanol is the cheaper fuel per kilometre when its pump price is at most 70% of the gasoline price. parity_ratio is ethanol ÷ gasoline and ethanol_pays_off is true when it is at or below 0.70. It is a rule of thumb: the real ratio depends on the car.

Read this first: coverage and breaks

  • The ANP survey is a sample, not a census. It covers a few hundred municipalities in a week (about 380 to 400 in 2026, out of 5,571 in Brazil) and the stations the ANP surveys, not every pump. Prices are what was recorded at those stations on the collection day.
  • Four documented breaks (municipalities in the survey per week, gasoline or ethanol unless noted). Series by municipality can disappear or reappear because of them; national averages mix a different set of municipalities before and after.
break_event_idWeeksWhat happenedEffect on coverage_flag
collection_pause_20202020-08-17 to 2021-05-17ANP paused collection from 23 Aug 2020. Diesel, CNG and LPG resumed on 19 Oct 2020 with 29 municipalities; gasoline and ethanol resumed on 28 Dec 2020 and stayed under 250 municipalities until 24 May 2021 (461 before the pause)partial or gap
outage_2022_092022-09-12 to 2022-12-19Collection almost stopped: 413 municipalities (12 Sep), 1 (19 Sep), 27 (26 Sep, 3 Oct), 104 (10 Oct), then a slow recovery; last week under 250 was 19 Dec 2022partial
coverage_cut_2024_07from 2024-07-01Coverage dropped by about a fifth: 428 municipalities (24 Jun 2024) to 343 (1 Jul 2024); stations 9,270 to 5,643note only
coverage_cut_20252025-04-07 to 2025-07-28Further decline: 382 (28 Apr 2025), 368 (7 Jul), 285 (14 Jul), 275 (28 Jul); it recovers to about 380–400 in 2026note only
  • coverage_flag describes the week, not the series: complete (250 municipalities or more with gasoline or ethanol, outside a pause or outage), partial (data, but below 250 municipalities or inside a pause/outage) and gap (a calendar week with no data at all; gap weeks have no rows here, so they never appear in the output).
  • in_continuous_series is true from 2022-12-26 on: from that week the survey has no missing weeks. Before it, even complete weeks are surrounded by gaps (the ANP files for several semesters are partial), so set only_continuous to true if you need an uninterrupted weekly series.
  • Sale price only. The ANP also reported a purchase (distributor) price until 17 August 2020; it is not included.
  • Weekly, one price per station. Each station counts once per week and product (its latest collection of the week, in collection_date).
  • Gas-station addresses are published as the ANP publishes them. The rows carry the business tax id (cnpj), brand, street, number, neighbourhood and postcode of the station. See "Privacy".

Why use it?

  • Prices at the pump, by station, in one schema. The ANP publishes semester files, monthly files and a "last four weeks" file with different layouts and overlapping rows; this Actor resolves the overlaps (semester file over monthly over weekly), types every column, matches every station to its official IBGE municipality code and gives you one queryable history.
  • USD and EUR next to BRL at the daily ECB reference rate of the collection day (or the latest rate in the 7 days before it), from January 2008 (the ECB has no BRL rate before that). The rates themselves are never returned.
  • Quality flags you would otherwise build yourself: coverage_flag, in_continuous_series and break_event_id on every row.
  • Parity ready to use: median ethanol and gasoline price by municipality and week, the ratio and the 70% flag, with the number of stations behind each median.

What data can it return?

Two datasets (input field dataset):

DatasetOne row isMain fields
station_pricesone gas station × product × weekweek_start, collection_date, cnpj, brand, street, number, neighborhood, zip_code, ibge_code, municipality_name, state, product, unit, price_brl, price_usd, price_eur, price, price_currency, coverage_flag, in_continuous_series, break_event_id, source
ethanol_parityone municipality × weekweek_start, ibge_code, municipality_name, state, ethanol_median_brl, gasoline_median_brl, parity_ratio, ethanol_pays_off, n_stations_ethanol, n_stations_gasoline, coverage_flag, in_continuous_series, break_event_id, source

Products: gasoline, gasoline_premium (from December 2020), ethanol, diesel, diesel_s10 (from December 2012), diesel_s50 (2012 only), cng (price per m³) and lpg (price per 13 kg cylinder). All others are BRL per litre; unit says which.

price is the price in the currency you chose with currency (default USD; price_currency says which); price_brl, price_usd and price_eur are always present. source carries the literal citation on every row: Fonte: ANP, Série Histórica de Preços de Combustíveis. In ethanol_parity, municipality_name and state come from the IBGE municipality table (the parity is computed by IBGE code); the table is in BRL, since a ratio has no currency, so currency does not change it.

How to use it

  1. Choose a dataset (station_prices or ethanol_parity).
  2. Add filters: state (UF), municipality (name or IBGE code), product, brand, weeks.
  3. Without weeks you get the latest 8 weeks of the data. week_from and week_to take any date and move it to that week's Monday.
  4. Set Maximum rows (default 10,000, ceiling 1,000,000). Rows are charged one by one, so this is also your cost cap.
  5. Run it and download the dataset as JSON, CSV or Excel, or read it through the API.

municipality takes the official IBGE name, ignoring case, accents and punctuation (rio de janeiro, Niteroi, alta floresta doeste all work), or the 7-digit IBGE code (3550308 = São Paulo). A name that does not exist is refused. Some names repeat across states (there are several "Bom Jesus"): add state, or the run covers all of them (RUN_SUMMARY.matched_municipalities says how many).

Input examples

Each example below was run against the current data (latest week in the data: 5 October 2026). Row counts and cost (US$ 2 per 1,000 station_prices rows, US$ 4 per 1,000 ethanol_parity rows) are noted; the Pricing tab is authoritative.

Gasoline prices at every surveyed station in Rio de Janeiro, the four weeks from 14 September 2026 (324 rows, about US$ 0.65), in euros:

{ "dataset": "station_prices", "municipality": ["Rio de Janeiro"], "product": ["gasoline"], "week_from": "2026-09-14", "currency": "EUR", "max_rows": 1000 }

Ethanol and gasoline together in São Paulo city, the latest 8 weeks (3,358 rows, about US$ 6.72):

{ "dataset": "station_prices", "municipality": ["São Paulo"], "product": ["ethanol", "gasoline"], "max_rows": 5000 }

Ethanol/gasoline parity for every surveyed municipality of São Paulo state over the latest 8 weeks (737 rows, about US$ 2.95):

{ "dataset": "ethanol_parity", "state": ["SP"], "max_rows": 5000 }

Parity for the whole country in the latest week only (387 rows, about US$ 1.55):

{ "dataset": "ethanol_parity", "week_from": "2026-10-05", "week_to": "2026-10-05", "max_rows": 1000 }

Parity for São Paulo city across the continuous series (since 26 December 2022; 198 rows, about US$ 0.79):

{ "dataset": "ethanol_parity", "municipality": ["São Paulo"], "week_from": "2022-12-26", "only_continuous": true, "max_rows": 1000 }

Ipiranga stations in Rio de Janeiro state, gasoline, the latest week (56 rows, about US$ 0.11):

{ "dataset": "station_prices", "state": ["RJ"], "brand": ["ipiranga"], "product": ["gasoline"], "week_from": "2026-10-05", "max_rows": 1000 }

brand matches when the station's brand contains the text, ignoring case and accents (PETROBRAS, IPIRANGA, SHELL; BRANCA is a white flag with no brand).

Output example (station_prices)

{ "week_start": "2026-01-05", "collection_date": "2026-01-05", "cnpj": "00171013000123", "brand": "VIBRA", "street": "AVENIDA RODOLFO AMOEDO", "number": "455",
"neighborhood": "BARRA DA TIJUCA", "zip_code": "22620-350", "ibge_code": "3304557", "municipality_name": "Rio de Janeiro", "state": "RJ", "product": "ethanol",
"unit": "brl_per_liter", "price_brl": 4.49, "price_usd": 0.8251, "price_eur": 0.7074, "price": 0.8251, "price_currency": "USD",
"coverage_flag": "complete", "in_continuous_series": true, "break_event_id": "coverage_cut_2024_07", "source": "Fonte: ANP, Série Histórica de Preços de Combustíveis" }

Use with AI agents (MCP)

The Apify MCP server lets an AI agent find this Actor in the Store, read its input schema and call it as a tool. The agent discovers it with search-actors and fetch-actor-details, runs it with call-actor (the run's maxTotalChargeUsd goes in callOptions, not in the Actor input) and reads the rows with get-dataset-items. Running Actors needs an Apify account; searching and reading details does not.

Connect. The hosted server is https://mcp.apify.com (sign-in through the browser, OAuth). To give the agent this Actor as its own tool, add it to the tools parameter:

https://mcp.apify.com?tools=pracadata/brazil-fuel-prices
  • Claude (Desktop or web): Settings → Connectors → Add custom connector, paste the URL above, sign in to Apify.
  • Cursor, VS Code and other clients with an mcpServers file:
{
"mcpServers": {
"apify": { "url": "https://mcp.apify.com?tools=pracadata/brazil-fuel-prices" }
}
}

Without a browser (servers, CI), use a token instead: add "headers": { "Authorization": "Bearer <APIFY_TOKEN>" } next to url. The Apify docs also describe a configurator at https://mcp.apify.com and the CLI command apify mcp install <client>.

What an agent should know. Questions about "which fuel to buy where" go to ethanol_parity (one row per municipality and week, small and cheap); station_prices is for the individual stations. Always set max_rows (it caps the cost) and a small maximum charge per run. Use municipality by name or IBGE code, state by two-letter code. Read coverage_flag and in_continuous_series before comparing weeks, and RUN_SUMMARY.data_until for how recent the data is.

QuestionInput (dataset; main fields)RowsCostSuggested max charge
"Is ethanol worth it in São Paulo state this week?"ethanol_parity; state SP, week_from and week_to the latest Monday. Read ethanol_pays_off~92US$ 0.37US$ 1
"Gasoline prices in Rio de Janeiro over the last month, in USD"station_prices; municipality Rio de Janeiro, product gasoline, week_from four Mondays back. Read price_usd324US$ 0.65US$ 1
"Which municipalities have the best ethanol parity right now?"ethanol_parity; all states, latest week only. Sort by parity_ratio387US$ 1.55US$ 2
"How has the ethanol ratio in São Paulo city moved since 2023?"ethanol_parity; municipality São Paulo, week_from 2022-12-26, only_continuous true198US$ 0.79US$ 1
"Which Shell stations in Minas Gerais sell diesel S10 and at what price?"station_prices; state MG, brand shell, product diesel_s10, latest week(varies)US$ 2 per 1,000 rowsUS$ 1 (cap with max_rows)

The first question as the exact input an agent sends:

{ "dataset": "ethanol_parity", "state": ["SP"], "week_from": "2026-10-05", "week_to": "2026-10-05", "max_rows": 200 }

Cheap way to test a query: the Console form is prefilled with max_rows 10 (US$ 0.02 for station_prices).

Pricing

This Actor uses pay per event. The Pricing tab is authoritative:

EventWhat you are charged forPrice
station-price-roweach row returned by dataset = station_pricesUS$ 2 per 1,000 rows
parity-roweach row returned by dataset = ethanol_parityUS$ 4 per 1,000 rows

Rows are charged before they are delivered, in batches, and the Actor stops when your maximum charge per run is reached: you never get a row you were not charged for, and you are never charged for a row you did not get. RUN_SUMMARY says so (stopped_by_spending_limit, and charged, the events actually charged). The default is the latest 8 weeks; a whole-country, whole-history query is about 21 million rows, so set max_rows and your maximum charge on purpose.

Privacy

The station_prices rows contain the tax id (cnpj), brand and street address of each gas station, as the ANP publishes them in its open-data price survey. These are business establishments, but some stations may be run by a sole trader, in which case the registered business can point to a person. The rows contain no names, no personal tax ids (CPF) and no data about customers. ethanol_parity has no station-level data at all. Treat the data as public business records and do not use it to identify, locate or contact individuals. Removal requests and data-protection (LGPD) questions go to lucashpissaia@gmail.com.

Source and attribution

Licence and terms

  • Source terms. Source: ANP, Série Histórica de Preços de Combustíveis. This is public data of the Brazilian government; reuse is subject to the Terms of Use of the ANP portal. Check the source terms for your use, and cite the source above if you publish.
  • Unofficial. This Actor is a derived, unofficial work and is not affiliated with, endorsed by or approved by the ANP. Do not use it as a regulated price reference without checking the ANP.
  • Use: internal use (your own analysis, models, reports and products built on top of the data). Do not resell or redistribute the raw rows in volume or as a substantially similar dataset or API.
  • No warranty: the data is provided as is, from public sources, with the limitations above. It is not an appraisal and not official.
  • Withdrawal: if the ANP restricts the reuse of its data, the Actor may be withdrawn. Takedown requests: lucashpissaia@gmail.com.

Known limitations

  • Coverage is a sample that changed over time (the four breaks above). Do not compare municipalities or national averages across breaks without reading break_event_id.
  • Weeks before 2022-12-26 are not a continuous series: even complete weeks are surrounded by gaps. Weeks with no data at all do not appear as rows.
  • Currencies. price_usd and price_eur use the daily ECB rate of collection_date, or the latest one in the 7 days before it (USD/BRL is a derived cross rate), and are null when no such rate exists, which includes everything before 2008, when the ECB has no BRL rate. They are indicative conversions of the pump price; the rate is not returned.
  • Prices are nominal. No inflation adjustment.
  • One price per station per week: the latest collection of the week, in collection_date.
  • Municipality matching. The ANP files carry spelling variants of municipality names; they are matched to IBGE codes (two old municipalities fixed by hand). municipality_name on station rows is the name as matched.
  • Free-text fields keep the source's Portuguese: brand, street, neighborhood.
  • ethanol_pays_off uses a fixed 0.70 threshold. The best ratio for a given car can differ.

FAQ and support

How fresh is the data? The ANP publishes weekly; the data here is refreshed weekly. RUN_SUMMARY.data_until is the last day with data and data_build_date is when this build was made.

Can I get everything? Yes: set max_rows to 1,000,000 and page by week range. The whole station history is about 21 million rows.

Is there a free sample? Yes, the municipality-level prices on Hugging Face (see "Try before you pay").

Can I use it from an AI agent? Yes. Pay-per-event Actors are available as MCP tools on Apify; the input fields above are the tool arguments. See "Use with AI agents (MCP)".

Found a problem or need another field? Use the Issues tab.