Skip to main content

API keys

All API requests require a valid API key passed as the api_key query parameter.
curl "https://app.airrating.io/api/score?origin=FCO&dest=LHR&airline=AZ&date=2026-04-10&api_key=YOUR_API_KEY"
Header-based authentication (Authorization: Bearer) is planned for a future release. During beta, use the api_key query parameter.

Key format

ar_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Keys are prefixed with ar_live_ for production and ar_test_ for sandbox/testing.

Getting a key

During private beta, keys are provisioned manually:
  1. Join the waitlist at airrating.io
  2. Once accepted into the beta, you will receive your key via email
  3. You can also request access directly at [email protected]

Validating a key

Check whether a key is active and retrieve its metadata:
curl "https://app.airrating.io/api/keys/validate?api_key=YOUR_API_KEY"
{
  "valid": true,
  "name": "My Integration",
  "monthly_limit": 1000,
  "requests_this_month": 42
}

Rate limits

PlanMonthly requests
Beta1,000
Starter (planned)10,000
Pro (planned)100,000
Enterprise (planned)Unlimited
When you exceed your monthly limit, the API returns HTTP 429:
{
  "error": "rate_limit_exceeded",
  "message": "Monthly request limit reached. Contact [email protected] to upgrade."
}

Error responses

HTTP codeError codeMeaning
401missing_api_keyNo api_key parameter provided
401invalid_api_keyKey not found or inactive
429rate_limit_exceededMonthly limit exhausted
500internal_errorServer-side error

Security best practices

Never expose your API key in frontend JavaScript, public GitHub repositories, or client-side code.
  • Store keys in environment variables (.env) and never commit them to version control
  • Use a backend proxy to call the AirRating API from your application
  • Rotate your key immediately if you suspect it has been compromised — contact [email protected]