All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: FlightXML3: AirlineFlightSchedules exclude_codeshare issues
PostPosted: Mon Jul 17, 2017 5:33 pm 
Offline
johnrhickey - FlightAware user avatar

Joined: Fri Mar 03, 2017 6:01 pm
Posts: 10
I'm having some issues getting accurate results from some AirlineFlightSchedules queries where the exclude_codeshare bool is set to true. For example, the following query

Code:
https://flightxml.flightaware.com/json/FlightXML3/AirlineFlightSchedules?start_date=1500004800&end_date=1500091200&origin=PIT&destination=EWR&howMany=50&exclude_codeshare=true


returns this response:

Code:
{
  "error": "NO_DATA No flight schedules found for your query"
}


However, with exclude_codeshare=false, we get these results:

Code:
{
  "AirlineFlightSchedulesResult": {
    "next_offset": -1,
    "flights": [
      {
        "ident": "DLH7896",
        "fa_ident": "RPA3455-1499837186-airline-0094",
        "actual_ident": "RPA3455",
        "departuretime": 1500055500,
        "arrivaltime": 1500061140,
        "origin": "KPIT",
        "destination": "KEWR",
        "aircrafttype": "E75L",
        "meal_service": "First: Refreshments / Economy: No meal",
        "seats_cabin_first": 6,
        "seats_cabin_business": 0,
        "seats_cabin_coach": 64
      },
      {
        "ident": "AUA7770",
        "fa_ident": "RPA3455-1499837186-airline-0094",
        "actual_ident": "RPA3455",
        "departuretime": 1500055500,
        "arrivaltime": 1500061140,
        "origin": "KPIT",
        "destination": "KEWR",
        "aircrafttype": "E75L",
        "meal_service": "First: Refreshments / Economy: No meal",
        "seats_cabin_first": 6,
        "seats_cabin_business": 0,
        "seats_cabin_coach": 64
      },
      {
        "ident": "DLH7869",
        "fa_ident": "RPA3453-1499837188-airline-0028",
        "actual_ident": "RPA3453",
        "departuretime": 1500051600,
        "arrivaltime": 1500057000,
        "origin": "KPIT",
        "destination": "KEWR",
        "aircrafttype": "E170",
        "meal_service": "First: Refreshments / Economy: No meal",
        "seats_cabin_first": 6,
        "seats_cabin_business": 0,
        "seats_cabin_coach": 64
      },
      {
        "ident": "UAL3507",
        "fa_ident": "RPA3507-1499837188-airline-0407",
        "actual_ident": "RPA3507",
        "departuretime": 1500025500,
        "arrivaltime": 1500031020,
        "origin": "KPIT",
        "destination": "KEWR",
        "aircrafttype": "E75L",
        "meal_service": "First: Refreshments / Economy: No meal",
        "seats_cabin_first": 6,
        "seats_cabin_business": 0,
        "seats_cabin_coach": 64
      },
      {
        "ident": "UAL3609",
        "fa_ident": "RPA3609-1499837188-airline-0242",
        "actual_ident": "RPA3609",
        "departuretime": 1500033600,
        "arrivaltime": 1500039000,
        "origin": "KPIT",
        "destination": "KEWR",
        "aircrafttype": "E75L",
        "meal_service": "First: Refreshments / Economy: No meal",
        "seats_cabin_first": 6,
        "seats_cabin_business": 0,
        "seats_cabin_coach": 64
      },
      {
        "ident": "UAL3455",
        "fa_ident": "RPA3455-1499837186-airline-0094",
        "actual_ident": "RPA3455",
        "departuretime": 1500055500,
        "arrivaltime": 1500061140,
        "origin": "KPIT",
        "destination": "KEWR",
        "aircrafttype": "E75L",
        "meal_service": "First: Refreshments / Economy: No meal",
        "seats_cabin_first": 6,
        "seats_cabin_business": 0,
        "seats_cabin_coach": 64
      },
      {
        "ident": "UAL3456",
        "fa_ident": "RPA3456-1500094223-5-0-66",
        "actual_ident": "RPA3456",
        "departuretime": 1500068100,
        "arrivaltime": 1500073740,
        "origin": "KPIT",
        "destination": "KEWR",
        "aircrafttype": "E75L",
        "meal_service": "First: Refreshments / Economy: No meal",
        "seats_cabin_first": 6,
        "seats_cabin_business": 0,
        "seats_cabin_coach": 64
      },
      {
        "ident": "UAL3755",
        "fa_ident": "UAL3755-1500086004-9-0-91",
        "actual_ident": "RPA3755",
        "departuretime": 1500072000,
        "arrivaltime": 1500077400,
        "origin": "KPIT",
        "destination": "KEWR",
        "aircrafttype": "E75L",
        "meal_service": "First: Refreshments / Economy: No meal",
        "seats_cabin_first": 6,
        "seats_cabin_business": 0,
        "seats_cabin_coach": 64
      },
      {
        "ident": "UAL3463",
        "fa_ident": "RPA3463-1499837188-airline-0134",
        "actual_ident": "RPA3463",
        "departuretime": 1500030000,
        "arrivaltime": 1500035640,
        "origin": "KPIT",
        "destination": "KEWR",
        "aircrafttype": "E170",
        "meal_service": "First: Refreshments / Economy: No meal",
        "seats_cabin_first": 6,
        "seats_cabin_business": 0,
        "seats_cabin_coach": 64
      },
      {
        "ident": "UAL3453",
        "fa_ident": "RPA3453-1499837188-airline-0028",
        "actual_ident": "RPA3453",
        "departuretime": 1500051600,
        "arrivaltime": 1500057000,
        "origin": "KPIT",
        "destination": "KEWR",
        "aircrafttype": "E170",
        "meal_service": "First: Refreshments / Economy: No meal",
        "seats_cabin_first": 6,
        "seats_cabin_business": 0,
        "seats_cabin_coach": 64
      }
    ]
  }
}


