Api Endpoint

opendata402

Live fuel prices at every filling station in Spain (Ministry for the Ecological Transition, updated every 30 minutes): diesel, petrol 95/98, LPG, CNG, renewable diesel and AdBlue per station, by province (INE code 01-52) and optional town, with brand, address, coordinates and opening hours. Sort by price for one fuel. Spanish government open data, reuse with source and update date.

Open interactive test console

Offering

Provider
opendata402.com
Method
GET
Offering type
Api Endpoint
Transport type
http
Category
Location And Travel
Delivery
Not provided
Pricing model
Not provided
x402 version
2

Endpoint context

URL
https://opendata402.com/v1/fuel/es
MIME type
application/json
First seen
2026-10-16T01:50:24.663Z
Last seen
Tags
fuel, Prices, spain, petrol, diesel

Payment pricing

x402 payment terms are the authoritative price for calling this endpoint.

Payment option 1
0.001 USDC
Atomic price: 1000 · Network: eip155:8453 · Asset: USDC · Scheme: exact
Payment option 2
0.001 USDC
Atomic price: 1000 · Network: eip155:137 · Asset: USDC · Scheme: exact
Payment option 3
0.001 USDC
Atomic price: 1000 · Network: eip155:42161 · Asset: USDC · Scheme: exact
Raw x402 terms
[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "1000",
    "payTo": "0x295AA6c5a3460A0f8755823C8eE7bBC7CAf79fb1"
  },
  {
    "scheme": "exact",
    "network": "eip155:137",
    "asset": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
    "amount": "1000",
    "payTo": "0x295AA6c5a3460A0f8755823C8eE7bBC7CAf79fb1"
  },
  {
    "scheme": "exact",
    "network": "eip155:42161",
    "asset": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
    "amount": "1000",
    "payTo": "0x295AA6c5a3460A0f8755823C8eE7bBC7CAf79fb1"
  }
]

Observed health

Status
Healthy
Latest latency
182 ms
Average latency
441 ms
HTTP status
402
Last checked
Reachability
100% over 14 checks

Latency is measured to the first response headers. A reachable result does not verify response accuracy or merchant identity.

Input schema

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "http"
    },
    "method": {
      "type": "string",
      "enum": [
        "GET"
      ]
    },
    "queryParams": {
      "type": "object",
      "properties": {
        "province": {
          "type": "string",
          "pattern": "^(0[1-9]|[1-4][0-9]|5[0-2])$",
          "description": "Spanish province INE code, e.g. 28 = Madrid, 08 = Barcelona."
        },
        "town": {
          "type": "string",
          "pattern": "^[\\p{L} '-]{2,40}$",
          "description": "Town or municipality (part of the name)."
        },
        "fuel": {
          "type": "string",
          "enum": [
            "diesel",
            "diesel_premium",
            "e5_95",
            "e10_95",
            "e5_98",
            "lpg",
            "cng",
            "hvo",
            "adblue"
          ],
          "description": "Sort by the price of this fuel (cheapest first)."
        },
        "limit": {
          "type": "string",
          "pattern": "^([1-9]|[1-4][0-9]|50)$",
          "description": "Max stations (default 20, max 50)."
        }
      },
      "required": [
        "province"
      ]
    }
  },
  "required": [
    "type",
    "method"
  ],
  "additionalProperties": false
}

Output schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "input": {
      "additionalProperties": false,
      "properties": {
        "method": {
          "enum": [
            "GET"
          ],
          "type": "string"
        },
        "queryParams": {
          "properties": {
            "fuel": {
              "description": "Sort by the price of this fuel (cheapest first).",
              "enum": [
                "diesel",
                "diesel_premium",
                "e5_95",
                "e10_95",
                "e5_98",
                "lpg",
                "cng",
                "hvo",
                "adblue"
              ],
              "type": "string"
            },
            "limit": {
              "description": "Max stations (default 20, max 50).",
              "pattern": "^([1-9]|[1-4][0-9]|50)$",
              "type": "string"
            },
            "province": {
              "description": "Spanish province INE code, e.g. 28 = Madrid, 08 = Barcelona.",
              "pattern": "^(0[1-9]|[1-4][0-9]|5[0-2])$",
              "type": "string"
            },
            "town": {
              "description": "Town or municipality (part of the name).",
              "pattern": "^[\\p{L} '-]{2,40}$",
              "type": "string"
            }
          },
          "required": [
            "province"
          ],
          "type": "object"
        },
        "type": {
          "const": "http",
          "type": "string"
        }
      },
      "required": [
        "type",
        "method"
      ],
      "type": "object"
    },
    "output": {
      "properties": {
        "example": {
          "type": "object"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}