{
  "openapi": "3.0.1",
  "info": {
    "title": "France Gas Station Price Finder",
    "description": "Find the cheapest gas stations in France. Uses the official government API (data.economie.gouv.fr) — free, legal, updated every 10 minutes. Filter by fuel type, city, postal code or GPS radius. Telegram price alerts included.",
    "version": "1.0",
    "x-build-id": "L4eSIVRbH4vtgCb43"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dev-sinior~france-gas-prices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dev-sinior-france-gas-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/dev-sinior~france-gas-prices/runs": {
      "post": {
        "operationId": "runs-sync-dev-sinior-france-gas-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/dev-sinior~france-gas-prices/run-sync": {
      "post": {
        "operationId": "run-sync-dev-sinior-france-gas-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": {
          "fuelTypes": {
            "title": "Fuel Types",
            "type": "array",
            "description": "Which fuels to search for. Leave empty for all.",
            "default": [
              "Gazole",
              "SP95",
              "E10"
            ],
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Location (city, postal code or lat,lon)",
            "type": "string",
            "description": "Filter by location. Examples: 'Paris', '75001', '48.8566,2.3522'. Leave empty for all France."
          },
          "radiusKm": {
            "title": "Search Radius (km)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Radius in km around the location. Only used when location is set.",
            "default": 10
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum number of stations to return per fuel type.",
            "default": 20
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "price_asc",
              "price_desc",
              "distance"
            ],
            "type": "string",
            "description": "How to sort the results.",
            "default": "price_asc"
          },
          "only24h": {
            "title": "24h Stations Only",
            "type": "boolean",
            "description": "Only return stations with a 24/7 payment terminal.",
            "default": false
          },
          "maxPriceEur": {
            "title": "Max Price (€/L)",
            "type": "number",
            "description": "Only return stations with price below this value."
          },
          "exportCsv": {
            "title": "Exporter en CSV",
            "type": "boolean",
            "description": "Génère un fichier CSV téléchargeable en plus du dataset JSON. Idéal pour les flottes d'entreprises.",
            "default": false
          },
          "showShortages": {
            "title": "Afficher les ruptures de stock",
            "type": "boolean",
            "description": "Inclut les stations en rupture temporaire ou définitive dans les résultats.",
            "default": false
          },
          "alertOnChange": {
            "title": "Alerter uniquement si le prix a baissé",
            "type": "boolean",
            "description": "Envoie une alerte Telegram uniquement si le meilleur prix a baissé depuis le dernier run. Idéal pour les runs programmés (cron toutes les heures).",
            "default": false
          },
          "alertPriceBelow": {
            "title": "Telegram Alert: Price Below (€/L)",
            "type": "number",
            "description": "Send a Telegram alert if any station has a price below this value."
          },
          "telegramToken": {
            "title": "Telegram Bot Token",
            "type": "string",
            "description": "Your Telegram Bot token (from @BotFather). Required for price alerts."
          },
          "telegramChatId": {
            "title": "Telegram Chat ID",
            "type": "string",
            "description": "Your Telegram chat ID. Required for price alerts."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}