{
  "openapi": "3.0.1",
  "info": {
    "title": "Fuel Prices API: Cheapest Petrol & Diesel in France & Spain",
    "description": "Fuel prices for every filling station in France and Spain: petrol, diesel, E10 and LPG, cheapest first. From the governments' open data. Filter by city, postal code or radius, and schedule it to get only price changes.",
    "version": "0.1",
    "x-build-id": "9iy9WErw9taU0AgxA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/subtleasianmerch~fuel-prices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-subtleasianmerch-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/subtleasianmerch~fuel-prices/runs": {
      "post": {
        "operationId": "runs-sync-subtleasianmerch-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/subtleasianmerch~fuel-prices/run-sync": {
      "post": {
        "operationId": "run-sync-subtleasianmerch-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": "Whose official open data to read. France: about 9,800 stations, refreshed every 10 minutes. Spain: about 11,400 stations, refreshed every 30 minutes.",
            "items": {
              "type": "string",
              "enum": [
                "FR",
                "ES"
              ],
              "enumTitles": [
                "France (prix-carburants.gouv.fr)",
                "Spain (Geoportal Gasolineras)"
              ]
            },
            "default": [
              "FR",
              "ES"
            ]
          },
          "locations": {
            "title": "Cities or postal codes",
            "type": "array",
            "description": "One per line, e.g. Paris, Lyon, Madrid, A Coruña, 75015 or 28031. A shorter postal code covers an area: 75 is all of Paris, 28 all of Madrid province. City districts count too (\"Paris\" includes \"PARIS 13\"). Leave empty, with no point below, for every station in the chosen countries.",
            "items": {
              "type": "string"
            }
          },
          "latitude": {
            "title": "Latitude of a point (optional)",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "With longitude and radius: stations within the radius of this point, e.g. 48.8566 for central Paris. Combined with the cities above, a station is kept when it matches either."
          },
          "longitude": {
            "title": "Longitude of the point (optional)",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "E.g. 2.3522 for central Paris."
          },
          "radiusKm": {
            "title": "Radius around the point (km)",
            "minimum": 0.1,
            "maximum": 300,
            "type": "number",
            "description": "Used only with a latitude and longitude. Each station gets its distance from the point (distanceKm).",
            "default": 10
          },
          "fuels": {
            "title": "Fuel types",
            "type": "array",
            "description": "Only these fuels' prices are output, and stations selling none of them are left out, free. Leave empty for every fuel. Each price also keeps the source's own fuel name (e.g. Gazole, Gasoleo A).",
            "items": {
              "type": "string",
              "enum": [
                "diesel",
                "e10",
                "petrol_95",
                "petrol_98",
                "diesel_premium",
                "petrol_95_premium",
                "petrol_98_e10",
                "e85",
                "lpg",
                "cng",
                "lng",
                "adblue",
                "hydrogen",
                "diesel_renewable",
                "petrol_renewable",
                "diesel_offroad",
                "biodiesel",
                "bioethanol",
                "biocng",
                "biolng",
                "methanol",
                "ammonia"
              ],
              "enumTitles": [
                "Diesel (FR Gazole, ES Gasóleo A)",
                "Unleaded 95 E10 (FR E10, ES Gasolina 95 E10)",
                "Unleaded 95 E5 (FR SP95, ES Gasolina 95 E5)",
                "Super 98 (FR SP98, ES Gasolina 98 E5)",
                "Premium diesel (ES)",
                "Premium unleaded 95 (ES)",
                "Super 98 E10 (ES)",
                "E85 flex fuel (FR, ES)",
                "LPG autogas (FR GPLc, ES GLP)",
                "CNG, per kg (ES)",
                "LNG, per kg (ES)",
                "AdBlue (ES)",
                "Hydrogen, per kg (ES)",
                "Renewable diesel / HVO (ES)",
                "Renewable petrol (ES)",
                "Off-road diesel, gasóleo B (ES)",
                "Biodiesel (ES)",
                "Bioethanol (ES)",
                "Bio-CNG, per kg (ES)",
                "Bio-LNG, per kg (ES)",
                "Methanol (ES)",
                "Ammonia (ES)"
              ]
            }
          },
          "sortBy": {
            "title": "Order",
            "enum": [
              "cheapest",
              "nearest",
              "none"
            ],
            "type": "string",
            "description": "Cheapest first (by the first fuel type you chose, or diesel if none), nearest first (needs a point), or as the source lists them. With a limit below, the order decides which stations are kept.",
            "default": "cheapest"
          },
          "maxStationsPerCountry": {
            "title": "Most stations per country (optional)",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "E.g. 20 for the 20 cheapest stations in each country's matching area. Leave empty for every matching station. Each station delivered is charged."
          },
          "monitorId": {
            "title": "Monitor ID (for scheduled runs)",
            "type": "string",
            "description": "Any name, e.g. \"paris-diesel\". Runs with the same ID remember each station's last prices, so a schedule can report new stations and price changes, with the old price, the change and the percentage."
          },
          "onlyChanges": {
            "title": "Output only new stations and price changes",
            "type": "boolean",
            "description": "With a monitor ID: on, only stations that are new or whose price for a chosen fuel changed since the last run (unchanged stations are free); off, every station, with changes marked.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}