Best strategy for getting flights for a list of aircraft?

Hello! Thanks in advance.

What’s the best strategy for getting all the flights each day for a given list of aircraft (around 50 right now)?

Strategy 1
I started off doing /flights/search?query=-idents "{{mylist}}" every five minutes.
pros:

  • can get all my aircraft in a single api call
  • don’t have to wrestle with “Too Many Requests” throttle
  • good resolution, and relatively real time data
  • simple model to reason about

cons:

  • this is 288 calls per day to an API that costs USD 0.05, and so is about $14/ day (and this is a hobby project)
  • I could back it down to every 30 minutes, but that’s still $2.40 / day; and, many of the flights I care about are training flights and I worry that I’d miss them, given that calls with this signature seem to only reply with flights in the air right now

Strategy 2
So I’ve swapped to a call to /flights/{{ident}} once per day.

pros:

  • now I’m down to roughly 50 calls per day to an API that costs USD $0.005, or about 25c / day

cons:

  • my python code needs logic to handle the Too Many Requests, so its slightly more complicated and definitely takes longer to run
  • much less real time data

questions:

  • with the new strategy, I think I’m still getting all the flights for each tail each day, but will I? I’ve seen responses to this API include things that were multiple hours in the past - will it get things that are days in the past?
  • how far back will this API go; could I back it off to once per week for aircraft that don’t fly that often?
  • My “list” is a ragtag collection of aircraft reg numbers that FAA, TransportCanada, and other sources believe are electric aircraft; Pipistrel VELIS Electros, Beta Alia 250’s, and other assorted odds and ends. is there a way to query using /flights/seach but specify something like engine_type that I’m not seeing instead of listing idents individually?

I’m working on a hobby project to track flights of a list of around 50 electric aircraft, primarily using the /flights/search?query=-idents "{{mylist}}" and /flights/{{ident}} API endpoints. I’ve considered two different strategies but have some concerns and questions:

  1. Current Strategy Comparison:
    Strategy 1:Calling /flights/search every five minutes to get all my aircraft in a single API call.
    Pros: Real-time data, does we make it enable again?) simple to manage, no throttling.
    Cons: High cost (~$14/day) due to 288 calls a day.
    Strategy 2:** Switching to a once-daily call to /flights/{{ident}} for each aircraft.
    Pros: Reduced cost (~$0.25/day with 50 calls).
    Cons: Less real-time data, need logic to handle “Too Many Requests” throttle.

Specific Questions:

  1. Accuracy of Daily Queries:
    When using /flights/{{ident}} once per day, will I reliably capture all flights that occurred during the day? I’ve noticed that API responses sometimes include flights several hours in the past. Can I be confident that all flights for each aircraft will be captured?

/flights/{{ident}} will return all flights conducted within the last 2 weeks, so you could get by with calling it even less frequently than daily if that still meets your needs for data timeliness. And if data timeliness is not actually important, then adding a sufficient sleep between API calls should avoid the “Too Many Requests” issue.

If you do need more rapid response to flight activity, then you can consider looking into pushed alerts for flight activity (for example, even just “arrival” events). You would likely still want to have a periodic call to /flights/{{ident}} to ensure that you do not miss any flights if a pushed delivery to your endpoint failed for some reason.

appreciate the response, thank you!