The /flights/search/advanced
endpoint is returning duplicate flights.
The queries I am using are:
{notmatch orig Y*} {match dest Y*} {true arrived}
and
{match orig Y*} {notmatch dest Y*} {true arrived}
The intent is to capture all international flights inbound to, and outbound from, Australia (aerodromes with ICAO codes starting with “Y”). I’ve scheduled this query to run every 24 hours, as this API reports the last 24 hours’ worth of flights. (As an aside: this query also picks up domestic flights where the origin is not known and the origin field has been populated with a value with pattern: “L <latitude> <longitude>”.)
Running these queries now has returned 689 flight records, although these represent only 278 distinct flights.
Here is the breakdown of how many duplicates are returned:
1 2 3 4 5 6 7 8 9 10
inbound 64 8 10 14 22 4 4 2 5 6
outbound 93 17 12 9 7 1 0 0 0 0
So to interpret this table: 64 flights using the inbound query have no duplicates, 8 flights appear twice, 10 flights appear 3 times, etc. There are 6 flights that appear 10 times!
In this instance there are 139 inbound flights and 139 outbound flights, but when retrieving the flight data I had to request 30 pages of inbound flight results (15 flights per page) and 16 pages of outbound flight results, so there is some asymmetry with this issue which I have noticed over several days.
It has taken 46 pages to return the results that should have been been contained in 20 pages.