# Brazil Fuel Prices by Gas Station: Gasoline, Ethanol, Diesel (`pracadata/brazil-fuel-prices`) Actor

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.

- **URL**: https://apify.com/pracadata/brazil-fuel-prices.md
- **Developed by:** [Lucas Huber Pissaia](https://apify.com/pracadata) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 station price rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

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

### 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_id` | Weeks | What happened | Effect on `coverage_flag` |
|---|---|---|---|
| `collection_pause_2020` | 2020-08-17 to 2021-05-17 | ANP 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_09` | 2022-09-12 to 2022-12-19 | Collection 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 2022 | `partial` |
| `coverage_cut_2024_07` | from 2024-07-01 | Coverage dropped by about a fifth: 428 municipalities (24 Jun 2024) to 343 (1 Jul 2024); stations 9,270 to 5,643 | note only |
| `coverage_cut_2025` | 2025-04-07 to 2025-07-28 | Further decline: 382 (28 Apr 2025), 368 (7 Jul), **285 (14 Jul)**, 275 (28 Jul); it recovers to about 380–400 in 2026 | note 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`):

| Dataset | One row is | Main fields |
|---|---|---|
| `station_prices` | one gas station × product × week | `week_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_parity` | one municipality × week | `week_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:

```json
{ "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):

```json
{ "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):

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

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

```json
{ "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):

```json
{ "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):

```json
{ "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)

```json
{ "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:**

```json
{
  "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.

| Question | Input (`dataset`; main fields) | Rows | Cost | Suggested 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` | ~92 | US$ 0.37 | US$ 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_usd` | 324 | US$ 0.65 | US$ 1 |
| "Which municipalities have the best ethanol parity right now?" | `ethanol_parity`; all states, latest week only. Sort by `parity_ratio` | 387 | US$ 1.55 | US$ 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` true | 198 | US$ 0.79 | US$ 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 rows | US$ 1 (cap with `max_rows`) |

The first question as the exact input an agent sends:

```json
{ "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:

| Event | What you are charged for | Price |
|---|---|---|
| `station-price-row` | each row returned by `dataset = station_prices` | US$ 2 per 1,000 rows |
| `parity-row` | each row returned by `dataset = ethanol_parity` | US$ 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

- **Fonte: ANP, Série Histórica de Preços de Combustíveis.** Levantamento de Preços de Combustíveis of the Agência Nacional do Petróleo, Gás Natural e Biocombustíveis, open data files: <https://www.gov.br/anp/pt-br/centrais-de-conteudo/dados-abertos/serie-historica-de-precos-de-combustiveis>. Every row carries this citation in `source`.
- **Fonte: IBGE, Localidades.** Municipality codes, names and states: <https://servicodados.ibge.gov.br/api/v1/localidades/municipios>.
- **Exchange rates:** European Central Bank euro reference rates (USD/BRL is a derived cross rate), daily rate on the collection day or the latest one in the 7 days before it. The rates are never returned.

### 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](https://www.gov.br/anp/pt-br/acesso-a-informacao/termos-de-uso-privacidade-e-seguranca-1). 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.

# Actor input Schema

## `dataset` (type: `string`):

What to return. `station_prices`: one row per gas station × product × week (ANP survey), charged per row. `ethanol_parity`: one row per municipality × week with median ethanol and gasoline price, `parity_ratio` (ethanol ÷ gasoline) and `ethanol_pays_off` (ratio at or below 0.70, the usual rule of thumb for a flex-fuel car); charged per row, and the right choice for questions about which fuel to buy where. Default: station_prices.

## `state` (type: `array`):

One or more Brazilian states by two-letter code, for example `SP`, `RJ`, `MG`. Optional. Combined with `municipality`, it narrows it (useful for names that repeat across states, such as Bom Jesus).

## `municipality` (type: `array`):

One or more municipalities, by official IBGE name (case, accents and punctuation are ignored: `Sao Paulo`, `são paulo` and `SÃO PAULO` are the same; `Alta Floresta D'Oeste` also matches `alta floresta doeste`) or by 7-digit IBGE code (`3550308` = São Paulo, `3304557` = Rio de Janeiro). A name that does not exist is refused. Up to 200 values.

## `product` (type: `array`):

`station_prices` only. One or more of `gasoline`, `gasoline_premium` (from Dec 2020), `ethanol`, `diesel`, `diesel_s10` (from Dec 2012), `diesel_s50` (2012 only), `cng` (natural gas for vehicles, price per m³) and `lpg` (cooking gas, price per 13 kg cylinder). All others are BRL per litre (see `unit`). No value means every product.

## `week_from` (type: `string`):

First week, format YYYY-MM-DD. Any day of the week works: it is moved back to that week's Monday (`week_start`). Optional; the default is 7 weeks before `week_to` (8 weeks in total). The series starts on 2004-05-10.

## `week_to` (type: `string`):

Last week, format YYYY-MM-DD, inclusive (moved back to its Monday). Optional; the default is the latest week in the data (see `data_until` in the run summary).

## `brand` (type: `array`):

`station_prices` only. One or more brand names; a station matches when its brand contains the text (case and accents ignored), for example `PETROBRAS`, `IPIRANGA`, `SHELL`, `BRANCA` (white flag, no brand). Optional, up to 20.

## `only_continuous` (type: `boolean`):

If true, return only weeks from 2022-12-26 on (`in_continuous_series` = true), the period in which the ANP survey has no missing weeks. Before that date even `complete` weeks are surrounded by gaps. Default: false.

## `max_rows` (type: `integer`):

Maximum number of rows returned (1 to 1,000,000; default 10,000). Rows are charged one by one, so this is also the cost cap: 10,000 station rows is US$ 20, 10,000 parity rows US$ 40. Set a small value (for example 10) to test a query. If the filter matches more rows, the rest is not returned: `RUN_SUMMARY.capped_by_max_rows` is true.

## `currency` (type: `string`):

`station_prices` only: which currency fills the `price` column (`price_currency` says which). `price_brl`, `price_usd` and `price_eur` are always present. USD and EUR use the daily ECB reference rate of the collection day, or the latest one in the 7 days before it (USD/BRL is a derived cross rate) and are null when no rate exists; BRL is the price as surveyed. `ethanol_parity` is in BRL (the ratio has no currency). Default: USD.

## Actor input object example

```json
{
  "dataset": "ethanol_parity",
  "state": [
    "SP"
  ],
  "municipality": [
    "Rio de Janeiro"
  ],
  "product": [
    "gasoline"
  ],
  "week_from": "2026-09-07",
  "week_to": "2026-10-05",
  "brand": [
    "Petrobras"
  ],
  "only_continuous": false,
  "max_rows": 100,
  "currency": "USD"
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset with the returned rows. Which view applies depends on the input field `dataset`

## `files` (type: `string`):

Key-value store with RUN_SUMMARY

## `summary` (type: `string`):

RUN_SUMMARY: applied filters, rows returned and charged, data build date, last week in the data, sources and whether the maximum charge stopped the run

# 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 = {
    "max_rows": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("pracadata/brazil-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 = { "max_rows": 10 }

# Run the Actor and wait for it to finish
run = client.actor("pracadata/brazil-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 '{
  "max_rows": 10
}' |
apify call pracadata/brazil-fuel-prices --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pracadata/brazil-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/2x4SUBRRQYpy5UKZa/builds/N2YXnGG8iyXMl5cq4/openapi.json
