Q&A API
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
更新日志
v1:2024 年 9 月 18 日
locations.questions 和 locations.questions.answers 不再接受原 ID
如果 name
字段包含问题或答案的原 ID,从 2024-09-16
开始,该 API 将返回异常。如果调用该 API 时使用的是原 ID,请通过调用 list
方法将其替换为新 ID。
v1:2024 年 2 月 12 日
name
字段将更改为 locations.questions
和 locations.questions.answers
注意,自 2024-02-12
开始,包含问题或答案原 ID 的 name
字段将替换为新的 ID。
如果您将原 ID 用于问题或答案,API 将在请求的响应对象中返回新的 ID。
v1:2023 年 11 月 13 日
问题数量超过 50 个的商家的 locations.questions.list
我们对 locations.questions.list
的 orderBy
查询参数设有一个已知的限制,当问题数量超过 50 个时,该参数无法使用 upvoteCount
顺序对商家创建的问题正确进行排序。
v1:2021 年 11 月 18 日
API 权限
Q&A API 将需要从 GCP 控制台加以启用。OAuth 范围保持不变。
端点网址
可以通过 https://mybusinessqanda.googleapis.com/v1/locations/{locationId}/questions
(而不是 https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/questions
)使用 Questions 端点。
可以通过 https://mybusinessqanda.googleapis.com/v1/locations/{locationId}/questions/{questionId}/answers
(而不是 https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/questions/{questionId}/answers
)使用 Answers 端点。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-29。
[null,null,["最后更新时间 (UTC):2025-08-29。"],[[["\u003cp\u003eStarting September 16, 2024, the old ID format for questions and answers will be deprecated and replaced with a new ID format, requiring updates to API calls using the \u003ccode\u003elist\u003c/code\u003e method for retrieval.\u003c/p\u003e\n"],["\u003cp\u003eAs of February 12, 2024, the \u003ccode\u003ename\u003c/code\u003e field for questions and answers transitioned to a new ID structure, with the API returning the updated ID in responses for compatibility.\u003c/p\u003e\n"],["\u003cp\u003eThere is a known issue with the \u003ccode\u003elocations.questions.list\u003c/code\u003e method where the \u003ccode\u003eorderBy\u003c/code\u003e parameter with \u003ccode\u003eupvoteCount\u003c/code\u003e might not correctly sort business-created questions when exceeding 50 in number.\u003c/p\u003e\n"],["\u003cp\u003eThe Q&A API requires explicit activation through the GCP Console, with endpoints for questions and answers being relocated to new URLs under the \u003ccode\u003emybusinessqanda.googleapis.com\u003c/code\u003e domain.\u003c/p\u003e\n"]]],[],null,["# Q&A API\n\n\u003cbr /\u003e\n\nChange log\n----------\n\n### v1: 2024-09-18\n\n#### old ID will no longer be accepted for locations.questions and locations.questions.answers\n\nIn case the `name` field includes the old ID of the question or answer, starting\n`2024-09-16`, API will return an exception. If you are using the old ID when\ncalling the API, replace it with the new ID by calling the `list` method.\n\n### v1: 2024-02-12\n\n#### `name` field will change for `locations.questions` and `locations.questions.answers`\n\nNote that starting `2024-02-12`, `name` field which includes the old ID of the\n[question](https://developers.google.com/my-business/reference/qanda/rest/v1/locations.questions#resource:-question)\nor [answer](https://developers.google.com/my-business/reference/qanda/rest/v1/locations.questions#answer)\nwill be replaced with a new ID. If you are using the old ID\nfor the question or answer, API will return the new ID in the response object\nfor your request.\n\n### v1: 2023-11-13\n\n#### `locations.questions.list` for businesses with more than 50 questions\n\nWe have a known limitation with `orderBy` query parameter for\n`locations.questions.list` that doesn't sort questions created by the business\ncorrectly using the `upvoteCount` order when there are more than 50 questions.\n\n### v1: 2021-11-18\n\n#### API Access\n\nThe Q\\&A API will need to be enabled from the [GCP Console.](https://console.developers.google.com/apis/library/mybusinessqanda.googleapis.com) The OAuth scope remains the same.\n\n#### Endpoint URL\n\nThe Questions endpoint is accessible at `https://mybusinessqanda.googleapis.com/v1/locations/{locationId}/questions` instead of `https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/questions`.\n\nThe Answers endpoint is accessible at `https://mybusinessqanda.googleapis.com/v1/locations/{locationId}/questions/{questionId}/answers` instead of `https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/questions/{questionId}/answers`."]]