{
  "openapi": "3.0.1",
  "info": {
    "title": "Italy Fuel Prices – Cheapest Petrol & Diesel Stations",
    "description": "Daily petrol, diesel, LPG and CNG prices for 23,000+ Italian fuel stations from the MIMIT open data (IODL 2.0). Radius, region, province, town and brand search; sort by price or distance. One charge per station.",
    "version": "1.0",
    "x-build-id": "3nWvWpFn3boxAAUKi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nobler_zirconia~italy-fuel-prices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nobler_zirconia-italy-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/nobler_zirconia~italy-fuel-prices/runs": {
      "post": {
        "operationId": "runs-sync-nobler_zirconia-italy-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/nobler_zirconia~italy-fuel-prices/run-sync": {
      "post": {
        "operationId": "run-sync-nobler_zirconia-italy-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": {
          "fuelCategories": {
            "title": "Fuel types",
            "type": "array",
            "description": "Keep only these fuel types. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "benzina",
                "gasolio",
                "gpl",
                "metano",
                "gnl",
                "other"
              ],
              "enumTitles": [
                "Petrol (benzina)",
                "Diesel (gasolio, incl. HVO)",
                "LPG (GPL)",
                "CNG (metano)",
                "LNG (GNL)",
                "Other"
              ]
            }
          },
          "includePremium": {
            "title": "Include premium & HVO products",
            "type": "boolean",
            "description": "Off = only the standard products (Benzina, Gasolio, GPL, Metano, GNL). Each price row has fuelVariant standard / premium / hvo.",
            "default": true
          },
          "serviceType": {
            "title": "Service",
            "enum": [
              "any",
              "self",
              "served"
            ],
            "type": "string",
            "description": "Filter prices by self-service or attended pumps.",
            "default": "any"
          },
          "maxPrice": {
            "title": "Max price (EUR)",
            "minimum": 0,
            "type": "number",
            "description": "Drop prices above this value (EUR per litre, or per kg for CNG/LNG)."
          },
          "maxPriceAgeDays": {
            "title": "Ignore prices older than (days)",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Drops prices a station last communicated more than this many days ago (an unchanged price is not necessarily wrong; each price has updatedAt). 0 = keep all.",
            "default": 30
          },
          "provinces": {
            "title": "Provinces (vehicle code)",
            "type": "array",
            "description": "e.g. BO, MI, RM. Combined with AND with every other location filter, including the radius.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            }
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "Combined with AND with the other location filters.",
            "items": {
              "type": "string",
              "enum": [
                "Abruzzo",
                "Basilicata",
                "Calabria",
                "Campania",
                "Emilia-Romagna",
                "Friuli-Venezia Giulia",
                "Lazio",
                "Liguria",
                "Lombardia",
                "Marche",
                "Molise",
                "Piemonte",
                "Puglia",
                "Sardegna",
                "Sicilia",
                "Toscana",
                "Trentino-Alto Adige/Südtirol",
                "Umbria",
                "Valle d'Aosta/Vallée d'Aoste",
                "Veneto"
              ]
            }
          },
          "comuni": {
            "title": "Towns (comuni)",
            "type": "array",
            "description": "Town names, e.g. Bergamo, Roma.",
            "items": {
              "type": "string"
            }
          },
          "latitude": {
            "title": "Latitude (radius search)",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Centre of a radius search in decimal degrees, e.g. 44.4949 (Bologna). Give both latitude and longitude, or neither. Distance is straight-line, not by road."
          },
          "longitude": {
            "title": "Longitude (radius search)",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "e.g. 11.3426"
          },
          "radiusKm": {
            "title": "Radius (km, straight-line)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Used only with latitude/longitude.",
            "default": 5
          },
          "brands": {
            "title": "Brands",
            "type": "array",
            "description": "Contains-match, e.g. Eni, Q8, IP, Esso, Tamoil, Pompe Bianche (unbranded).",
            "items": {
              "type": "string"
            }
          },
          "stationTypes": {
            "title": "Station types",
            "type": "array",
            "description": "Empty = both.",
            "items": {
              "type": "string",
              "enum": [
                "Stradale",
                "Autostradale"
              ],
              "enumTitles": [
                "Road (Stradale)",
                "Motorway (Autostradale)"
              ]
            }
          },
          "stationIds": {
            "title": "Station IDs (watchlist)",
            "type": "array",
            "description": "MIMIT station IDs (stationId in the output) to monitor on a schedule. Each ID gets a free status row: FOUND, FOUND_NO_MATCHING_PRICE or NOT_FOUND.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "none",
              "price",
              "distance"
            ],
            "type": "string",
            "description": "Defaults to nearest first when coordinates are set."
          },
          "sortFuelCategory": {
            "title": "Compare price of",
            "enum": [
              "benzina",
              "gasolio",
              "gpl",
              "metano",
              "gnl",
              "other"
            ],
            "type": "string",
            "description": "Product used for 'cheapest first'. Defaults to the first selected fuel type (or diesel). Stations without it are excluded from the ranking."
          },
          "sortServiceType": {
            "title": "Compare service",
            "enum": [
              "self",
              "served",
              "any"
            ],
            "type": "string",
            "description": "Service used for 'cheapest first'.",
            "default": "self"
          },
          "comparisonVariant": {
            "title": "Compare variants",
            "enum": [
              "standard",
              "any"
            ],
            "type": "string",
            "description": "By default premium/HVO products are not ranked against standard fuel.",
            "default": "standard"
          },
          "outputMode": {
            "title": "Output",
            "enum": [
              "stations",
              "prices",
              "aggregates"
            ],
            "type": "string",
            "description": "Shape of the dataset.",
            "default": "stations"
          },
          "aggregateBy": {
            "title": "Aggregate by",
            "enum": [
              "province",
              "region",
              "brand"
            ],
            "type": "string",
            "description": "Only for Aggregates output.",
            "default": "province"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 25000,
            "type": "integer",
            "description": "Maximum billable units: stations (stations/prices modes) or aggregate rows. Default 200.",
            "default": 200
          },
          "allowStaleFallback": {
            "title": "Allow stale fallback",
            "type": "boolean",
            "description": "Off (default): if MIMIT cannot be downloaded or fails validation, the run FAILS. On: the last validated snapshot (saved by your own earlier runs with this option on) is used, and every item is flagged dataFreshness=STALE_FALLBACK with a warning.",
            "default": false
          },
          "maxFallbackAgeHours": {
            "title": "Max fallback age (hours)",
            "minimum": 1,
            "maximum": 168,
            "type": "integer",
            "description": "Oldest snapshot accepted as fallback.",
            "default": 48
          },
          "proxyConfiguration": {
            "title": "Proxy (optional)",
            "type": "object",
            "description": "Normally leave empty. The actor connects to MIMIT directly and, if MIMIT refuses non-Italian connections, automatically retries once through an Italian Apify Proxy exit when your plan includes one. Set a proxy here only if you have an Italian proxy of your own."
          },
          "includeOperatorName": {
            "title": "Include operator (gestore) name",
            "type": "boolean",
            "description": "The operator can be a sole trader, i.e. a private person. Off by default (data minimisation).",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}