{
  "openapi": "3.0.1",
  "info": {
    "title": "Fuel Prices Scraper: Gas Station Prices from Official Data",
    "description": "Official fuel prices per gas station from government open data: France, Spain, Italy, Germany, UK and Mexico. Diesel, petrol, E10, LPG and CNG prices with brand, address, opening hours and update time. Export to JSON, CSV or Excel, or via API.",
    "version": "1.0",
    "x-build-id": "qEVO1eybOgY8VLgUn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/steadyscrape~fuel-prices-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-steadyscrape-fuel-prices-scraper",
        "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/steadyscrape~fuel-prices-scraper/runs": {
      "post": {
        "operationId": "runs-sync-steadyscrape-fuel-prices-scraper",
        "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/steadyscrape~fuel-prices-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-steadyscrape-fuel-prices-scraper",
        "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",
        "required": [
          "countries"
        ],
        "properties": {
          "countries": {
            "title": "Countries",
            "minItems": 1,
            "type": "array",
            "description": "The official fuel price sources to search. Each place below is searched in every country picked; a place a country does not have is skipped, and a free row says so only when no country has it.",
            "items": {
              "type": "string",
              "enum": [
                "FR",
                "ES",
                "IT",
                "DE",
                "GB",
                "MX"
              ],
              "enumTitles": [
                "France (prix-carburants, every station)",
                "Spain (MITECO Geoportal, every station)",
                "Italy (MIMIT Osservaprezzi, every station)",
                "Germany (Tankerkönig, needs your free API key)",
                "United Kingdom (retailer feeds: Asda, Esso, JET, SGN, Moto…)",
                "Mexico (CNE/CRE feeds, search around a point)"
              ]
            },
            "default": [
              "FR"
            ]
          },
          "places": {
            "title": "Cities or postcodes",
            "type": "array",
            "description": "Each one is its own search: a city, town or municipality (<code>Lyon</code>, <code>Madrid</code>, <code>Milano</code>, <code>Coventry</code>), a province or region name (<code>Asturias</code>, <code>Córdoba</code>), or a postcode (<code>75011</code>, <code>28001</code>, <code>SW1A 1AA</code> or just <code>CV3</code>). In France a 2-digit department code (<code>69</code>, <code>2A</code>) reads the whole department. Leave empty, with no point below, to read whole countries. Italy is searched by town, Mexico and Germany only around a point.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "latitude": {
            "title": "Latitude",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Search around a point as well, within the radius below: <code>48.8566</code>. It needs a longitude. The only way to search Mexico and Germany."
          },
          "longitude": {
            "title": "Longitude",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "<code>2.3522</code>."
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 0.1,
            "maximum": 50,
            "type": "number",
            "description": "Stations within this distance of the point, each with its distance. Germany's source answers up to 25 km.",
            "default": 5
          },
          "fuelTypes": {
            "title": "Fuel types",
            "type": "array",
            "description": "Only stations that sell one of these, and only these fuels' prices in each row. Empty: every fuel. The first one is also the fuel <b>Sort by</b> compares (diesel when empty).",
            "items": {
              "type": "string",
              "enum": [
                "diesel",
                "diesel_premium",
                "gasoline",
                "gasoline_e10",
                "gasoline_premium",
                "e85",
                "lpg",
                "cng",
                "lng",
                "hydrogen",
                "biodiesel",
                "renewable_diesel",
                "adblue",
                "other"
              ],
              "enumTitles": [
                "Diesel (standard)",
                "Premium diesel",
                "Petrol, standard grade (95 E5, Super 95, Magna, súper)",
                "Petrol E10",
                "Premium petrol (98, super unleaded, Premium)",
                "E85 bioethanol",
                "LPG (autogas, GPL)",
                "CNG (natural gas, metano, GNC)",
                "LNG",
                "Hydrogen",
                "Biodiesel",
                "Renewable diesel (HVO)",
                "AdBlue",
                "Any other product"
              ]
            },
            "default": []
          },
          "brands": {
            "title": "Brands",
            "type": "array",
            "description": "Only stations whose brand or name contains one of these words: <code>Total</code>, <code>Repsol</code>, <code>Shell</code>, <code>Esso</code>. France's official feed names no brand, so a brand filter leaves out every French station.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "cheapest",
              "nearest",
              "source"
            ],
            "type": "string",
            "description": "Cheapest first compares the first fuel picked above (stations without it come last); nearest first works for a point search. Each search is sorted on its own.",
            "default": "cheapest"
          },
          "maxStations": {
            "title": "Max stations per search",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most stations each place, point or country gives, after sorting: the 20 cheapest in Paris, say. Whole France is about 9,800 stations, Spain 11,500, Italy 22,000.",
            "default": 100
          },
          "maxPriceAgeDays": {
            "title": "Leave out prices older than (days)",
            "minimum": 0,
            "maximum": 36500,
            "type": "integer",
            "description": "A price the station last reported more than this many days ago is left out, and a station with no price left is skipped: a station that stopped reporting keeps its last price in the feed. 0 keeps every price. Spain dates every price at the file's time, and Mexico and Germany date none, so it does not filter them.",
            "default": 90
          },
          "onlyChanged": {
            "title": "Only stations whose price changed since the last run",
            "type": "boolean",
            "description": "For a scheduled run: the first run delivers every station and saves its prices; each later run with the same search delivers only stations whose prices changed (or that are new), each marked <code>changed</code> or <code>new</code>, and a free row when none did.",
            "default": false
          },
          "tankerkoenigApiKey": {
            "title": "Tankerkönig API key (Germany)",
            "type": "string",
            "description": "Germany's prices come from Tankerkönig (MTS-K data, CC BY 4.0), which asks every user for their own free key: register at <a href=\"https://onboarding.tankerkoenig.de\">onboarding.tankerkoenig.de</a>. Without it Germany gives a free row."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}