Lightweight endpoint for the embeddable AirRating badge.
Documentation Index
Fetch the complete documentation index at: https://docs.airrating.io/llms.txt
Use this file to discover all available pages before exploring further.
widget.js badge. Returns a minimal risk score payload optimised for frontend rendering. Open CORS — can be called directly from any domain.
Responses are cached for 1 hour (s-maxage=3600).
YYYY-MM-DD format.Low risk, Medium risk, High risk, or Very high risk.div.airrating-widget elements wherever you want the badge to appear:
| Attribute | Required | Default | Description |
|---|---|---|---|
data-origin | ✓ | — | IATA departure code |
data-dest | ✓ | — | IATA arrival code |
data-airline | ✓ | — | IATA airline code |
data-date | ✓ | — | Date (YYYY-MM-DD) |
data-key | — | — | API key |
data-size | — | full | full or compact |
data-theme | — | dark | dark or light |
data-lang | — | en | en, it, or es |