{
  "openapi": "3.0.1",
  "info": {
    "title": "France Fuel Prices (Open Data)",
    "description": "Cheapest petrol and diesel in France: search stations by area, nearby GPS search, and min/median/max price statistics for gazole, SP95, SP98, E10, E85, GPLc, with each price's update date. Official open data, unofficial tool, no personal data.",
    "version": "0.1",
    "x-build-id": "bmBxwLXezEJkmwxmZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/shadow-tools~france-fuel-prices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-shadow-tools-france-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/shadow-tools~france-fuel-prices/runs": {
      "post": {
        "operationId": "runs-sync-shadow-tools-france-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/shadow-tools~france-fuel-prices/run-sync": {
      "post": {
        "operationId": "run-sync-shadow-tools-france-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "nearby",
              "stats"
            ],
            "type": "string",
            "description": "Pick one. \"search\" = use to list stations in an area (department, region, postcode, city) or the whole of France, cheapest first when a fuel is given. \"nearby\" = use when you have GPS coordinates (latitude and longitude in decimal degrees) and want the cheapest or closest stations within radiusKm. \"stats\" = use to get min/median/mean/max price and the number of stations per fuel for an area (one record per fuel, or per department/region with groupBy), without station details. Allowed values: search, nearby, stats. Default: search.",
            "default": "search"
          },
          "fuel": {
            "title": "Fuel",
            "enum": [
              "gazole",
              "sp95",
              "sp98",
              "e10",
              "e85",
              "gplc"
            ],
            "type": "string",
            "description": "Fuel to price and sort by, e.g. \"gazole\". Allowed values: gazole (diesel B7), sp95 (unleaded 95), sp98 (unleaded 98), e10 (SP95-E10), e85 (superethanol), gplc (LPG). When set, only stations selling that fuel are returned, cheapest first. Empty = all fuels (search/nearby: stations in id/distance order with all their prices; stats: one record per fuel)."
          },
          "department": {
            "title": "Department",
            "maxItems": 50,
            "type": "array",
            "description": "French department codes or names as a list, e.g. [\"75\", \"2A\"] or [\"Rhône\"]. Metropolitan codes have two characters (\"01\", \"69\", \"2A\"), overseas three (\"971\"). Any of them matches (OR). Empty = all of France.",
            "items": {
              "type": "string"
            }
          },
          "region": {
            "title": "Region",
            "maxItems": 20,
            "type": "array",
            "description": "Region names or 2-digit region codes as a list, e.g. [\"Bretagne\"] or [\"53\"]. Exact name with accents as in the source, for example \"Île-de-France\", \"Auvergne-Rhône-Alpes\". Any of them matches (OR). Empty = all regions.",
            "items": {
              "type": "string"
            }
          },
          "postcode": {
            "title": "Postcode",
            "maxItems": 100,
            "type": "array",
            "description": "5-digit postal codes as a list, e.g. [\"69003\", \"75015\"]. Any of them matches (OR). Empty = no postcode filter.",
            "items": {
              "type": "string"
            }
          },
          "city": {
            "title": "City",
            "maxItems": 50,
            "type": "array",
            "description": "City name words as a list, e.g. [\"Lyon\", \"Saint-Étienne\"]. Matches the city name by words, accents and case ignored (\"Paris\" also matches \"Le Touquet-Paris-Plage\": add a postcode or department to be precise). Empty = no city filter.",
            "items": {
              "type": "string"
            }
          },
          "latitude": {
            "title": "Latitude (nearby mode)",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Latitude of the search centre in decimal degrees, e.g. 45.764 for Lyon. Required in nearby mode, ignored otherwise. Used in memory only: it is not written to the dataset or the run SUMMARY."
          },
          "longitude": {
            "title": "Longitude (nearby mode)",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "Longitude of the search centre in decimal degrees, e.g. 4.835 for Lyon. Required in nearby mode, ignored otherwise. Used in memory only: it is not written to the dataset or the run SUMMARY."
          },
          "radiusKm": {
            "title": "Radius in km (nearby mode)",
            "minimum": 0.1,
            "maximum": 100,
            "type": "number",
            "description": "Search radius around the point in kilometres, between 0.1 and 100, e.g. 10. Used only in nearby mode. Default: 10.",
            "default": 10
          },
          "services": {
            "title": "Required services",
            "maxItems": 10,
            "type": "array",
            "description": "Services the station must offer, as a list, e.g. [\"Lavage automatique\", \"Toilettes publiques\"]. ALL listed services are required (AND). Exact source names (French). Empty = no service filter.",
            "items": {
              "type": "string",
              "enum": [
                "Aire de camping-cars",
                "Automate CB 24/24",
                "Bar",
                "Bornes électriques",
                "Boutique alimentaire",
                "Boutique non alimentaire",
                "Carburant additivé",
                "DAB (Distributeur automatique de billets)",
                "Douches",
                "Espace bébé",
                "GNV",
                "Lavage automatique",
                "Lavage manuel",
                "Laverie",
                "Location de véhicule",
                "Piste poids lourds",
                "Relais colis",
                "Restauration sur place",
                "Restauration à emporter",
                "Services réparation / entretien",
                "Station de gonflage",
                "Toilettes publiques",
                "Vente d'additifs carburants",
                "Vente de fioul domestique",
                "Vente de gaz domestique (Butane, Propane)",
                "Vente de pétrole lampant",
                "Wifi"
              ]
            }
          },
          "open24h": {
            "title": "24/24 automated pump only",
            "type": "boolean",
            "description": "true to keep only stations flagged 24/24 automate (pumps usable day and night with a card), e.g. true. This is the station's own flag, not staffed opening hours. Default: false (no filter)."
          },
          "roadType": {
            "title": "Location type",
            "enum": [
              "any",
              "motorway",
              "road"
            ],
            "type": "string",
            "description": "Where the station is, e.g. \"motorway\". Allowed values: any (default), motorway (on a motorway, usually pricier), road (on an ordinary road)."
          },
          "fuelAvailability": {
            "title": "Fuel availability",
            "enum": [
              "any",
              "available",
              "temporary-shortage"
            ],
            "type": "string",
            "description": "Stock status of the chosen fuel, e.g. \"available\". Allowed values: any (default), available (exclude stations reporting a temporary shortage of that fuel; needs fuel), temporary-shortage (only stations reporting a shortage of that fuel, or of any fuel if fuel is empty)."
          },
          "maxPrice": {
            "title": "Maximum price (EUR per litre)",
            "minimum": 0.3,
            "maximum": 5,
            "type": "number",
            "description": "Highest accepted price of the chosen fuel in euros per litre, between 0.3 and 5, e.g. 1.9. Needs fuel. Empty = no limit (prices outside 0.30-5.00 EUR/L are always ignored as data errors)."
          },
          "maxPriceAgeDays": {
            "title": "Maximum price age (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Ignore prices not updated in the last N days, an integer between 1 and 365, e.g. 3. Some stations stop reporting and their old prices stay in the data, so set this for reliable results. Empty = no age filter."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "price",
              "distance",
              "id"
            ],
            "type": "string",
            "description": "Order of the stations, e.g. \"price\". Allowed values: price (cheapest first, needs fuel; default when fuel is set), distance (closest first, nearby mode only; default in nearby without fuel), id (stable order; default otherwise). Ignored in stats mode."
          },
          "groupBy": {
            "title": "Group statistics by (stats mode)",
            "enum": [
              "none",
              "department",
              "region"
            ],
            "type": "string",
            "description": "Only for stats mode: one statistics record per group, e.g. \"department\" to compare the 100 departments of France. Allowed values: none (default, one record per fuel for the whole area), department, region.",
            "default": "none"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of records returned (stations, or statistics records), an integer between 1 and 10000, e.g. 20. There are about 9,800 stations in France. Default: 20.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}