Reputation: 237
I am creating an app for users to get details of nearby taxi and I'm trying to use Google Places API.
This is the URL which I'm hitting
The problem is it doesn't return any phone number. Is it possible to get Taxi driver's name and phone using this API?
Upvotes: 3
Views: 2443
Reputation: 837
To get the phone number, you have to do a followup call per result. Have a look at https://developers.google.com/places/documentation/details
The property you want is 'formatted_phone_number'
Here is an example for one of your results from the URL you provided: https://maps.googleapis.com/maps/api/place/details/json?key=AIzaSyCej3iRHphjKOGUxNq0j2bk129bym0sAHY&sensor=false&reference=CnRsAAAAyDyREDepw3ELjGswuEyqkYlb-a25URGAvpCnX8VGRm0gj5kh52Tn89Wjk4t9X_XWBcXBmmHeJinih3k33x6qwSl5wkypx7QC2_W_EgRHY_Opwt3IQ_hiF3WmKpZsOZQ7UFEsd0ZzyQsimWk0er-YohIQ1tlr73MpzeOh2glY15m55xoU8JsfK3w-x9rgN55FGa6VhWQLGGY
Upvotes: 4