指定Google Places API调用返回的字段

use*_*996 5 google-places-api

谷歌放置响应包含大量数据.其中大部分我不需要.有没有办法指定我想收到哪些字段?

提前致谢

Stu*_*Stu 8

现在,您可以使用fields参数指定要返回的字段

https://developers.google.com/places/web-service/details

从Google总部返回特定字段的示例(来自上面的链接):

https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJN1t_tDeuEmsRUsoyG83frY4&fields=name,rating,formatted_phone_number&key=YOUR_API_KEY
Run Code Online (Sandbox Code Playgroud)