Method: googleLocations.search
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eSearch for Google Locations that match a specified request, using either a location object or a string query.\u003c/p\u003e\n"],["\u003cp\u003eResponses include a list of potential Google Location matches, ranked by accuracy.\u003c/p\u003e\n"],["\u003cp\u003eSpecify the number of matches to return, with a default of 3 and a maximum of 10.\u003c/p\u003e\n"],["\u003cp\u003eRequires the \u003ccode\u003ehttps://www.googleapis.com/auth/business.manage\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"],["\u003cp\u003eThe API utilizes gRPC Transcoding and provides JSON structured request and response bodies.\u003c/p\u003e\n"]]],["This describes a search operation for Google locations using a POST request to `https://mybusinessbusinessinformation.googleapis.com/v1/googleLocations:search`. The request body can include an integer `pageSize` (default 3, max 10) and a `search_query`, either a `location` object or a string `query`. The response returns a list of `googleLocations`, ordered by accuracy. Requires OAuth scope `https://www.googleapis.com/auth/business.manage`.\n"],null,["# Method: googleLocations.search\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.SearchGoogleLocationsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n\nSearch all of the possible locations that are a match to the specified request.\n\n### HTTP request\n\n`POST https://mybusinessbusinessinformation.googleapis.com/v1/googleLocations:search`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"pageSize\": integer, // Union field `search_query` can be only one of the following: \"location\": { object (/my-business/reference/businessinformation/rest/v1/accounts.locations#Location) }, \"query\": string // End of list of possible types for union field `search_query`. } ``` |\n\n| Fields ||\n|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageSize` | `integer` The number of matches to return. The default value is 3, with a maximum of 10. Note that latency may increase if more are requested. There is no pagination. |\n| Union field `search_query`. Search query. This can be provided either as a location object or as a string query. `search_query` can be only one of the following: ||\n| `location` | `object (`[Location](/my-business/reference/businessinformation/rest/v1/accounts.locations#Location)`)` Location to search for. If provided, will find locations which match the provided location details. |\n| `query` | `string` Text query to search for. The search results from a query string will be less accurate than if providing an exact location, but can provide more inexact matches. |\n\n### Response body\n\nResponse message for GoogleLocations.SearchGoogleLocations.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"googleLocations\": [ { object (/my-business/reference/businessinformation/rest/v1/googleLocations#GoogleLocation) } ] } ``` |\n\n| Fields ||\n|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `googleLocations[]` | `object (`[GoogleLocation](/my-business/reference/businessinformation/rest/v1/googleLocations#GoogleLocation)`)` A collection of GoogleLocations that are potential matches to the specified request, listed in order from most to least accuracy. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/business.manage`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]