<!-- block-id: concept -->

## Fire Weather Index API

### Fire Weather Index API concept

This product provides users with [current](#current) and [forecast](#forecast) Fire Weather Index data for any coordinates on the globe. Data is available in the JSON format. Fire Weather Index forecast is available for 5 days ahead with a daily step.

You could obtain current and forecast fire weather index data as map product. Read more about Fire Weather Map [here](/api/fire-index-map.md).

Fire Weather Index API is designed to help users to estimate current and forecast fire danger. Predictions of fire danger conditions based on the Canadian Forest Service Fire Weather Index Rating System (FWI).

Fire Weather Index (FWI) is a numerical rating of the potential frontal fire intensity and indicates fire intensity by combining the rate of fire spread with the amount of fuel being consumed.

<!-- block-id: fwi-range -->

### Fire Weather Index range values

FWI is classified in 6 classes of danger (very low, low, medium, high, very high and extreme). The fire danger classes are the same for all countries and show a harmonized picture of the spatial distribution of fire danger level. The following are the FWI values used as thresholds of the fire danger classes:

| Fire danger class number | Fire danger class name | FWI ranges (upper bound excluded) |
| --- | --- | --- |
| 0 | Very low | <5.2 |
| 1 | Low | 5.2-11.2 |
| 2 | Moderate | 11.2-21.3 |
| 3 | High | 21.3-38.0 |
| 4 | Very high | 38.0-50.0 |
| 5 | Extreme | ≥50 |

<!-- block-id: access -->

## How to get access to Fire Weather Index data

1. [Sign up](https://home.openweathermap.org/users/sign_up) to OpenWeather service in case you haven't got your API key yet.
2. [Contact us](mailto:info@openweathermap.org) via email to get access to our Fire Weather Index API.
3. Just make an API call according to the tech documentation for [Current](#current) and [Forecast](#forecast) Fire Weather Index API below, remembering to add your key to each call.

To learn more about Fire Weather Index API (how to make an API call, samples, parameters), please read the next sections of the documentation.

<!-- block-id: current -->

## Call Current Fire Weather Index data

To get access to current Fire Weather Index data, please use this section of the documentation. Please read the [Call Forecast Fire Weather Index data](#forecast) section in case you are looking for forecast of fire weather index dataset.

### How to make an API call

```text
https://api.openweathermap.org/data/2.5/fwi?lat={lat}&lon={lon}&appid={API key}
```

| Parameters |  |  |
| --- | --- | --- |
| `lat` | Yes | Latitude. If you need the geocoder to automatic convert city names and zip-codes to geo coordinates and the other way around, please use our [Geocoding API](/api/geocoding-api.md) |
| `lon` | Yes | Longitude. If you need the geocoder to automatic convert city names and zip-codes to geo coordinates and the other way around, please use our [Geocoding API](/api/geocoding-api.md) |
| `appid` | Yes | Your unique API key (you can always find it on your account page under the ["API key" tab](https://home.openweathermap.org/api_keys)) |

### Example of API call

```text
https://api.openweathermap.org/data/2.5/fwi?lat=24&lon=-103&appid={API key}
```

### Example of API response

```json
{
  "coord": {
     "lon":-103,
     "lat": 24
 },
  "list": [
    {
     "main": {
        "fwi":70.53
     },
     "danger_rating:{
        "description:"Extreme",
        "value": "5"
    },
    "dt": "1677142800",
    }
  ]
}
```

<!-- block-id: parameter -->

- `lat` Latitude of the location, decimal (-90; 90)
- `lon` Longitude of the location, decimal (-180; 180)
- `list`  - `main`    - `fwi`[Fire Weather Index range value](#fwi-range)
  - `danger_rating`    - `description` Fire danger class name
    - `value` Fire danger class number
  - `dt`Time of current data, Unix, UTC. Please pay attention that time in the API responce equvalent midday local time is showing

<!-- block-id: forecast -->

## Call Forecast Fire Weather Index data

To get access to the forecast with daily step for 5 next days for Fire Weather Index data, please use this section of the documentation. Please read the [Call current Fire Weather Index data](#current) section in case you are looking for current fire weather index dataset.

<!-- block-id: forecast-how -->

### How to make an API call

### API call

```text
https://api.openweathermap.org/data/2.5/fwi/forecast?lat={lat}&lon={lon}&appid={API key}
```

| Parameters |  |  |
| --- | --- | --- |
| `lat` | Yes | Latitude. If you need the geocoder to automatic convert city names and zip-codes to geo coordinates and the other way around, please use our [Geocoding API](/api/geocoding-api.md) |
| `lon` | Yes | Longitude. If you need the geocoder to automatic convert city names and zip-codes to geo coordinates and the other way around, please use our [Geocoding API](/api/geocoding-api.md) |
| `appid` | Yes | Your unique API key (you can always find it on your account page under the ["API key" tab](https://home.openweathermap.org/api_keys)) |

### Example of API call

```text
https://api.openweathermap.org/data/2.5/fwi/forecast?lat=35&lon=-102&appid={API key}
```

### Example of API response

```json
{
  "coord": {
    "lon":-102,
    "lat": 35
  },
  "list": [
    {
     "main": {
        "fwi": 21.23
      },
      "danger_rating:{
         "description:"Moderate",
         "value": "2"
      },
     "dt": "1677142800"
   },
    {
    "main": {
       "fwi": 11.61
     },
     "danger_rating:{
        "description:"Moderate",
        "value": "2"
     },
     "dt": "1677229200"
   },
    {
    "main": {
       "fwi": 39.04
     },
     "danger_rating:{
        "description:"Very high",
        "value": "4"
     },
    "dt": "1677315600"
   },
    {
    "main": {
       "fwi":  23.76
     },
     "danger_rating:{
        "description:"High",
        "value": "3"
     },
     "dt": "1677402000"
   },
    {
    "main": {
       "fwi":  46.33
     },
     "danger_rating:{
        "description:"Very high",
        "value": "4"
     },
     "dt": "1677488400"
   },
    {
    "main": {
       "fwi":  61.57
     },
     "danger_rating:{
        "description:"Extreme",
        "value": "5"
     },
     "dt": "1677574800"
    }
  ]
}
```

<!-- block-id: forecast_parameter -->

### Fields in API response

- `lat` Latitude of the location,decimal (-90; 90)
- `lon` Longitude of the location,decimal (-180; 180)
- `list`  - `main`    - `fwi`[Fire Weather Index range value](#fwi-range)
  - `danger_rating`    - `description` Fire danger class name
    - `value` Fire danger class number
  - `dt`Time of current data, Unix, UTC. Please pay attention that time in the API responce equvalent midday local time is showing

<!-- block-id: errors -->

### API errors

You could find information about some popular errors [here](/faq.md#api-errors).