{
  "openapi": "3.0.1",
  "info": {
    "title": "EU Fuel Prices: Spain & France Gas Station Prices",
    "description": "Diesel, petrol 95/98, LPG and E85 prices per gas station in Spain and France from the official ministry open data. Radius search, cheapest N, brand filter, only-changed mode. Fleet fuel cost and price comparison.",
    "version": "1.0",
    "x-build-id": "glZBBa62ow9BZLuhT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/atesen-software~eu-fuel-prices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-atesen-software-eu-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/atesen-software~eu-fuel-prices/runs": {
      "post": {
        "operationId": "runs-sync-atesen-software-eu-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/atesen-software~eu-fuel-prices/run-sync": {
      "post": {
        "operationId": "run-sync-atesen-software-eu-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": {
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Official open-data sources to read. Spain (ES) and France (FR) are available. Without a location, region or postal code a country is searched as a whole, which is slow for Spain (the ministry server delivers only a few KB per second per download).",
            "items": {
              "type": "string",
              "enum": [
                "ES",
                "FR"
              ],
              "enumTitles": [
                "Spain",
                "France"
              ]
            },
            "default": [
              "ES",
              "FR"
            ]
          },
          "fuelTypes": {
            "title": "Fuel types",
            "type": "array",
            "description": "Fuel types to return. diesel = standard diesel (Gasoleo A / Gazole). One row is returned per station and fuel type. France does not publish diesel_premium.",
            "items": {
              "type": "string",
              "enum": [
                "diesel",
                "diesel_premium",
                "petrol95",
                "petrol95_e10",
                "petrol98",
                "lpg",
                "e85"
              ],
              "enumTitles": [
                "Diesel (standard)",
                "Diesel (premium)",
                "Petrol 95 (E5)",
                "Petrol 95 (E10)",
                "Petrol 98",
                "LPG (autogas)",
                "E85 (bioethanol)"
              ]
            },
            "default": [
              "diesel"
            ]
          },
          "latitude": {
            "title": "Latitude",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Centre of a radius search, decimal degrees (for example 40.4168 for Madrid). Give both latitude and longitude, or neither."
          },
          "longitude": {
            "title": "Longitude",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "Centre of a radius search, decimal degrees (for example -3.7038 for Madrid)."
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 0.1,
            "maximum": 200,
            "type": "number",
            "description": "Search radius around the centre point, 0.1 to 200 km (default 10). Ignored when no latitude and longitude are given.",
            "default": 10
          },
          "postalCode": {
            "title": "Postal code (optional)",
            "type": "string",
            "description": "Only stations whose postal code starts with this value (for example 28013 or 75). For Spain the first two digits also choose the province, so this is a fast way to search without coordinates."
          },
          "city": {
            "title": "City or locality (optional)",
            "type": "string",
            "description": "Only stations whose locality contains this text, accents and case ignored (for example Valencia, Lyon). Without coordinates, postal code or province Spain is downloaded in full, which is slow."
          },
          "region": {
            "title": "Province or department (optional)",
            "type": "string",
            "description": "Spanish province name or two-digit code (Madrid, Barcelona, 46) or French department name or code (Rhone, 69, 2A). Narrows the search and makes Spanish runs faster."
          },
          "brands": {
            "title": "Brands (optional)",
            "type": "array",
            "description": "Keep only stations whose sign or brand contains one of these words (for example Repsol, Cepsa, BP). Spain only: the French open feed has no brand field, so a brand filter returns no French station.",
            "items": {
              "type": "string"
            }
          },
          "maxStations": {
            "title": "Cheapest N stations",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many stations to return per country and fuel type, cheapest first (or nearest first, see sort order).",
            "default": 10
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "price",
              "distance"
            ],
            "type": "string",
            "description": "price = cheapest first, distance = nearest first (needs latitude and longitude). The cut to N stations follows the same order.",
            "default": "price"
          },
          "onlyChanged": {
            "title": "Only prices that changed since the last run",
            "type": "boolean",
            "description": "Saves the returned prices of this exact query in a key-value store (the one you pick below, otherwise the store named eu-fuel-prices-state in your account). Later runs with the same query return only new or changed prices, which is useful for scheduled monitoring. The first run returns everything as the baseline.",
            "default": false
          },
          "stateStore": {
            "title": "Change-history store (pick one)",
            "type": "string",
            "description": "Key-value store that keeps the prices of each query between runs. Pick or create a store here to use the only-changed mode. This works with the Actor's limited permissions. Leave it empty to use the named store eu-fuel-prices-state in your account, or to run without change history."
          },
          "includeRestrictedSales": {
            "title": "Include members-only stations",
            "type": "boolean",
            "description": "Spain lists some stations (mostly cooperatives) that sell to members only. They are left out unless you switch this on.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum rows per run",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on the rows of one run, as a safety limit on top of your maximum cost per run.",
            "default": 5000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}