{
  "openapi": "3.0.1",
  "info": {
    "title": "Spain Fuel Station Prices Scraper (Gasolineras, official data)",
    "description": "Current prices for every fuel type at Spanish service stations (gasolineras) from the Ministry of Industry's open-data API, as clean numeric rows. Filter by province, municipality, region, brand, fuel or radius; sort by cheapest. No personal data.",
    "version": "0.1",
    "x-build-id": "M2opGeWDOlugDVWrw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lafabbricallc~spain-fuel-station-prices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lafabbricallc-spain-fuel-station-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/lafabbricallc~spain-fuel-station-prices/runs": {
      "post": {
        "operationId": "runs-sync-lafabbricallc-spain-fuel-station-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/lafabbricallc~spain-fuel-station-prices/run-sync": {
      "post": {
        "operationId": "run-sync-lafabbricallc-spain-fuel-station-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": {
          "provinces": {
            "title": "Provinces",
            "type": "array",
            "description": "Spanish provinces by name or two-digit id, e.g. \"Madrid\", \"Barcelona\", \"08\", \"Illes Balears\". Accent-insensitive. Leave empty to use regions or the whole country.",
            "items": {
              "type": "string"
            },
            "default": [
              "Madrid"
            ]
          },
          "municipalities": {
            "title": "Municipalities",
            "type": "array",
            "description": "Municipality names (as the INE writes them, e.g. \"Alcalá de Henares\", \"L'Hospitalet de Llobregat\") or ministry ids. When set, only these municipalities are downloaded. Add the province under \"Provinces\" to disambiguate names that exist in several provinces, or write \"Name (Province)\".",
            "items": {
              "type": "string"
            }
          },
          "regions": {
            "title": "Regions (comunidades autónomas)",
            "type": "array",
            "description": "Autonomous communities by name or id, e.g. \"Cataluña\", \"Andalucia\", \"13\". Used only when \"Provinces\" and \"Municipalities\" are empty.",
            "items": {
              "type": "string"
            }
          },
          "products": {
            "title": "Fuel types",
            "type": "array",
            "description": "Keep only stations that sell at least one of these fuels. Codes: G95E5 (Gasolina 95), G95E10, G95E25, G95E85, G95E5+ (95 Premium), G98E5, G98E10, GOA (Gasóleo A / regular diesel), GOA+ (Diesel Premium), GOB (agricultural diesel), DREN (renewable diesel / HVO), GREN, BIO, BIE, GLP (LPG / Autogas), GNC, GNL, BGNC, BGNL, H2, MET, AMO, ADB (AdBlue). Every row still contains all price columns.",
            "items": {
              "type": "string"
            }
          },
          "brands": {
            "title": "Brands",
            "type": "array",
            "description": "Keep only stations whose sign contains one of these words (case- and accent-insensitive), e.g. \"Repsol\", \"Cepsa\", \"Moeve\", \"BP\", \"Ballenoil\", \"Plenergy\".",
            "items": {
              "type": "string"
            }
          },
          "only24h": {
            "title": "Only stations open 24 hours, 7 days",
            "type": "boolean",
            "description": "Keep only stations whose opening hours are \"L-D: 24H\".",
            "default": false
          },
          "latitude": {
            "title": "Latitude (radius search)",
            "minimum": 27,
            "maximum": 44.5,
            "type": "number",
            "description": "Centre of a radius search, WGS84 decimal degrees, e.g. 40.4168. Requires \"Longitude\" and \"Radius\". Rows then include \"distanceKm\" and are sorted by distance unless \"Sort by\" says otherwise."
          },
          "longitude": {
            "title": "Longitude (radius search)",
            "minimum": -18.5,
            "maximum": 4.5,
            "type": "number",
            "description": "WGS84 decimal degrees, negative west of Greenwich, e.g. -3.7038 for Madrid."
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 0.1,
            "maximum": 500,
            "type": "number",
            "description": "Keep stations within this distance of the centre, in kilometres (great-circle distance)."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "none",
              "distance",
              "G95E5",
              "G95E10",
              "G95E5+",
              "G98E5",
              "G98E10",
              "GOA",
              "GOA+",
              "GOB",
              "DREN",
              "GLP",
              "GNC",
              "GNL",
              "H2",
              "ADB"
            ],
            "type": "string",
            "description": "\"none\" keeps the ministry's order; \"distance\" needs a radius search; a fuel code sorts ascending by that fuel's price and drops stations that do not sell it (\"cheapest Gasolina 95 in Madrid\").",
            "default": "none"
          },
          "maxItems": {
            "title": "Max stations",
            "minimum": 1,
            "maximum": 15000,
            "type": "integer",
            "description": "Stop after this many stations have been saved. You are charged only for stations actually saved. The whole country is about 12,000 stations.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}