# Weather Alerts API
GET/v1/weatherdata/alerts
Active alerts for a region: a US state (TX), an NWS zone or county code (TXZ229, TXC201), an Australian state (NSW) or a whole country (US, AU). Severity first, newest first. Refreshes every 60 seconds.
Price
$0.002/ callEdge cache
30s
Uptime 24h
100.00%
p95
280ms
MCP tool
weatherdata_alerts
The Weather Alerts API provides active weather alerts for the United States and Australia. It offers current observations, hourly and daily forecasts, and normalized data into one schema. The API returns data for a specified region, such as a US state, NWS zone, or Australian state. The data is refreshed every 60 seconds.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| region* | query | string | US state, NWS UGC zone or county code, Australian state, or US / AU |
| severity | query | string | Extreme, Severe, Moderate, Minor or Unknown |
| limit | query | integer = 100 |
Code
curl
# 1. No key, no payment: the gateway answers 402 with the price
curl -i "https://api.realtimeapi.ai/v1/weatherdata/alerts?region=TX"
# 2. Pay: retry with a signed x402 payment (any x402 client builds this header)
curl "https://api.realtimeapi.ai/v1/weatherdata/alerts?region=TX" -H "PAYMENT-SIGNATURE: $X402_PAYMENT"TypeScript · @x402/fetch
// npm i @x402/fetch @x402/core @x402/evm viem
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = x402Client.fromConfig({ schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(privateKeyToAccount(PRIVATE_KEY)) }] });
const pay = wrapFetchWithPayment(fetch, client);
const data = await (await pay("https://api.realtimeapi.ai/v1/weatherdata/alerts?region=TX")).json();
console.log(data);Python · x402
# pip install "x402[requests,evm]==2.27.0" eth-account
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact import register_exact_evm_client
client = x402ClientSync()
register_exact_evm_client(client, EthAccountSigner(Account.from_key(PRIVATE_KEY)))
session = x402_requests(client)
print(session.get("https://api.realtimeapi.ai/v1/weatherdata/alerts?region=TX").json())With an API key
curl "https://api.realtimeapi.ai/v1/weatherdata/alerts?region=TX" -H "X-API-Key: $RTAPI_KEY"Frequently asked questions
What regions are supported?
US states, NWS zones, Australian states, and whole countries (US, AU)
How often is the data refreshed?
Every 60 seconds
What is the pricing?
$0.002 per request
What parameters are available?
region, severity, limit