{
  "openapi": "3.0.1",
  "info": {
    "title": "Fuel Prices Scraper",
    "description": "Fuel prices at every petrol station in France, Spain and Italy from each government's open data, one row per station and fuel with address, coordinates and the time of the last price change. Filter by city, postcode, radius or fuel, rank the lowest prices in an area, or get only changed prices.",
    "version": "0.1",
    "x-build-id": "LDdLMloN4AyBcCoSu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deriverge~fuel-prices-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deriverge-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/deriverge~fuel-prices-scraper/runs": {
      "post": {
        "operationId": "runs-sync-deriverge-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/deriverge~fuel-prices-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-deriverge-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",
        "properties": {
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Countries to read. Leave empty for all three; with coordinates and no country, only the countries near the point are downloaded.",
            "items": {
              "type": "string",
              "enum": [
                "FR",
                "ES",
                "IT"
              ],
              "enumTitles": [
                "France",
                "Spain",
                "Italy"
              ]
            }
          },
          "locations": {
            "title": "Cities or postcodes",
            "type": "array",
            "description": "Keep only stations in these places: a city or town as the source writes it (Paris, Madrid, Roma; English names of large Italian and Spanish cities such as Rome or Seville work too), a full postcode such as 75015 or 28001, or the first digits of a postcode for a whole French department or Spanish province, such as 75 or 28. Paris, Lyon and Marseille include their districts.",
            "items": {
              "type": "string"
            }
          },
          "latitude": {
            "title": "Latitude",
            "type": "number",
            "description": "Centre of a radius search in decimal degrees, for example 48.8566. Use it with Longitude."
          },
          "longitude": {
            "title": "Longitude",
            "type": "number",
            "description": "Centre of a radius search in decimal degrees, for example 2.3522."
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 0.1,
            "maximum": 500,
            "type": "number",
            "description": "Keep stations within this distance of the point. Every row then gets distanceKm and the results are sorted by distance.",
            "default": 10
          },
          "fuelTypes": {
            "title": "Fuel types",
            "type": "array",
            "description": "Keep only these fuels. Leave empty for every fuel the stations sell.",
            "items": {
              "type": "string",
              "enum": [
                "petrol_95",
                "petrol_95_e10",
                "petrol_98",
                "petrol_premium",
                "diesel",
                "diesel_premium",
                "diesel_agricultural",
                "hvo",
                "biodiesel",
                "e85",
                "lpg",
                "cng",
                "lng",
                "hydrogen",
                "adblue",
                "other"
              ],
              "enumTitles": [
                "Petrol 95 (SP95, Benzina, Gasolina 95 E5)",
                "Petrol 95 E10",
                "Petrol 98 or higher octane",
                "Premium petrol (branded blends)",
                "Diesel (Gazole, Gasolio, Gasóleo A)",
                "Premium diesel (branded and winter blends)",
                "Agricultural diesel (Spanish Gasóleo B)",
                "HVO renewable diesel",
                "Biodiesel",
                "E85 bioethanol",
                "LPG (GPL, autogas)",
                "CNG compressed natural gas, per kg",
                "LNG liquefied natural gas, per kg",
                "Hydrogen, per kg",
                "AdBlue",
                "Other fuels"
              ]
            }
          },
          "brands": {
            "title": "Brands",
            "type": "array",
            "description": "Keep only stations whose brand contains one of these words, for example Repsol, Q8 or Eni. France publishes no brand, so this filter leaves out French stations.",
            "items": {
              "type": "string"
            }
          },
          "maxAgeDays": {
            "title": "Skip prices older than (days)",
            "minimum": 1,
            "type": "integer",
            "description": "Leave out prices the station has not confirmed for this many days. Empty keeps every price, except in the lowest-priced mode, which uses 7 days unless you set it."
          },
          "mode": {
            "title": "Output",
            "enum": [
              "snapshot",
              "lowest",
              "changes"
            ],
            "type": "string",
            "description": "Latest prices returns every matching price. Lowest-priced stations ranks the stations in each place and fuel by price. Changes compares with the snapshot of the last run of the same watch name or task and returns only new prices and prices that went up or down.",
            "default": "snapshot"
          },
          "stationsPerArea": {
            "title": "Stations per place and fuel (lowest-priced mode)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many of the lowest-priced stations to return for each place and fuel type.",
            "default": 5
          },
          "watchName": {
            "title": "Watch name (changes mode)",
            "type": "string",
            "description": "Name of the snapshot the changes mode compares with, for example \"madrid-diesel\". Runs from a saved task get one automatically."
          },
          "maxItems": {
            "title": "Maximum prices",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many rows, so the cost of a run stays predictable. All three countries together hold about 167,000 prices.",
            "default": 10000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}