# HF propagation API

> Space weather and a rough rating of shortwave radio bands, day and night.

The numbers amateur radio operators check before getting on the air, from NOAA's Space Weather Prediction Center and refreshed every hour: 10.7 cm solar flux, sunspot number, the planetary K and A indices, the X-ray class and latest flare, solar wind speed and NOAA's radio blackout, radiation and geomagnetic storm scales. From those, each band group gets a good, fair or poor rating for day and for night. The ratings are a rule of thumb, and the rules are returned with them.

Base URL `https://api.dharun.dev`. No API key. Answers are JSON, `{ "data": ..., "meta": { ... } }`, and errors are `{ "error": { "code", "message" } }` with a matching HTTP status. Rate limit: 600 requests a minute per client.

## Space weather and band conditions

`GET /v1/propagation`

Rules behind the band ratings: 80m-40m: fair by day (D-layer absorption), good at night. 30m-20m: good by day; at night good from a solar flux of 120, fair from 80, else poor. 17m-15m: by day good from a solar flux of 110, fair from 80, else poor; at night fair from 150, else poor. 12m-10m: by day good from a solar flux of 150, fair from 110, else poor; at night fair from 200, else poor. A K-index of 4 lowers every night rating one step; 5 or more lowers every rating one step, and 7 or more two. An M-class X-ray flux lowers the day rating of 80m-40m and 30m-20m one step; X-class makes every day rating poor. Readings NOAA did not publish at the last fetch are null.

Example: https://api.dharun.dev/v1/propagation

Response, with lists and long text shortened:

```json
{
  "data": {
    "solarFlux": {
      "value": 136,
      "observed": "2026-10-13T20:00:00Z"
    },
    "sunspotNumber": {
      "value": 102,
      "date": "2026-10-13"
    },
    "kIndex": {
      "value": 2,
      "level": "quiet",
      "observed": "2026-10-14T12:00:00Z"
    },
    "aIndex": {
      "value": 13,
      "date": "2026-10-13"
    },
    "xray": {
      "class": "B6.4",
      "flux": 6.4e-7,
      "observed": "2026-10-14T17:36:00Z"
    },
    "latestFlare": {
      "class": "C2.2",
      "peak": "2026-10-14T15:57:00Z"
    },
    "solarWindSpeed": {
      "value": 538,
      "observed": "2026-10-14T17:30:00Z"
    },
    "noaaScales": {
      "radioBlackout": "R0",
      "solarRadiation": "S0",
      "geomagneticStorm": "G0",
      "observed": "2026-10-14T17:38:00Z"
    },
    "kHistory": [
      {
        "start": "2026-10-13T15:00:00Z",
        "kp": 2.33
      },
      {
        "start": "2026-10-13T18:00:00Z",
        "kp": 3
      },
      {
        "start": "2026-10-13T21:00:00Z",
        "kp": 1.33
      }
    ],
    "bands": [
      {
        "band": "80m-40m",
        "day": "fair",
        "night": "good"
      },
      {
        "band": "30m-20m",
        "day": "good",
        "night": "good"
      },
      {
        "band": "17m-15m",
        "day": "good",
        "night": "poor"
      }
    ],
    "rules": [
      "80m-40m: fair by day (D-layer absorption), good at night.",
      "30m-20m: good by day; at night good from a solar flux of 120, fair from 80, else poor.",
      "17m-15m: by day good from a solar flux of 110, fair from 80, else poor; at night fair from 150, else poor."
    ]
  },
  "meta": {
    "source": {
      "name": "Space weather data",
      "url": "https://www.swpc.noaa.gov/",
      "licence": "Public domain (work of the US government)",
      "version": "6 of 6 files",
      "retrieved": "2026-10-14T17:39:57Z",
      "attribution": "Space weather data from the NOAA Space Weather Prediction Center."
    },
    "note": "Indices from NOAA SWPC, fetched every hour (meta.source.retrieved says when). The band ratings are a rule of thumb from the solar flux, the K-index and the X-ra…"
  }
}
```

## Data source

- [Space weather data](https://www.swpc.noaa.gov/), 6 of 6 files, retrieved 2026-10-14T17:39:57Z. Licence: Public domain (work of the US government). Space weather data from the NOAA Space Weather Prediction Center.
