---
title: "Weather alerts API Reference | APIFor"
description: "Endpoint reference for the Weather alerts service: parameters, request bodies, example responses, status codes and credits per call."
canonical: "https://apifor.dev/docs/reference/weather-alerts/"
---

**Weather alerts All docs**

# Weather alerts API Reference

3 routes. Base URL `https://api.apifor.dev`, authenticated with `x-api-key`. Failed calls are not charged. Overview, limits and sources are on the [Weather alerts API](https://apifor.dev/services/weather-alerts/) page.

GET `/v1/weather-alerts` 1 credit

Severe weather alerts. ID (default): BMKG CAP alerts, active or history, copied from BMKG every hour (meta.freshness gives the last copy). Live, active-only: US (NWS; filter by state or lat/lng), MY (MET Malaysia via data.gov.my) and MeteoAlarm Europe (AT, BE, BA, BG, HR, CY, CZ, DK, EE, FI, FR, DE, GR, HU, IS, IE, IL, IT, LV, LT, LU, MT, MD, ME, NL, MK, NO, PL, PT, RO, RS, SK, SI, ES, SE, CH, GB, UA). 1 credit.

| Parameter | In | Type | Rules |
| --- | --- | --- | --- |
| status | query | string | one of active, all · default active · active (default) or all; all is ID only |
| area | query | string | max 100 chars · Area name, partial match (ID province/district, US county or state code, EU region, MY waters/state in the warning text) |
| since | query | string | Published on or after this date or timestamp |
| country | query | string | ISO 3166-1 alpha-2 · ISO 3166-1 alpha-2 code, optional (default ID). Also US, MY and MeteoAlarm countries |
| page | query | integer | 1 to 1000 · default 1 · Page number |
| limit | query | integer | 1 to 100 · default 25 · Rows per page |
| state | query | string | ISO 3166-1 alpha-2 · US only: two-letter state or territory code, e.g. TX |
| lat | query | number | -90 to 90 · US only: alerts covering this point, use with lng |
| lng | query | number | -180 to 180 · US only: use with lat |

GET /v1/weather-alerts

```bash
curl 'https://api.apifor.dev/v1/weather-alerts' \
  -H 'x-api-key: YOUR_API_KEY'
```

Example response · 200

```json
{
  "success": true,
  "data": [
    {
      "id": "warn_2-49-0-1-360-0-2026-11-30-12-92-001",
      "status": "active",
      "country": "ID",
      "event": "Heavy rain with thunderstorms",
      "event_local": "Hujan Lebat disertai Petir",
      "province": "Papua Barat",
      "areas": [
        "ARANDAY",
        "BISCOOP"
      ],
      "headline": "Heavy rain with thunderstorms in Papua Barat",
      "headline_local": "Hujan Lebat disertai Petir di Papua Barat",
      "description_local": "Hujan lebat disertai petir akan terjadi pada 30 November 2026, 21:54 WIT di sebagian wilayah Papua Barat, khususnya di ARANDAY, BISCOOP, ...",
      "instruction": "Follow official BMKG information and the directions of local officials.",
      "instruction_local": "Ikuti informasi resmi BMKG dan arahan petugas setempat.",
      "local_language": "id",
      "category": "Met",
      "urgency": "Expected",
      "severity": "Moderate",
      "certainty": "Likely",
      "effective_at": "2026-11-30T12:41:00.000Z",
      "expires_at": "2026-11-30T17:12:00.000Z",
      "expires_local": "01 December 2026, 02:12 WIT",
      "published_at": "2026-11-30T12:41:00.000Z",
      "url": "https://www.bmkg.go.id/alerts/nowcast/id/CPB20261130001_alert.xml",
      "source": "BMKG",
      "format": "CAP",
      "local": {
        "country": "ID",
        "bmkg_alert_id": "2.49.0.1.360.0.2026.11.30.12.92.001"
      }
    }
  ],
  "meta": {
    "total": 1,
    "page": 1,
    "per_page": 25,
    "total_pages": 1,
    "attribution": {
      "source": "BMKG (Badan Meteorologi, Klimatologi, dan Geofisika)",
      "licence": "BMKG open data, attribution required",
      "license": "BMKG open data, attribution required",
      "license_url": "https://data.bmkg.go.id",
      "source_url": "https://data.bmkg.go.id",
      "attribution_page": "https://apifor.dev/sources",
      "notice": "Source: BMKG (Badan Meteorologi, Klimatologi, dan Geofisika). Show BMKG as the data source wherever you display this data. Fields normali..."
    },
    "freshness": {
      "mode": "cached",
      "source": "BMKG",
      "source_published_at": "2026-11-30T12:41:00.000Z",
      "fetched_at": "2026-11-30T13:00:35.311Z",
      "refresh_interval_minutes": 60,
      "max_lag_minutes": 60
    }
  }
}
```

- `200` Alerts, newest first
- `400` Invalid parameters

GET `/v1/weather-alerts/{id}` 1 credit

Look up an alert by its id or CAP identifier. 1 credit.

| Parameter | In | Type | Rules |
| --- | --- | --- | --- |
| id * | path | string | id or alert_id |

GET /v1/weather-alerts/{id}

```bash
curl 'https://api.apifor.dev/v1/weather-alerts/ID' \
  -H 'x-api-key: YOUR_API_KEY'
```

Example response · 200

```json
{
  "success": true,
  "data": {
    "id": "warn_2-49-0-1-360-0-2026-11-30-12-92-001",
    "status": "active",
    "country": "ID",
    "event": "Heavy rain with thunderstorms",
    "event_local": "Hujan Lebat disertai Petir",
    "province": "Papua Barat",
    "areas": [
      "ARANDAY",
      "BISCOOP"
    ],
    "headline": "Heavy rain with thunderstorms in Papua Barat",
    "headline_local": "Hujan Lebat disertai Petir di Papua Barat",
    "description_local": "Hujan lebat disertai petir akan terjadi pada 30 November 2026, 21:54 WIT di sebagian wilayah Papua Barat, khususnya di ARANDAY, BISCOOP, ...",
    "instruction": "Follow official BMKG information and the directions of local officials.",
    "instruction_local": "Ikuti informasi resmi BMKG dan arahan petugas setempat.",
    "local_language": "id",
    "category": "Met",
    "urgency": "Expected",
    "severity": "Moderate",
    "certainty": "Likely",
    "effective_at": "2026-11-30T12:41:00.000Z",
    "expires_at": "2026-11-30T17:12:00.000Z",
    "expires_local": "01 December 2026, 02:12 WIT",
    "published_at": "2026-11-30T12:41:00.000Z",
    "url": "https://www.bmkg.go.id/alerts/nowcast/id/CPB20261130001_alert.xml",
    "source": "BMKG",
    "format": "CAP",
    "local": {
      "country": "ID",
      "bmkg_alert_id": "2.49.0.1.360.0.2026.11.30.12.92.001"
    }
  },
  "meta": {
    "attribution": {
      "source": "BMKG (Badan Meteorologi, Klimatologi, dan Geofisika)",
      "licence": "BMKG open data, attribution required",
      "license": "BMKG open data, attribution required",
      "license_url": "https://data.bmkg.go.id",
      "source_url": "https://data.bmkg.go.id",
      "attribution_page": "https://apifor.dev/sources",
      "notice": "Source: BMKG (Badan Meteorologi, Klimatologi, dan Geofisika). Show BMKG as the data source wherever you display this data. Fields normali..."
    },
    "freshness": {
      "mode": "cached",
      "source": "BMKG",
      "source_published_at": "2026-11-30T12:41:00.000Z",
      "fetched_at": "2026-11-30T13:00:35.311Z",
      "refresh_interval_minutes": 60,
      "max_lag_minutes": 60
    }
  }
}
```

- `200` The alert
- `404` Unknown alert

GET `/v1/weather-alerts/coverage` Free

Countries this service covers, with sources, licences, row counts and country-only fields. Free (0 credits), still needs an API key. Price note: Free.

GET /v1/weather-alerts/coverage

```bash
curl 'https://api.apifor.dev/v1/weather-alerts/coverage' \
  -H 'x-api-key: YOUR_API_KEY'
```

Example response · 200

```json
{
  "success": true,
  "data": {
    "service": "weather-alerts",
    "global": false,
    "country_param": "optional",
    "param_name": "country",
    "countries": [
      {
        "country": "ID",
        "market": null,
        "subdivision_levels": [
          "province"
        ],
        "rows": null,
        "updated_at": null,
        "sources": [
          {
            "name": "BMKG nowcast (CAP)",
            "url": "https://data.bmkg.go.id/peringatan-dini-cuaca/",
            "licence": "BMKG open data, attribution required",
            "attribution": "Source: BMKG (Badan Meteorologi, Klimatologi, dan Geofisika)"
          }
        ],
        "local_fields": [
          "local.bmkg_alert_id"
        ],
        "notes": "Default when country is omitted. CAP alerts with history (status=all), copied from BMKG every hour, so a new alert can take up to about a..."
      },
      {
        "country": "US",
        "market": null,
        "subdivision_levels": [
          "state"
        ],
        "rows": null,
        "updated_at": null,
        "sources": [
          {
            "name": "US National Weather Service (api.weather.gov)",
            "url": "https://api.weather.gov/alerts/active",
            "licence": "Public domain",
            "attribution": "Source: US National Weather Service"
          }
        ],
        "local_fields": [
          "local.nws_id",
          "local.sender_name"
        ],
        "notes": "Live, active alerts only, cached up to 1 minute. Filter by state, lat+lng, or area text."
      }
    ]
  }
}
```

- `200` Coverage

[Error handling](https://apifor.dev/docs/errors/) · [Rate limits](https://apifor.dev/docs/rate-limits/) · [Prices](https://apifor.dev/pricing/#services)
