# Fuel Prices: US & EU Gasoline and Diesel (`weirworks/fuel-prices-us-eu`) Actor

Weekly gasoline and diesel prices for the US (national, regions, states, cities from EIA) and all EU countries (EU Weekly Oil Bulletin), normalized to one table with week-over-week and year-over-year changes in USD/gal and EUR/L.

- **URL**: https://apify.com/weirworks/fuel-prices-us-eu.md
- **Developed by:** [Weirworks](https://apify.com/weirworks) (community)
- **Categories:** Travel, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 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

## Fuel Prices: US & EU Gasoline and Diesel

Weekly **gasoline and diesel prices for the United States and every EU country** in one clean table, with week-over-week and year-over-year changes, in both **USD per gallon** and **EUR per litre**.

The data comes from official government sources only, not crowdsourced station apps:

- **US:** the U.S. Energy Information Administration (EIA) weekly retail price survey. It covers the national average, PADD regions, 9 states (CA, CO, FL, MA, MN, NY, OH, TX, WA) and 10 major cities.
- **EU:** the European Commission's *Weekly Oil Bulletin*, which gives consumer prices including taxes for all 27 member states.

Built for fleet and logistics cost tracking, energy analysts and traders, journalists covering the fuel-price shock, newsletters, dashboards and AI agents.

### Features

- **US and EU side by side:** every row has USD/gal, USD/L and EUR/L, converted with the latest ECB rate, so a Californian gallon and a German litre are directly comparable.
- **Changes built in:**
  - US rows include week-over-week and year-over-year change, in absolute terms and as a percentage.
  - EU rows include the change since the previous bulletin (from your second run on).
- **Products:**
  - US: regular, midgrade and premium gasoline, all grades, and diesel.
  - EU: Euro-super 95, diesel, heating oil and LPG.
- **Time series:** add up to 52 weeks of US history per series.
- **Fast and cheap:** official open-data APIs and files, no proxy. A full run takes about 20 seconds.

### Input

```json
{
  "regions": ["US", "EU"],
  "products": ["gasoline_regular", "diesel"],
  "usAreaTypes": ["national", "state", "city"],
  "euCountries": [],
  "usHistoryWeeks": 0
}
```

### Output

```json
{
  "source": "EIA",
  "region": "US",
  "area": "California",
  "areaType": "state",
  "product": "gasoline_regular",
  "period": "2026-09-28",
  "priceUsdPerGallon": 6.189,
  "priceUsdPerLiter": 1.635,
  "priceEurPerLiter": 1.4565,
  "changeWoW": 0.186,
  "changeWoWPct": 3.1,
  "changeYoY": 1.743,
  "changeYoYPct": 39.2,
  "isLatest": true
}
```

EU rows have `"source": "EU Weekly Oil Bulletin"`, the country code in `country`, `taxesIncluded: true` and `changeSincePreviousPct`.

### Update schedule

- **EIA:** publishes every Monday.
- **EU bulletin:** published weekly, usually on Monday or Tuesday.

Schedule this Actor weekly for a running price history.

### Pricing

**$2 per 1,000 price rows.** A full US + EU run (about 120 rows) costs about $0.25. No start fee.

### Sources and attribution

- **U.S. Energy Information Administration:** Gasoline and Diesel Fuel Update.
- **European Commission, DG Energy:** Weekly Oil Bulletin.
- **Exchange rates:** European Central Bank, via the Frankfurter API.

This Actor isn't endorsed by EIA or the European Commission.

Questions: open an issue or email **hello@weirworks.com**.

# Actor input Schema

## `regions` (type: `array`):

Which markets to include.

## `products` (type: `array`):

Fuel types.

## `usAreaTypes` (type: `array`):

EIA publishes these area levels weekly.

## `euCountries` (type: `array`):

Two-letter codes, e.g. <code>DE</code>, <code>FR</code>. Leave empty for all 27.

## `usHistoryWeeks` (type: `integer`):

Also output this many past weekly prices for each US series (time series).

## `proxyConfiguration` (type: `object`):

Not needed: official open-data sources.

## Actor input object example

```json
{
  "regions": [
    "US",
    "EU"
  ],
  "products": [
    "gasoline_regular",
    "gasoline_premium",
    "diesel"
  ],
  "usAreaTypes": [
    "national",
    "region",
    "state",
    "city"
  ],
  "usHistoryWeeks": 0,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

The dataset rows.

# 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 = {
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("weirworks/fuel-prices-us-eu").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 = { "proxyConfiguration": { "useApifyProxy": False } }

# Run the Actor and wait for it to finish
run = client.actor("weirworks/fuel-prices-us-eu").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 '{
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call weirworks/fuel-prices-us-eu --silent --output-dataset

```

## MCP server setup

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

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/tGxUHBXrmkOnPgSDM/builds/A1KpdGAsCY5vSBxXF/openapi.json
