CrewHub
Loading...
API — CrewHub

CrewHub API

The CrewHub API.

The CrewHub API lets other programs read your airline's data — your fleet, routes, pilots, live flights and more — so you can put it on your own website, in a Discord bot, or in a spreadsheet. It's private: your CrewHub licence key is the only key, and access comes as a package you choose. This page explains how it works and who it's for. When you're ready to build, the full developer documentation has every endpoint.

Read the documentation Find my licence key

How it works

How the API behaves.

Your licence key signs you in

There is nothing to create. The licence key you already have is your API key, and it lets you read everything your licence covers.

You get back JSON

Every answer is plain JSON, in the same simple shape: { ok, data }. If something goes wrong you get a clear error message.

Just a web address

Each thing you can read is one web address. Open it, or fetch it from your code — no software to install, no SDK to learn.

Works with any language

Anything that can open a web address and read JSON can use it — a website, a bot, a script, a spreadsheet. Keep your key on your own server.

One airline at a time

Add ?icao= or ?iata= to pick an airline. Every airline reads its own data through the exact same addresses.

Live flights, updated live

The live feed is the same one the CrewHub map uses, refreshed every fifteen seconds. Part of the Plus licence.

Fair limits, in tokens

6 calls a minute on Basic, 15 on Plus, and a monthly pool of tokens (one call spends one). How much is left comes back in the response headers, so you always know — and you can top up anytime.

Your data stays yours

Everything the app shows, you can read through the API. If you ever leave CrewHub, your airline's data leaves with you.

Signing in

Your licence key is your API key.

There is no sign-up and no extra password. Send your CrewHub licence key with every request, in a header called X-Api-Token. A header is just a label you attach to the request — your code sets it, the person browsing never sees it. Keep the key private, like a password.

  An example request

# The web address you call (CRW is the airline code)
https://api.oenia.eu/crewhub/api.php?r=fleet&icao=CRW

# The header you attach (your key looks like XXXX-XXXX-XXXX-XXXX)
X-Api-Token: CRW7-K2PX-9ML4-QT8N

  From the command line

curl -H "X-Api-Token: CRW7-K2PX-9ML4-QT8N" \
     "https://api.oenia.eu/crewhub/api.php?r=fleet&icao=CRW"

  From your code

fetch(url, { headers: { "X-Api-Token": KEY } })
  .then(r => r.json())

Access

Three packages.

The API is private — without a key there is no access. Every licence key carries one of three API packages, and the same key works everywhere your package allows.

  Disabled

No API access. This is where a new airline's free base key starts — the platform works fully, the programmatic API is simply switched off until you pick a package.

  Basic

All the reads you need to show your airline on a website or in a bot: counts, fleet, routes and map, destinations, recent flights, events, news, partners, airports and navaids.

Limits 6 calls/min, 10,000 tokens/month.

Not included the live feed.

  Plus

Everything in Basic, plus the real-time part: live aircraft positions straight from the ACARS feed, refreshed every few seconds.

Higher limits 15 calls/min, 100,000 tokens/month.

Tokens

Pay as you build, in tokens.

The API is metered in tokens: one call spends one token. Your package comes with a pool of tokens every month, and if you need more than that, you top up — no plan change, no waiting.

A fresh pool each month

Basic gets 10,000 tokens a month, Plus gets 100,000. The pool refills on the 1st — you start every month topped up.

Top up anytime

Need more than the monthly pool? Buy a token pack from your profile. Bought tokens never expire and are only used once the month's pool runs out.

Always know where you stand

Every response tells you how many tokens are left this month and in your wallet, so nothing stops without warning.

Private by design

Your data, your key, your airline.

Nothing on the API is open to the public. Every request carries your licence key, and a key only ever reads its own airline's data. Keep the key on your own server — it is the one thing that unlocks your API, so treat it like a password.

Ready to build?

The developer documentation has every endpoint, the response shape, the error codes and copy-paste examples — everything you need to make your first call.

Open the documentation Get my licence key

Stuck, or not sure where to start? The app documentation walks through the basics, and support is happy to help you wire it up.