You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Google Business Profile位置API如何配置readMask返回商家照片

解答

在现有readMask的字段列表末尾追加photos即可让接口同步返回商家照片数据。

修改后的代码示例:

let readMask = "storeCode,name,languageCode,title,phoneNumbers,categories,storefrontAddress,websiteUri,regularHours,specialHours,serviceArea,labels,adWordsLocationExtensions,latlng,openInfo,metadata,profile,relationshipData,moreHours,photos";
let url = `https://mybusinessbusinessinformation.googleapis.com/v1/accounts/${account.id}/locations?readMask=${readMask}`;

注意事项

  • photos是该v1版本接口Location资源的合法字段,加入后返回的照片数据覆盖商家LOGO、封面图、门店实拍、产品图等所有绑定到该位置的图片资源,每条数据包含图片访问地址、尺寸、分类、上传信息等元内容。
  • 字段名严格区分大小写,与其他字段用英文逗号分隔即可,无需额外配置其他参数。

内容的提问来源于stack exchange,提问作者ololo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.29 07:09:18