Hi! I use the ac_thumb.json API endpoint to get thumbnail images of aircraft for a family of twitter bots that tweet about circling aircraft. Unfortunately, the API has some quirks that sometimes end up returning poor choices for thumbnail images, and I don't think there's any workarounds I can do on my end.
For example, N530FX is a 2007 Bombardier Challenger 300. Airport-data.com looks like it has two entries in the database for N530FX, one is the Bombardier, and the other is a MD-530N helicopter. It has 11 photos of the Bombardier, and one of the helicopter.
The problem is that the API always returns the helicopter thumbnail, even when I specifically request more thumbnails. That is, when I make this request:
curl 'https://www.airport-data.com/api/ac_thumb.json?r=N530FX&n=5'
I get this response:
{
"count": 1,
"data": [
{
"image": "https://cdn.airport-data.com/images/aircraft/thumbnails/000/412/412653.jpg",
"link": "https://www.airport-data.com/aircraft/photo/000412653.html",
"photographer": "Malcolm Clarke"
}
],
"status": 200
}
If you look at the metadata on that thumbnail, it has a shot date of 1990-09-05, and an upload date of 2009-12-05.
Compare to this thumbnail, also for N530FX: https://www.airport-data.com/aircraft/photo/001040423.html
It has a shot date of 2013-04-10 and an upload date of 2014-09-24. Same registration, but the airport-data.com API doesn't return the Bombardier thumbnail and only returns the photo of the helicopter that's 30 years old.
I think there are two improvements that could be made:
1. Return information for multiple thumbnails when requested.
2. Return date information in the API response so that intelligent choices can be made regarding which photo to display. Additionally, sort the responses so that the photo with more recent shot dates are given priority.
Thanks!