Other queries like PIT -> ORD (with that same start and end date) return results when exclude_codeshares=true but are missing certain flights, like ENY3362/AAL3362. I was under the assumption that excluding codeshares meant I would be getting back all of the flights with `actual_ident` values set as the `ident`. Is this a bug or is my assumption incorrect?

Thanks!


Top
 Profile  
 
 Post subject: Re: FlightXML3: AirlineFlightSchedules exclude_codeshare iss
PostPosted: Mon Jul 17, 2017 5:59 pm 
Offline
FlightAware Staff
conej730 - FlightAware user avatar

Joined: Sat Sep 13, 2008 11:00 pm
Posts: 98
What's happening here is that all of the flights between those airports are being flown by a regional carrier, so the ident never matches the actual_ident (so technically all of them are codeshares because no one can book a flight on the actual_ident). There may be some way to not exclude those flights, but I'll have to file a bug and see what we can come up with on that.


Top
 Profile  
 
 Post subject: Re: FlightXML3: AirlineFlightSchedules exclude_codeshare iss
PostPosted: Mon Jul 17, 2017 6:22 pm 
Offline
johnrhickey - FlightAware user avatar

Joined: Fri Mar 03, 2017 6:01 pm
Posts: 10
Oh okay, I guess that makes sense. Yes, if you could file a bug and keep me updated on the status of that I would appreciate it. At the very least it might be worth clarifying that in the documentation.

Also, is there any sorting going on in the AirlineFlightSchedules response? It doesn't seem like it. Would it be possible to sort from earliest to latest? Responding with an unsorted array means consumers will have to use the offset to paginate through (or set the max response) and get ALL of the scheduled flights in the date range before they can confidently display the earliest ones. This coupled with the query rate limiting in v3 could cause issues for many consumers of the API.


Top
 Profile  
 
 Post subject: Re: FlightXML3: AirlineFlightSchedules exclude_codeshare iss
PostPosted: Mon Jul 17, 2017 6:34 pm 
Offline
FlightAware Staff
conej730 - FlightAware user avatar

Joined: Sat Sep 13, 2008 11:00 pm
Posts: 98
Good catch we'll fix that also.


Top
 Profile  
 
 Post subject: Re: FlightXML3: AirlineFlightSchedules exclude_codeshare iss
PostPosted: Mon Jul 17, 2017 9:16 pm 
Offline
coryb14 - FlightAware user avatar

Joined: Sun Jun 18, 2017 8:55 pm
Posts: 1
Just to chime in on this, it'd be awesome to have it setup (maybe with an option) to include regional flights but not codeshares. If I'm interested in only United Airlines flights, I'd definitely want to see regionals operating for United Airlines since United is the only way to book those flights. I think they fall in a different category because of this since true codeshares (say a United callsign for an Air Canada flight) can be booked through either airline generally.

Otherwise really looking forward to implementing FlightXML3. Looks like you guys have done a great job with it so far!


Top
 Profile  
 
 Post subject: Re: FlightXML3: AirlineFlightSchedules exclude_codeshare iss
PostPosted: Mon Jul 17, 2017 11:10 pm 
Offline
johnrhickey - FlightAware user avatar

Joined: Fri Mar 03, 2017 6:01 pm
Posts: 10
coryb14 wrote:
Just to chime in on this, it'd be awesome to have it setup (maybe with an option) to include regional flights but not codeshares. If I'm interested in only United Airlines flights, I'd definitely want to see regionals operating for United Airlines since United is the only way to book those flights. I think they fall in a different category because of this since true codeshares (say a United callsign for an Air Canada flight) can be booked through either airline generally.

Otherwise really looking forward to implementing FlightXML3. Looks like you guys have done a great job with it so far!


+1, this is a great idea. Something like exclude_codeshare=true&include_regional=true (or exclude_regional=false, whatever) is what I would love be able to do. Definitely seems like something many people would find useful!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to: