Bug: /v1/gtfs/vehiclepos/buses?debug=true truncated?


It looks to me like the debug (text) version of the realtime bus positions feed is truncated. When debug=true is set, the response length is the same number of characters as the non-debug response, but because it’s plain text, much less of the feed is included (about 25% of the total feed). Consider these two Python requests:

debug_list = requests.get(‘https://api.transport.nsw.gov.au/v1/gtfs/vehiclepos/buses?debug=true’, headers=headers)
bus_list = requests.get(‘https://api.transport.nsw.gov.au/v1/gtfs/vehiclepos/buses’, headers=headers)

Debug_list is returning 671 entities. Bus_list is returning 2,414 entities. Interestingly, debug_list and bus_list are the same length (313,902 characters). I’ve also checked this with a non-Python request.


It is already noted that debug is truncated (see API explorer). without debug=true you get sent BINARY data as per the spec (not ASCII as the debug gives you). debug is not meant for general use as it means more data has to be sent to you each time. The binary data works perfectly and all data is returned for me. Try parsing the binary data as it helps keep server loads down for everyone.