Airport-Data.com Forum Index  
  Airport-Data.com » Forums  Guest: Log in |  Register |  Search |  Memberlist |  Usergroups |  Profile |  Private messages |  FAQ 
API for thumbnails returning insufficient info       
Post new topic   Reply to topic    Airport-Data.com Forum Index -> General
  Display posts from previous 
Display posts from previous:   

  API for thumbnails returning insufficient info 
Author Message
wiseman



Joined: 08 Apr 2015
Posts: 2
Location: Los Angeles

PostPosted: Wed Sep 16, 2020 1:33 pm    Post subject: API for thumbnails returning insufficient info Reply with quote

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:

Code:

curl 'https://www.airport-data.com/api/ac_thumb.json?r=N530FX&n=5'


I get this response:

Code:
{
    "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!

   
Author Message
wiseman



Joined: 08 Apr 2015
Posts: 2
Location: Los Angeles

PostPosted: Thu Sep 17, 2020 3:51 pm    Post subject: Reply with quote

I'm considering writing code that will bypass the official API and instead will use the search form and scrape the results pages to get the required metadata. If I script it to be conservative and slow, and not hammer the site, would that be acceptable?

Today I ran into the situation of the API returning a 41-year-old photo of a different aircraft: https://twitter.com/SkyCirclesSF/status/1306693373542019072

Post new topic   Reply to topic    Airport-Data.com Forum Index -> General All times are GMT - 5 Hours
Page 1 of 1
View previous topic :: View next topic  

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

Copyright 2004-2011, Airport-Data.com. All rights reserved.
Airport-Data.com does not guarantee the accuracy or timeliness of any information on this site. Use at your own risk.
Do NOT use these information for navigation, flight planning, or for use in flight.