Skip to main content

Authentication

Under Development

The Airframes API is under active development. Authentication details on this page reflect the planned approach and may change before general availability. Contact us for early access.

API Keys​

All API requests require an API key passed via the Authorization header:

Authorization: Bearer YOUR_API_KEY

API keys are tied to your Airframes account and determine your access tier and rate limits.

Obtaining an API Key​

Feeders​

If you operate an active feeder station that consistently contributes data to Airframes, you are eligible for a free API key. To request one:

  1. Ensure your station is visible on app.airframes.io/stations and has been feeding for at least 7 days
  2. Contact api@airframes.io with your station ID

Commercial / Paid Access​

Paid API keys are available for higher rate limits and broader access. See the Pricing page for details, or contact api@airframes.io to discuss your use case.

Rate Limits​

Rate limits depend on your access tier:

TierRate LimitNotes
Feeder (Free)60 requests/minuteFor personal and non-commercial use
PaidVaries by planContact us for details

When you exceed your rate limit, the API returns 429 Too Many Requests with a Retry-After header indicating when you can resume.

Rate limit headers​

API keys are limited per UTC minute, hour and day, and the smaller windows are usually the ones you reach first. Every response reports where you stand in each window with the RateLimit-Policy and RateLimit headers from the IETF RateLimit header fields draft:

RateLimit-Policy: minute;q=200;w=60, hour;q=5000;w=3600, day;q=50000;w=86400
RateLimit: minute;a=187;w=42, hour;a=4812;w=1242, day;a=38317;w=40242
HeaderParameterMeaning
RateLimit-PolicyqRequests allowed in the window
RateLimit-PolicywWindow length in seconds
RateLimitaRequests still available in the current window
RateLimitwSeconds until the current window resets

Windows are fixed UTC minutes, hours and days, so w counts down to the next boundary and is the same for every key on your account. Your quota is shared across all of your account's keys.

The older headers are still sent and describe the daily quota only:

HeaderMeaning
X-RateLimit-LimitRequests allowed per UTC day
X-RateLimit-RemainingRequests left today
X-RateLimit-ResetUnix time (seconds) when the daily quota resets

A 429 carries the same headers. The exceeded window shows a=0, and Retry-After gives the seconds until it resets (equal to that window's w). The response body names the window, for example Rate limit exceeded (per-minute).

Requests without an API key are limited per client IP and endpoint, and report it as minute;q=60;w=60. Some endpoints, such as sign-in, have their own lower limits and report those. Unlimited plans don't send RateLimit headers.

All of these headers are exposed through CORS, so browser code can read them with response.headers.get('RateLimit').

Pacing your client​

Read RateLimit after each response and slow down before a window runs out instead of waiting for a 429. A simple approach is to spread what is left over the time left: wait about w / a seconds between requests for the tightest window. When you do get a 429, wait for Retry-After and add a little random jitter, so many clients don't retry at the same moment.

function nextDelaySeconds(res) {
const field = res.headers.get('RateLimit');
if (!field) return 0;
let delay = 0;
for (const item of field.split(',')) {
const a = Number(/;a=(\d+)/.exec(item)?.[1]);
const w = Number(/;w=(\d+)/.exec(item)?.[1]);
if (a === 0) return w; // window used up: wait for it to reset
if (a > 0 && w > 0) delay = Math.max(delay, w / a);
}
return delay;
}

Example Request​

curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.airframes.io/v1/messages?flight=UAL123

Security​

  • Keep your API key private. Do not commit it to public repositories or share it in public channels.
  • If you believe your key has been compromised, contact api@airframes.io to have it revoked and reissued.
  • All API requests must be made over HTTPS.