# Cheapest diesel in Madrid today

**Use case:** 

The 10 cheapest diesel prices in Madrid, from the Spanish Ministry's official data (updated every 30 minutes).

## Input

```json
{
  "countries": [
    "ES"
  ],
  "fuelTypes": [
    "diesel"
  ],
  "municipality": "Madrid",
  "radiusKm": 10,
  "sortBy": "price",
  "maxResultsPerFuel": 10,
  "maxPriceAgeDays": 30,
  "excludeOutliers": true,
  "averageCountries": [
    "PT",
    "ES",
    "FR",
    "IT",
    "DE"
  ],
  "mode": "snapshot",
  "monitorId": "default"
}
```

## Output

```json
{
  "country": {
    "label": "Country",
    "format": "string"
  },
  "stationName": {
    "label": "Station",
    "format": "string"
  },
  "brand": {
    "label": "Brand",
    "format": "string"
  },
  "municipality": {
    "label": "Municipality",
    "format": "string"
  },
  "region": {
    "label": "Region",
    "format": "string"
  },
  "fuelType": {
    "label": "Fuel type",
    "format": "string"
  },
  "fuelName": {
    "label": "Local fuel name",
    "format": "string"
  },
  "price": {
    "label": "Price (EUR)",
    "format": "number"
  },
  "unit": {
    "label": "Unit",
    "format": "string"
  },
  "serviceMode": {
    "label": "Service",
    "format": "string"
  },
  "priceUpdatedAt": {
    "label": "Price updated",
    "format": "string"
  },
  "distanceKm": {
    "label": "Distance (km)",
    "format": "number"
  },
  "previousPrice": {
    "label": "Previous price",
    "format": "number"
  },
  "priceChange": {
    "label": "Change",
    "format": "number"
  },
  "changeType": {
    "label": "Change type",
    "format": "string"
  },
  "latitude": {
    "label": "Latitude",
    "format": "number"
  },
  "longitude": {
    "label": "Longitude",
    "format": "number"
  },
  "address": {
    "label": "Address",
    "format": "string"
  },
  "postalCode": {
    "label": "Postal code",
    "format": "string"
  },
  "stationId": {
    "label": "Station ID",
    "format": "string"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The European Fuel Prices: 7 Countries by Station + 29 Averages Actor is ready to run with the inputs already set for "Cheapest diesel in Madrid today". [Sign up or log in](https://console.apify.com/create-task-from-example/DLbAuwVlA9y9Z1OCx) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Cheapest diesel in Madrid today" task

The European Fuel Prices: 7 Countries by Station + 29 Averages Actor will start running based on the input automatically. You can also change all the input fields, like countries, fuel types, and more, to match your specific use case.

### 3. Receive the "Cheapest diesel in Madrid today" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as country, station, brand, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Cheapest diesel in Madrid today" task via API](https://apify.com/yodeling_november/eu-fuel-prices.md).

## About this Actor

This example demonstrates how to use [European Fuel Prices: 7 Countries by Station + 29 Averages](https://apify.com/yodeling_november/eu-fuel-prices.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/yodeling_november/eu-fuel-prices.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/yodeling_november/eu-fuel-prices.md

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`).
