WoBike icon indicating copy to clipboard operation
WoBike copied to clipboard

Completeness of Nextbike data?

Open PellelNitram opened this issue 5 years ago • 11 comments

I am experimenting with the Nextbike data right now.

Digging through the data, I noticed that the maximal number of bikes at a given location and time for two tested cities does not exceed 5. That's very suspicious since there should be stations that have more than 5 bikes.

This raises the question if the data is reliable by any means.

Does anybody maybe have some information on what is published under the Nextbike API? Is the really the full data?

PellelNitram avatar Jul 24 '18 20:07 PellelNitram

Thats right. 5 means now 5 or more than 5. (some month ago they had a 5+ to indicate that there are more. But there is a request to get all bikes from one station. I will try to find that request.

ubahnverleih avatar Jul 24 '18 20:07 ubahnverleih

Wow, thanks for your blazingly fast reply! Amazing!

May I ask a follow up question: What do you mean by request? An implemented feature to access the available data, e.g. an additional query to the API, or do speak of a discussion with Nextbike to ask them if they could provide that information again?

PellelNitram avatar Jul 24 '18 21:07 PellelNitram

Request for get all bikes at station is: https://api.nextbike.net/api/getBikeList.json?place=310790&apikey=TR6EHaaNTSFGFmMt

hope this helps. response looks like this

{"server_time":1532466029,"items":[{"node":"bike","number":"93440","language":"de","boardcomputer":1270,"battery":15,"snap":0,"target_firmware":"0e050d01","target_configuration":"","electric_lock":false,"gps_tracking":false,"rfid":0,"rfid_uid":0,"bluetooth_mac":null,"state":"ok_but_unknown_number","bike_type":0,"lock_types":["analog_code_lock"],"active":true,"app_campaign_picture":"","app_campaign_picture_link":"","app_campaign_uid":0,"campaign_name":"Eigenwerbung SZ","target_whitelist":"","pedelec":false,"pedelec_battery":0,"time_to_charge":0,"place_id":310790,"city_id":2,"bike_domain":"sz","domain":"sz"},{"node":"bike","number":"93470","language":"de","boardcomputer":0,"battery":0,"snap":0,"target_firmware":"","target_configuration":"","electric_lock":false,"gps_tracking":false,"rfid":0,"rfid_uid":0,"bluetooth_mac":null,"state":"ok_but_unknown_number","bike_type":0,"lock_types":["analog_code_lock"],"active":true,"app_campaign_picture":"","app_campaign_picture_link":"","app_campaign_uid":0,"campaign_name":"Eigenwerbung SZ","target_whitelist":"","pedelec":false,"pedelec_battery":0,"time_to_charge":0,"place_id":310790,"city_id":2,"bike_domain":"sz","domain":"sz"},{"node":"bike","number":"93523","language":"de","boardcomputer":0,"battery":0,"snap":0,"target_firmware":"","target_configuration":"","electric_lock":false,"gps_tracking":false,"rfid":0,"rfid_uid":0,"bluetooth_mac":null,"state":"ok_but_unknown_number","bike_type":15,"lock_types":["analog_code_lock"],"active":true,"app_campaign_picture":"","app_campaign_picture_link":"","app_campaign_uid":0,"campaign_name":"Eigenwerbung SZ","target_whitelist":"","pedelec":false,"pedelec_battery":0,"time_to_charge":0,"place_id":310790,"city_id":2,"bike_domain":"sz","domain":"sz"},{"node":"bike","number":"93641","language":"de","boardcomputer":0,"battery":0,"snap":0,"target_firmware":"","target_configuration":"","electric_lock":false,"gps_tracking":false,"rfid":0,"rfid_uid":0,"bluetooth_mac":null,"state":"ok_but_unknown_number","bike_type":15,"lock_types":["analog_code_lock"],"active":true,"app_campaign_picture":"","app_campaign_picture_link":"","app_campaign_uid":0,"campaign_name":"Mobilit\u00e4tskampagne LHDresden","target_whitelist":"","pedelec":false,"pedelec_battery":0,"time_to_charge":0,"place_id":310790,"city_id":2,"bike_domain":"sz","domain":"sz"},{"node":"bike","number":"93370","language":"de","boardcomputer":1414,"battery":98,"snap":0,"target_firmware":"0e050d01","target_configuration":"","electric_lock":false,"gps_tracking":false,"rfid":0,"rfid_uid":0,"bluetooth_mac":null,"state":"ok_but_unknown_number","bike_type":0,"lock_types":["analog_code_lock"],"active":true,"app_campaign_picture":"","app_campaign_picture_link":"","app_campaign_uid":0,"campaign_name":"Eigenwerbung SZ","target_whitelist":"","pedelec":false,"pedelec_battery":0,"time_to_charge":0,"place_id":310790,"city_id":2,"bike_domain":"sz","domain":"sz"},{"node":"bike","number":"93550","language":"de","boardcomputer":0,"battery":0,"snap":0,"target_firmware":"","target_configuration":"","electric_lock":false,"gps_tracking":false,"rfid":0,"rfid_uid":0,"bluetooth_mac":null,"state":"ok_but_unknown_number","bike_type":0,"lock_types":["analog_code_lock"],"active":true,"app_campaign_picture":"","app_campaign_picture_link":"","app_campaign_uid":0,"campaign_name":"SZ Eigenwerbung Familienzeit","target_whitelist":"","pedelec":false,"pedelec_battery":0,"time_to_charge":0,"place_id":310790,"city_id":2,"bike_domain":"sz","domain":"sz"},{"node":"bike","number":"93316","language":"de","boardcomputer":1174,"battery":20,"snap":0,"target_firmware":"0e050d01","target_configuration":"","electric_lock":false,"gps_tracking":false,"rfid":0,"rfid_uid":0,"bluetooth_mac":null,"state":"ok_but_unknown_number","bike_type":0,"lock_types":["analog_code_lock"],"active":true,"app_campaign_picture":"","app_campaign_picture_link":"","app_campaign_uid":0,"campaign_name":"SZ Eigenwerbung Familienzeit","target_whitelist":"","pedelec":false,"pedelec_battery":0,"time_to_charge":0,"place_id":310790,"city_id":2,"bike_domain":"sz","domain":"sz"},{"node":"bike","number":"93232","language":"de","boardcomputer":1480,"battery":98,"snap":0,"target_firmware":"0e050d01","target_configuration":"","electric_lock":false,"gps_tracking":false,"rfid":0,"rfid_uid":0,"bluetooth_mac":null,"state":"ok_but_unknown_number","bike_type":0,"lock_types":["analog_code_lock"],"active":true,"app_campaign_picture":"","app_campaign_picture_link":"","app_campaign_uid":0,"campaign_name":"Eigenwerbung SZ","target_whitelist":"","pedelec":false,"pedelec_battery":0,"time_to_charge":0,"place_id":310790,"city_id":2,"bike_domain":"sz","domain":"sz"}]}

ubahnverleih avatar Jul 24 '18 21:07 ubahnverleih

Thanks, that query type looks very promising.

Is it safe to use that API key? I get nervous when seeing API keys in public but it might be intentionally.

PellelNitram avatar Jul 24 '18 21:07 PellelNitram

i just grabbed this Key from the iOS App. I have no idea if they change it. But if so, just get it again from the app. If you only scrape data for analysis it should work, because it wouldn't be a disaster if they change it. Would be more a problem, if you use it in a consumer app, but than i guess you should contact nextbike anyway

ubahnverleih avatar Jul 24 '18 21:07 ubahnverleih

Wow, that's amazing!

One final question: Do you might know how to generalise the given API call to other "place" values? I tried to use the "number" of some location in some city, but that doesn't work. Or in other words: How to find the value for "place" that corresponds to some target location? E.g. what's the place value for some station in, say, Berlin.

PellelNitram avatar Jul 24 '18 21:07 PellelNitram

the place/number is the uid of the station, you get in the nextbike-live.json response. If you only interested in the number of bikes, i just found you can also use this https://api.nextbike.net/api/findStation.json?api_key=TR6EHaaNTSFGFmMt&number=310790

(Wow, they have 3 different names for it: uid, place and number :D )

ubahnverleih avatar Jul 24 '18 21:07 ubahnverleih

That works like a charm! Thank you very much, I appreciate your help and work in form of this repo!

With these new API addresses at hand that require multiple API calls to get the full information, I am curious when the API is blocking my requests :-).

PellelNitram avatar Jul 24 '18 21:07 PellelNitram

I reopen, because i would like to add this links to the Documentation

ubahnverleih avatar Jul 25 '18 20:07 ubahnverleih

That's a good idea!

Do you find even more API links from the iOS app?

PellelNitram avatar Jul 26 '18 15:07 PellelNitram

Where can I see the entire list of Api?

Is it possible for Api to do the same as in the original application?

I want to make a new application and website for Ukraine. And it seems that the fact that he himself provided a bike is terrible.

xr0m3oz avatar Oct 07 '18 23:10 xr0m3oz