FlightXML 3.0 AirportBoards Offset does not return different results


#1

I am trying to paginate through AirportBoards results but seem to keep getting the same flights from each request. What am I doing wrong?

First Request:

https://flightxml.flightaware.com/json/FlightXML3/AirportBoards?offset=0&airport_code=KPHX&type=arrivals&include_ex_data=False&howMany=15

Response:

“arrivals”:{“num_flights”:15,“next_offset”:15,“flights”:…

Second Request, with offset=15

https://flightxml.flightaware.com/json/FlightXML3/AirportBoards?offset=15&airport_code=KPHX&type=arrivals&include_ex_data=False&howMany=15

Response:

“arrivals”:{“num_flights”:15,“next_offset”:15,“flights”:…

The returned flights are the same in each set.

Am I misunderstanding the offset/next_offset parameters? Reading other posts it seems people are not having an issue with pagination, and I’d expect to receive a -1 as next_offset when I reach the page limit.

Thanks for the help,
Jonathan


#2

I’m not FlightAware staff, but, I might suggest passing a value of 0 instead of False for the include_ex_data parameter.


#3

Good point. I changed the request to be include_ex_data=0, but I am still seeing the same next_offset returned regardless of the offset request parameter. I’ve also removed the howMany optional parameter and see the same behavior.


#4

Are you on the free/started account, which doens’t support offsets, maybe?


#5

Yep - that’s the problem. Trying to debug my code with my free personal API key before I switch over to the paid account to get more data. Didn’t realize the free account doesn’t allow offsets.

Thanks!