No flight data received with the API

Discussion in 'Feeding' started by jerrycd, Dec 23, 2020.

  1. jerrycd

    jerrycd New Member

    There was no data retrieved with Python scripts, no matter how I tuned my Python codes which were copied from the RapidAPI. Could anyone help me please? Thanks in advance!

    The returned string is always like this:
    {'states': [], 'time': 1608711590}

    The scripts were just copied from the RapidAPI with my basic account that I purchased.
     
  2. James

    James Guest

    I don't know what 'states' is.

    Rapid code is typically copy paste and all endpoints return data in testing, even with poor requests using lower and upper case chars.
     
  3. James

    James Guest

    Responses will be a similar format.

    Code:
    {
      "ac": [
        {
          "postime": "1608766507733",
          "icao": "A4ACAE",
          "reg": "N400AN",
          "type": "A21N",
          "wtc": "2",
          "spd": "432.7",
          "altt": "0",
          "alt": "23400",
          "galt": "23390",
          "talt": "32992",
          "lat": "33.09636",
          "lon": "-111.079513",
          "vsit": "0",
          "vsi": "1856",
          "trkh": "0",
          "ttrk": "",
          "trak": "104.5",
          "sqk": "2650",
          "call": "AAL2809",
          "gnd": "0",
          "trt": "5",
          "pos": "1",
          "mlat": "0",
          "tisb": "0",
          "sat": "0",
          "opicao": "AAL",
          "cou": "United States",
          "mil": "0",
          "interested": "0",
          "from": "JFK John F Kennedy New York United States",
          "to": "CLT Charlotte Douglas United States",
          "dst": "7.03"
        }
      ],
      "total": 1,
      "ctime": 1608766513253,
      "distmax": "10",
      "ptime": 180
    }
    
    
    to
    from
    cou
    opicao

    are being deprecated in the next few days.
     
  4. jerrycd

    jerrycd New Member

    Hi James, thanks for your quick reply! I tried to search with icao24 again today and got some outputs like this one:
    Code:
    {"ac":[{"postime":"1608796267190","icao":"71C359","reg":"HL8359","type":"A359","wtc":"3","spd":"274.9","altt":"0","alt":"16375","galt":"16385","talt":"10016","lat":"37.070389","lon":"127.548874","vsit":"0","vsi":"-2112","trkh":"0","ttrk":"305.2","trak":"305.1","sqk":"3214","call":"AAR201","gnd":"0","trt":"5","pos":"1","mlat":"0","tisb":"0","sat":"0","opicao":"AAR","cou":"South Korea","mil":"0","interested":"0","from":"LAX Los Angeles United States","to":"ICN Incheon Seoul South Korea"}],"total":1,"ctime":1608796271936}
    But it seemed the data was missing for some areaplanes. For example, firstly I searched one aeroplane (e.g., "78184B") and it returned data like this:
    Code:
    {"ac":[{"postime":"1608795256554","icao":"78184B","reg":"B-30CQ","type":"A320","wtc":"2","spd":"460","altt":"0","alt":"24600","galt":"24887","talt":"","lat":"29.690506","lon":"107.67248","vsit":"0","vsi":"0","trkh":"0","ttrk":"","trak":"70","sqk":"1527","call":"UEA2711","gnd":"0","trt":"2","pos":"1","mlat":"0","tisb":"0","sat":"0","opicao":"UEA","cou":"China","mil":"0","interested":"0"}],"total":1,"ctime":1608795260343}
    But when I tried to search the same flight again, it always returned null data like this:
    Code:
    {"ac":null,"total":0,"ctime":1608797141336}
    So I wonder why the data is missing for following feed requests. Could you help?

    And thanks again!
     
  5. James

    James Guest

    I don't know. Null is only returned if it can't find what you are looking for in the live data. That has a 45 second timeout, so if we don't get a ping from the plane in 45 seconds, it won't be in the JSON.

    TBH it looks like you are looking at planes where we likely have very spotty coverage. A lot of Asia, Japan, SK, China are a challenge due to governments, language, and the prominence of FR24 and home grown Chinese clones of tracking sites like VariFlight.

    Convincing people to feed a free and open data aggregator like ADSBx is challenging at times because the scam sites like FR24 offering some fake made up priced account for as 'benefit' for feeding.
     
  6. jerrycd

    jerrycd New Member

    Hi James! Thanks for the explanation. So the aeroplane's data won't be in the JSON file if live data was not received from the areoplane within 45 seconds. In this way, I guess I have to keep the old data, and request new data again until the live data comes back.

    I am more interested in areaplanes in Asia areas indeed. I just suggest ADSBx may improve the coverage by calling together more feeders. And I will try to collect more data from the API and see if it matches what I want initially. Thanks again!
     
  7. James

    James Guest

    "I just suggest ADSBx may improve the coverage by calling together more feeders. "

    Sure. Just like that. Magic.