Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uber API showing cars position

Tags:

api

uber-api

Is there is a way using the Uber API for showing the cars position in realtime like Uber app? Reading the manual it seems that this feature is not yet implemented.

like image 967
Gianluca Venturini Avatar asked Feb 11 '23 16:02

Gianluca Venturini


2 Answers

It seems the only way to get a cars real time position is after it was requested. in the "request details" response. https://developer.uber.com/docs/v1-request-details

 "location":{
      "latitude":37.7886532015,
      "longitude":-122.3961987534,
      "bearing":135
   },

location object The object that contains the location information of the vehicle and driver.
location.latitude float The current latitude of the vehicle.
location.longitude float The current longitude of the vehicle.
location.bearing integer The current bearing of the vehicle in degrees (0-359).

However, that being said, I too would very much like to get real time car positions. I read Shiva's above response but I don't get why sharing a car's position would be detrimental. In the end, the user gets the car and pays for it or doesn't. Knowing where an Uber car is at is no different than knowing where a taxi cab is at.

like image 193
rolinger Avatar answered Jun 07 '23 00:06

rolinger


Unfortunately not. I went through all their REST API endpoints and there is no endpoint for getting realtime car positions. https://developer.uber.com/v1/endpoints/

It makes sense that they are not exposing that, because that is their core functionality. It would be akin to Instagram exposing a 'Post Photo/Video' endpoint :)

like image 28
Shiva Avatar answered Jun 06 '23 23:06

Shiva