Authentication
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:
- Ensure your station is visible on app.airframes.io/stations and has been feeding for at least 7 days
- 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:
| Tier | Rate Limit | Notes |
|---|---|---|
| Feeder (Free) | 60 requests/minute | For personal and non-commercial use |
| Paid | Varies by plan | Contact 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
| Header | Parameter | Meaning |
|---|---|---|
RateLimit-Policy | q | Requests allowed in the window |
RateLimit-Policy | w | Window length in seconds |
RateLimit | a | Requests still available in the current window |
RateLimit | w | Seconds 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:
| Header | Meaning |
|---|---|
X-RateLimit-Limit | Requests allowed per UTC day |
X-RateLimit-Remaining | Requests left today |
X-RateLimit-Reset | Unix 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.