{
  "openapi": "3.0.1",
  "info": {
    "title": "CEE & DACH Fuel Intelligence",
    "description": "Station fuel prices across CEE+DACH. Country, point & route modes with EUR FX, dataConfidence, brand analytics, cheapest-stop. No-key AT/SI/HR/RO; BYOK DE (Tankerkönig) + Fuelo (CH/HU/PL/CZ/SK/BG). Optional BYOK AI digest.",
    "version": "0.1",
    "x-build-id": "KJ5ilUtijWgJRtA0S"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kondasviktor~cee-dach-fuel-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kondasviktor-cee-dach-fuel-intelligence",
        "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/kondasviktor~cee-dach-fuel-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-kondasviktor-cee-dach-fuel-intelligence",
        "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/kondasviktor~cee-dach-fuel-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-kondasviktor-cee-dach-fuel-intelligence",
        "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": "Query mode",
            "enum": [
              "country",
              "point",
              "route"
            ],
            "type": "string",
            "description": "country = national centroid search; point = lat/lng radius; route = cheapest stop along origin→destination (deterministic). Austria returns E-Control cheapest-N only.",
            "default": "country"
          },
          "countryCode": {
            "title": "Country code",
            "enum": [
              "DE",
              "AT",
              "CH",
              "HU",
              "PL",
              "CZ",
              "SK",
              "RO",
              "HR",
              "SI",
              "BG"
            ],
            "type": "string",
            "description": "ISO alpha-2. No key: AT, SI, HR, RO. BYOK buyers: DE needs tankerkoenigApiKey; CH/HU/PL/CZ/SK/BG need fueloApiKey (never provided by this Actor).",
            "default": "AT"
          },
          "countries": {
            "title": "Countries (multi)",
            "type": "array",
            "description": "Optional multi-country list. Overrides countryCode when set. Partial failures do not fail the whole run — see RUN_STATUS.",
            "items": {
              "type": "string"
            }
          },
          "fuel": {
            "title": "Fuel type (canonical)",
            "enum": [
              "diesel",
              "petrol95",
              "petrol98",
              "lpg",
              "cng",
              "all"
            ],
            "type": "string",
            "description": "Canonical grades: diesel, petrol95 (E10/Super 95), petrol98 (E5/100), lpg, cng, all. Sources map local names into these fields.",
            "default": "diesel"
          },
          "lat": {
            "title": "Latitude",
            "type": "number",
            "description": "Required for mode=point."
          },
          "lng": {
            "title": "Longitude",
            "type": "number",
            "description": "Required for mode=point."
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 1,
            "maximum": 25,
            "type": "number",
            "description": "Search radius. Capped at 25 km (Tankerkönig free-tier limit).",
            "default": 10
          },
          "originLat": {
            "title": "Route origin latitude",
            "type": "number",
            "description": "Route start latitude."
          },
          "originLng": {
            "title": "Route origin longitude",
            "type": "number",
            "description": "Route start longitude."
          },
          "destinationLat": {
            "title": "Route destination latitude",
            "type": "number",
            "description": "Route end latitude."
          },
          "destinationLng": {
            "title": "Route destination longitude",
            "type": "number",
            "description": "Route end longitude."
          },
          "maxDetourKm": {
            "title": "Max detour (km)",
            "minimum": 1,
            "maximum": 100,
            "type": "number",
            "description": "Route mode: ignore stations whose estimated detour exceeds this.",
            "default": 15
          },
          "vehiclePlateCountry": {
            "title": "Vehicle plate country",
            "type": "string",
            "description": "ISO alpha-2 for dual-pricing flags (e.g. HU plates in SK)."
          },
          "brands": {
            "title": "Brand filter",
            "type": "array",
            "description": "Optional post-filter (e.g. Shell, OMV, MOL). Matches brand/name contains. Not a Europe-wide brand crawl.",
            "items": {
              "type": "string"
            }
          },
          "openNow": {
            "title": "Open now / 24h only",
            "type": "boolean",
            "description": "When true, keep stations with isOpen=true or is24h=true (only where the source provides hours).",
            "default": false
          },
          "asOfDate": {
            "title": "As-of date (optional)",
            "type": "string",
            "description": "YYYY-MM-DD. Most feeds are live-only — Actor falls back to live unless asOfDateStrict=true. Prefer scheduled runs for history."
          },
          "asOfDateStrict": {
            "title": "Fail if asOfDate unsupported",
            "type": "boolean",
            "description": "If true, fail when asOfDate is unsupported by the source.",
            "default": false
          },
          "diffAgainstPrevious": {
            "title": "Diff against previous snapshot (scheduled)",
            "type": "boolean",
            "description": "Push all rows; charge station-price-changed only when the selected fuel price moved since last run in priceSnapshotStoreName.",
            "default": false
          },
          "priceSnapshotStoreName": {
            "title": "Price snapshot KV store name",
            "type": "string",
            "description": "Named Apify Key-Value store for LATEST_PRICES when diffAgainstPrevious=true.",
            "default": "cee-dach-fuel-price-snapshots"
          },
          "maxStations": {
            "title": "Max stations",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap per country fetch. Prefill stays small for Store QA.",
            "default": 50
          },
          "tankerkoenigApiKey": {
            "title": "Tankerkönig API key (BYOK — buyers, required for DE)",
            "type": "string",
            "description": "Bring your own key from https://creativecommons.tankerkoenig.de/ — never provided by this Actor."
          },
          "fueloApiKey": {
            "title": "Fuelo.net API key (BYOK — buyers, CH/HU/PL/CZ/SK/BG)",
            "type": "string",
            "description": "Bring your own free key from https://fuelo.net/about/api_key_request — never provided by this Actor."
          },
          "enableAIDigest": {
            "title": "Optional BYOK AI digest",
            "type": "boolean",
            "description": "Secondary feature: one narrative per run. Off by default. Never fails the run if key missing.",
            "default": false
          },
          "aiProvider": {
            "title": "AI provider",
            "enum": [
              "auto",
              "gemini",
              "claude",
              "openai",
              "openrouter"
            ],
            "type": "string",
            "description": "LLM provider for optional digest (BYOK).",
            "default": "auto"
          },
          "aiModel": {
            "title": "AI model override",
            "type": "string",
            "description": "Optional model override for the selected provider."
          },
          "geminiApiKey": {
            "title": "Gemini API key",
            "type": "string",
            "description": "Google AI Studio key (BYOK)."
          },
          "anthropicApiKey": {
            "title": "Anthropic API key",
            "type": "string",
            "description": "Anthropic API key (BYOK)."
          },
          "openaiApiKey": {
            "title": "OpenAI API key",
            "type": "string",
            "description": "OpenAI API key (BYOK)."
          },
          "openrouterApiKey": {
            "title": "OpenRouter API key",
            "type": "string",
            "description": "OpenRouter API key (BYOK)."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}