# Aviation Weather Center API

> Returns METAR observations, TAF forecasts, airport details, SIGMETs, pilot reports and G-AIRMET advisories.

Category: Travel, Maps & Weather. Region: US. 8 endpoints at `https://api.hoshime.com/v1/aviationweather/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/aviationweather
## GET /v1/aviationweather/metar

The latest surface weather observations (METAR) of airports, by ICAO code.

Scope: `social:read` · Units: 1 · Cached: 5 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `ids` | string | yes | One to ten ICAO airport codes, comma separated, such as WIII or WIII,WSSS. (e.g. WIII) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `altimeterHpa` (number (double)), `dewpointCelsius` (number (double)), `elevationMeters` (integer (int64)), `flightCategory` (string), `icao` (string), `latitude` (number (double)), `longitude` (number (double)), `name` (string), `observedAt` (string), `rawText` (string), `temperatureCelsius` (number (double)), `visibilityMi` (number (double)), `windDirectionDeg` (integer (int64)), `windSpeedKt` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/aviationweather/metar?ids=WIII" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/aviationweather/metarHistory

Weather observations (METAR) of one airport over the last hours, oldest first.

Scope: `social:read` · Units: 1 · Cached: 5 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | ICAO airport code, such as WIII or KJFK. (e.g. KJFK) |
| `hours` | integer | no | Hours back, from 1 to 72. (default 24; e.g. 3) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `altimeterHpa` (number (double)), `dewpointCelsius` (number (double)), `elevationMeters` (integer (int64)), `flightCategory` (string), `icao` (string), `latitude` (number (double)), `longitude` (number (double)), `name` (string), `observedAt` (string), `rawText` (string), `temperatureCelsius` (number (double)), `visibilityMi` (number (double)), `windDirectionDeg` (integer (int64)), `windSpeedKt` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/aviationweather/metarHistory?id=KJFK&hours=3" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/aviationweather/taf

The current terminal forecasts (TAF) of airports, by ICAO code.

Scope: `social:read` · Units: 1 · Cached: 30 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `ids` | string | yes | One to ten ICAO airport codes, comma separated, such as WIII or WIII,WSSS. (e.g. WIII) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `icao` (string), `issuedAt` (string), `latitude` (number (double)), `longitude` (number (double)), `name` (string), `rawText` (string), `validFromAt` (string), `validToAt` (string)

```bash
curl "https://api.hoshime.com/v1/aviationweather/taf?ids=WIII" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/aviationweather/airport

Airport details of one to ten ICAO codes: name, IATA code, position, elevation and country.

Scope: `social:read` · Units: 1 · Cached: 1440 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `ids` | string | yes | One to ten ICAO airport codes, comma separated, such as WIII or KJFK,EGLL. (e.g. WIII) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `country` (string), `elevationFt` (integer (int64)), `iata` (string), `icao` (string), `latitude` (number (double)), `longitude` (number (double)), `name` (string), `state` (string)

```bash
curl "https://api.hoshime.com/v1/aviationweather/airport?ids=WIII" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/aviationweather/sigmets

Current SIGMET and convective SIGMET advisories of the world: hazard, altitude, movement and validity.

Scope: `social:read` · Units: 1 · Cached: 5 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `baseFt` (integer (int64)), `hazard` (string), `icao` (string), `id` (string), `kind` (string), `movementDeg` (integer (int64)), `movementKt` (integer (int64)), `raw` (string), `severity` (string), `topFt` (integer (int64)), `validFromAt` (string), `validToAt` (string)

```bash
curl "https://api.hoshime.com/v1/aviationweather/sigmets" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/aviationweather/cwa

Center weather advisories (CWA) of the US air traffic control centers: convective weather and other hazards, with area, altitudes and validity.

Scope: `social:read` · Units: 1 · Cached: 5 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `hazard` | string | no | Hazard to keep, such as TS. Omit for all. |
| `limit` | integer | no | Items per page, 1 to 100. (default 20) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `area` (Point[]), `area[].latitude` (number (double)), `area[].longitude` (number (double)), `baseFt` (integer (int64)), `center` (string), `centerName` (string), `hazard` (string), `id` (string), `qualifier` (string), `raw` (string), `topFt` (integer (int64)), `validFromAt` (string), `validToAt` (string)

```bash
curl "https://api.hoshime.com/v1/aviationweather/cwa" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/aviationweather/pireps

Pilot reports (PIREPs) near an airport: turbulence, icing, weather and the wind and temperature the aircraft saw.

Scope: `social:read` · Units: 1 · Cached: 10 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | ICAO airport code the reports are near, such as KJFK. (e.g. KJFK) |
| `distance` | integer | no | Radius in nautical miles, from 1 to 500. (default 100; e.g. 100) |
| `age` | integer | no | Hours back, from 1 to 24. (default 2; e.g. 24) |
| `limit` | integer | no | Items per page, 1 to 100. (default 20) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `aircraftType` (string), `flightLevel` (integer (int64)), `latitude` (number (double)), `longitude` (number (double)), `observedAt` (string), `raw` (string), `temperatureCelsius` (number (double)), `weather` (string), `windDirDeg` (integer (int64)), `windSpeedKt` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/aviationweather/pireps?id=KJFK&distance=100&age=24" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/aviationweather/gairmets

Current G-AIRMET advisories for the United States: turbulence, icing, IFR, mountain obscuration and surface wind.

Scope: `social:read` · Units: 1 · Cached: 10 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `hazard` | string | no | Hazard to keep, such as TURB, ICE, IFR or MT_OBSC. Omit for all. (e.g. TURB) |
| `limit` | integer | no | Items per page, 1 to 100. (default 20; e.g. 5) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `baseHundredsFt` (integer (int64)), `expiresAt` (string), `forecastHour` (integer (int64)), `hazard` (string), `issuedAt` (string), `severity` (string), `tag` (string), `topHundredsFt` (integer (int64)), `validAt` (string)

```bash
curl "https://api.hoshime.com/v1/aviationweather/gairmets?hazard=TURB&limit=5" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
