mrjackwills / adsbdb

public api for aircraft, airlines, & flightroutes
https://adsbdb.com
MIT License
111 stars 6 forks source link

[NEW FEATURE] Batch Requests #8

Closed jason-winn closed 3 months ago

jason-winn commented 1 year ago

Is your feature request related to a problem? Please describe. I'm trying to make an initial batch query of ~15 aircraft callsigns to populate a map. From that point on, with caching, it would only be the addition of new callsigns that triggers a request. Still, I imagine it's better for all involved if the first request could be batched.

Describe the solution you'd like Expose a REST endpoint with a reasonable batch size limit: https://api.adsbdb.com/v0/callsign?callsigns=ACA123,ACA321

Describe alternatives you've considered Looping through individual queries within the bounds of the rate limit.

Additional context Love this service! Exactly what I'm after for my little hobby project.

mrjackwills commented 1 year ago

Yeah should implement something like that, maybe have a /batch endpoint (batch is a bad name, need to come up with something better, /multi?), so that one can post an object containing an array of objects, with optional aircraft & callsign keys;

[
    {
       aircraft?: [mode_s],
       callsign?: [callsign]
    }
    ...
]

as ideally one should be able to batch request both?

jason-winn commented 1 year ago

Yeah! Wasn't sure how you preferred it structured (ie. query string versus posted object). Either could work I imagine. The naming gets a bit tough, certainly..

fboerman commented 3 months ago

is there a solution for this yet? I keep running into the rate limiter sadly. I need to have an initial list of about 1000 lookups and when that is cached only add to them every so often.

mrjackwills commented 3 months ago

In order to maintain the stability of the server, a bulk request endpoint is not currently planned. The rate limits are reasonably lax, and if needed can be further relaxed in the future