{
  "openapi": "3.0.1",
  "info": {
    "title": "Spain Wildfire Risk & Active Fires (EFFIS)",
    "description": "Daily wildfire danger (FWI) forecast per Spanish province or lat/lon point plus nearby satellite fire detections, from official Copernicus EFFIS open data; optional AEMET weather with your own key. No scraping, no personal data. Unofficial service.",
    "version": "1.0",
    "x-build-id": "DdH10QHe5snmRDuWb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rubenpa~spain-fire-risk/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rubenpa-spain-fire-risk",
        "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/rubenpa~spain-fire-risk/runs": {
      "post": {
        "operationId": "runs-sync-rubenpa-spain-fire-risk",
        "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/rubenpa~spain-fire-risk/run-sync": {
      "post": {
        "operationId": "run-sync-rubenpa-spain-fire-risk",
        "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 / Provincias",
            "type": "array",
            "description": "Spanish provinces (capital city point). Accent-insensitive names also accepted via API (e.g. 'Orense', 'Vizcaya', 'Baleares').",
            "items": {
              "type": "string",
              "enum": [
                "Álava",
                "Albacete",
                "Alicante",
                "Almería",
                "Ávila",
                "Badajoz",
                "Illes Balears",
                "Barcelona",
                "Burgos",
                "Cáceres",
                "Cádiz",
                "Castellón",
                "Ciudad Real",
                "Córdoba",
                "A Coruña",
                "Cuenca",
                "Girona",
                "Granada",
                "Guadalajara",
                "Gipuzkoa",
                "Huelva",
                "Huesca",
                "Jaén",
                "León",
                "Lleida",
                "La Rioja",
                "Lugo",
                "Madrid",
                "Málaga",
                "Murcia",
                "Navarra",
                "Ourense",
                "Asturias",
                "Palencia",
                "Las Palmas",
                "Pontevedra",
                "Salamanca",
                "Santa Cruz de Tenerife",
                "Cantabria",
                "Segovia",
                "Sevilla",
                "Soria",
                "Tarragona",
                "Teruel",
                "Toledo",
                "Valencia",
                "Valladolid",
                "Bizkaia",
                "Zamora",
                "Zaragoza",
                "Ceuta",
                "Melilla"
              ]
            },
            "default": [
              "Ourense",
              "Valencia"
            ]
          },
          "allProvinces": {
            "title": "All 52 provinces / Todas las provincias",
            "type": "boolean",
            "description": "Process all 52 provinces and autonomous cities (capital point of each). Combine with a danger threshold to get an alert list.",
            "default": false
          },
          "locations": {
            "title": "Custom points / Puntos propios",
            "type": "array",
            "description": "Your own sites (forests, farms, insured assets, municipalities). JSON list of {\"name\", \"latitude\", \"longitude\", \"aemetMunicipalityCode\"?}. Coordinates in WGS84 decimal degrees, inside Spain. aemetMunicipalityCode is the 5-digit INE municipality code, needed only for AEMET weather on custom points."
          },
          "forecastDays": {
            "title": "Forecast days / Días de previsión",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Days to return, starting today (Europe/Madrid). ECMWF model: up to 9. Météo-France model: up to 3. One row (and one billed event) per location per day.",
            "default": 3
          },
          "minDangerClass": {
            "title": "Minimum danger class / Umbral de riesgo",
            "enum": [
              "very_low",
              "low",
              "moderate",
              "high",
              "very_high",
              "extreme",
              "very_extreme"
            ],
            "type": "string",
            "description": "Only rows at or above this EFFIS class are returned and billed. FWI ranges: very_low <5.2 · low 5.2-11.2 · moderate 11.2-21.3 · high 21.3-38 · very_high 38-50 · extreme 50-70 · very_extreme >70.",
            "default": "very_low"
          },
          "fwiModel": {
            "title": "Forecast model / Modelo",
            "enum": [
              "ecmwf",
              "meteofrance"
            ],
            "type": "string",
            "description": "EFFIS fire danger model: ECMWF (~8 km, 1-9 days) or Météo-France (~25 km, 1-3 days).",
            "default": "ecmwf"
          },
          "includeFwiComponents": {
            "title": "Include FWI sub-indices",
            "type": "boolean",
            "description": "Add FFMC, DMC, DC, ISI and BUI.",
            "default": true
          },
          "fireRadiusKm": {
            "title": "Active fire radius (km)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Satellite fire detections (VIIRS and MODIS, via EFFIS) within this distance of each point.",
            "default": 25
          },
          "fireLookbackDays": {
            "title": "Active fire look-back (days)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many days back to look for detections.",
            "default": 3
          },
          "maxFireDetectionsPerRow": {
            "title": "Max detections listed per row",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "The nearest N detections are listed; counts and totals always cover all detections in the radius.",
            "default": 5
          },
          "aemetApiKey": {
            "title": "AEMET OpenData API key (optional)",
            "type": "string",
            "description": "Your own free AEMET OpenData key adds temperature, humidity, wind, gusts and rain probability per day. Request it at https://opendata.aemet.es/centrodedescargas/altaUsuario (keys last 3 months). Never stored in the dataset."
          },
          "maxLocations": {
            "title": "Max locations per run",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Safety cap on locations processed in one run.",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}