# France Fuel Price Alerts: Cheap Diesel & Price Jumps (`shelly_fen/france-fuel-price-alerts`) Actor

Alerts for French fuel stations priced well below their department average or with sharp price increases since your last run. Official prix-carburants open data (Licence Ouverte 2.0), ~9,800 stations, updated every ~10 min. Pay only per flagged station.

- **URL**: https://apify.com/shelly_fen/france-fuel-price-alerts.md
- **Developed by:** [shelly_fen](https://apify.com/shelly_fen) (community)
- **Categories:** Travel, Business, MCP servers
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 flagged stations

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

## France Fuel Price Alerts – Cheap Diesel & Price Jumps

Get **only the French fuel stations that matter today**: stations priced **well below their department average**, and stations whose price **jumped since your last run**. Built on the official French government feed *prix-carburants* (~9,800 stations, updated about every 10 minutes). You pay only for flagged stations, never for the whole dataset.

**Who it's for:** fleet managers, logistics and transport companies, fuel-card resellers, price-comparison and AI assistants that need "where is diesel cheap in Rhône today?".

### What it does

1. Downloads the official feed (optionally only your departments).
2. Computes the average price per department and fuel.
3. Compares each station with the price saved from your previous run (in a named key-value store).
4. Flags `well_below_department_avg` (default ≥ 5% cheaper) and `sharp_increase` (default ≥ 3% up since last run).
5. Skips alerts already returned (same reason, same price) – you are not charged twice.

### What it does NOT do

- No price history or forecasts; "since last run" only.
- No route planning (yet). No stations outside France.
- Prices come from stations' own declarations to the government; a few may be stale or wrong. Check `priceUpdatedAt`.
- The first run has no previous prices, so only "below average" alerts appear.

### Input example

```json
{ "departments": ["69", "01"], "fuels": ["gazole"], "belowAvgPct": 5, "risePct": 3, "stateKey": "lyon-fleet" }
```

### Output example

```json
{ "alerts": ["well_below_department_avg"], "fuelName": "Diesel (Gazole)", "price": 2.159, "departmentAvg": 2.31,
  "pctVsDepartmentAvg": -6.54, "previousPrice": 2.159, "pctChangeSinceLastRun": 0.0, "city": "Lyon", "postcode": "69007",
  "address": "…", "department": "69", "lat": 45.73, "lon": 4.84, "priceUpdatedAt": "2026-10-14T06:01:00+00:00", "attribution": "Source: …" }
```

### Pricing (pay per event)

- $0.005 per run (start) + **$0.002 per flagged station**.
- Example: daily run on 2 departments, ~10 alerts/day → about $0.025/day, **~$0.75/month**.
- Example: all of France, diesel, 5% → first run ~375 rows ≈ $0.76; later runs only new alerts. Use `baselineOnly` for a cheap first run.
- Set a max charge per run in Apify to cap spending.

### Delivery

- **Schedule** the Actor (e.g. every morning) and use Apify integrations to send results by **email, Slack, or webhook**.
- **AI / MCP:** available as a tool via Apify MCP (`https://mcp.apify.com/?tools=shelly_fen/france-fuel-price-alerts`).

### FAQ

**How fresh is the data?** The government feed refreshes roughly every 10 minutes; each row includes the station's own update time.
**Why only diesel by default?** E85 and LPG prices vary a lot between stations, so they flag many rows. Add them in `fuels` if you need them.
**Will I get the same alert every day?** No. An alert returns again only if the price changes or the condition clears and comes back.
**Different watchlists?** Use a different `stateKey` for each.

### Data source and license

Ministère de l'Économie – "Prix des carburants en France – Flux instantané v2", data.economie.gouv.fr, published on data.gouv.fr under **Licence Ouverte / Open Licence 2.0** (Etalab), which allows commercial reuse with attribution. Each row carries the attribution and the update date. This Actor is not affiliated with the French government.

# Changelog

This Actor's version history is a separate document: https://apify.com/shelly_fen/france-fuel-price-alerts/changelog.md

# Actor input Schema

## `departments` (type: `array`):

French department codes, e.g. 75 (Paris), 69 (Rhône), 13 (Bouches-du-Rhône), 2A. Strongly recommended: all of France can return hundreds of rows on the first run.

## `fuels` (type: `array`):

gazole (diesel), sp95, sp98, e10, e85, gplc (LPG). Default: diesel only. E85/LPG prices vary widely, so they flag many stations.

## `belowAvgPct` (type: `integer`):

Flag if cheaper than department average by at least (%).

## `risePct` (type: `integer`):

Flag if price rose since last run by at least (%).

## `minStations` (type: `integer`):

Min stations per department+fuel to compute an average.

## `stateKey` (type: `string`):

Use a different name for each watchlist. Same alert is never returned twice.

## `baselineOnly` (type: `boolean`):

Use for a free-of-rows first run so later runs only report new changes.

## `maxResults` (type: `integer`):

Max rows per run.

## Actor input object example

```json
{
  "departments": [
    "69"
  ],
  "fuels": [
    "gazole"
  ],
  "belowAvgPct": 5,
  "risePct": 3,
  "minStations": 5,
  "stateKey": "fr-fuel-alerts-state",
  "baselineOnly": false,
  "maxResults": 500
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `full` (type: `string`):

No description

# 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 = {
    "departments": [
        "69"
    ],
    "fuels": [
        "gazole"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("shelly_fen/france-fuel-price-alerts").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 = {
    "departments": ["69"],
    "fuels": ["gazole"],
}

# Run the Actor and wait for it to finish
run = client.actor("shelly_fen/france-fuel-price-alerts").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 '{
  "departments": [
    "69"
  ],
  "fuels": [
    "gazole"
  ]
}' |
apify call shelly_fen/france-fuel-price-alerts --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,shelly_fen/france-fuel-price-alerts"
        }
    }
}
```

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/kbeudLWmGKxQASOKL/builds/G3rEsfONqDd6MWHlb/openapi.json
