{
  "openapi": "3.0.1",
  "info": {
    "title": "Brazil Fuel Prices by Gas Station: Gasoline, Ethanol, Diesel",
    "description": "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.",
    "version": "0.1",
    "x-build-id": "N2YXnGG8iyXMl5cq4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pracadata~brazil-fuel-prices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pracadata-brazil-fuel-prices",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/pracadata~brazil-fuel-prices/runs": {
      "post": {
        "operationId": "runs-sync-pracadata-brazil-fuel-prices",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/pracadata~brazil-fuel-prices/run-sync": {
      "post": {
        "operationId": "run-sync-pracadata-brazil-fuel-prices",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "dataset": {
            "title": "Dataset",
            "enum": [
              "station_prices",
              "ethanol_parity"
            ],
            "type": "string",
            "description": "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.",
            "default": "station_prices"
          },
          "state": {
            "title": "State (UF)",
            "type": "array",
            "description": "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).",
            "items": {
              "type": "string"
            }
          },
          "municipality": {
            "title": "Municipality",
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string"
            }
          },
          "product": {
            "title": "Product",
            "type": "array",
            "description": "`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.",
            "items": {
              "type": "string",
              "enum": [
                "gasoline",
                "gasoline_premium",
                "ethanol",
                "diesel",
                "diesel_s10",
                "diesel_s50",
                "cng",
                "lpg"
              ],
              "enumTitles": [
                "Gasoline",
                "Premium gasoline",
                "Ethanol",
                "Diesel",
                "Diesel S10",
                "Diesel S50",
                "CNG (GNV)",
                "LPG (13 kg cylinder)"
              ]
            }
          },
          "week_from": {
            "title": "Week from",
            "type": "string",
            "description": "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": {
            "title": "Week to",
            "type": "string",
            "description": "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": {
            "title": "Brand",
            "type": "array",
            "description": "`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.",
            "items": {
              "type": "string"
            }
          },
          "only_continuous": {
            "title": "Only the continuous series",
            "type": "boolean",
            "description": "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.",
            "default": false
          },
          "max_rows": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "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.",
            "default": 10000
          },
          "currency": {
            "title": "Currency of the `price` column",
            "enum": [
              "BRL",
              "USD",
              "EUR"
            ],
            "type": "string",
            "description": "`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.",
            "default": "USD"
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}