Google Business Performance API มีเมธอด API
ใหม่ที่อนุญาตให้ดึง `DailyMetrics` หลายรายการในคําขอ API รายการเดียว
ตรวจสอบ
กําหนดการเลิกใช้งานและวิธีการย้ายข้อมูลจากเมธอด v4 reportInsights API ไปยัง API ประสิทธิภาพของ Google Business Profile
Method: accounts.locations.findMatches
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ค้นหาสถานที่ตั้งที่เป็นไปได้ทั้งหมดที่ตรงกับสถานที่ตั้งที่ระบุ การดำเนินการนี้จะใช้ได้ต่อเมื่อสถานที่ไม่ได้รับการยืนยัน
คำขอ HTTP
POST https://mybusiness.googleapis.com/v4/{name=accounts/*/locations/*}:findMatches
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
name |
string
ชื่อทรัพยากรของตำแหน่งที่จะค้นหารายการที่ตรงกัน
|
เนื้อหาของคำขอ
เนื้อหาของคำขอมีข้อมูลที่มีโครงสร้างต่อไปนี้
การแสดง JSON |
{
"languageCode": string,
"numResults": integer,
"maxCacheDuration": string
} |
ช่อง |
languageCode |
string
ภาษาที่ต้องการสำหรับตำแหน่งที่ตรงกัน (ในรูปแบบ BCP-47)
|
numResults |
integer
จำนวนรายการที่ตรงกันที่จะส่งคืน ค่าเริ่มต้นคือ 3 แต่สูงสุด 10 รายการ โปรดทราบว่าเวลาในการตอบสนองอาจเพิ่มขึ้นหากมีการร้องขอเพิ่มเติม โดยไม่มีการใส่เลขหน้า
|
maxCacheDuration |
string (Duration format)
เลิกใช้งานแล้ว ระบบจะไม่พิจารณาช่องนี้สำหรับคำขอทั้งหมด ระยะเวลาเป็นวินาทีโดยมีเลขเศษส่วนไม่เกิน 9 หลัก สิ้นสุดด้วย "s " ตัวอย่างเช่น "3.5s"
|
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
ข้อความตอบกลับสำหรับ Locations.FindMatchingLocations
การแสดง JSON |
{
"matchedLocations": [
{
object (MatchedLocation )
}
],
"matchTime": string
} |
ช่อง |
matchedLocations[] |
object (MatchedLocation )
คอลเล็กชันของสถานที่ตั้งที่อาจตรงกับสถานที่ตั้งที่ระบุ โดยเรียงลำดับจากดีที่สุดไปหาน้อยที่สุด หากมีการจับคู่ที่ตรงกันทั้งหมด ตำแหน่งดังกล่าวจะอยู่ในตำแหน่งแรก
|
matchTime |
string (Timestamp format)
เวลาที่เรียกใช้อัลกอริทึมการจับคู่ครั้งล่าสุดสำหรับตำแหน่งนี้ การประทับเวลาเป็น RFC3339 UTC "Zulu" โดยมีความละเอียดระดับนาโนวินาทีและมีเลขเศษส่วนสูงสุด 9 หลัก ตัวอย่าง: "2014-10-02T15:01:23Z" และ "2014-10-02T15:01:23.045123456Z"
|
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth รายการใดรายการหนึ่งต่อไปนี้
https://www.googleapis.com/auth/plus.business.manage
https://www.googleapis.com/auth/business.manage
สำหรับข้อมูลเพิ่มเติม โปรดดูที่ภาพรวมของ OAuth 2.0
MatchedLocation
แสดงการจับคู่ที่เป็นไปได้กับสถานที่ตั้ง
การแสดง JSON |
{
"location": {
object (Location )
},
"isExactMatch": boolean
} |
ช่อง |
location |
object (Location )
สถานที่ตั้งที่มีการป้อนข้อมูลเล็กน้อยซึ่งอาจตรงกัน ช่องที่ไม่มีการป้อนข้อมูลรวมถึงแต่ไม่จํากัดเพียงชื่อ (ระบบไม่สามารถดึงข้อมูลสถานที่ตั้งที่ตรงกันผ่าน locations.get หรือ locations.batchGet ) storeCode ; รายละเอียดพื้นที่ครอบคลุมของ serviceArea labels ; adWordsLocationExtensions ; photos
|
isExactMatch |
boolean
นี่เป็นรายการที่ตรงกันทั้งหมดหรือไม่
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\u003cp\u003eFinds potential location matches for unverified locations, ranked by match quality.\u003c/p\u003e\n"],["\u003cp\u003eSends an HTTP POST request to \u003ccode\u003ehttps://mybusiness.googleapis.com/v4/{name=accounts/*/locations/*}:findMatches\u003c/code\u003e, specifying the location and optional language, result count.\u003c/p\u003e\n"],["\u003cp\u003eReceives a response with a list of matched locations and a timestamp indicating when the matching algorithm was last run.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with either \u003ccode\u003ehttps://www.googleapis.com/auth/plus.business.manage\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/business.manage\u003c/code\u003e scope.\u003c/p\u003e\n"],["\u003cp\u003eEach matched location includes basic information and a flag indicating whether it's an exact match.\u003c/p\u003e\n"]]],[],null,["# Method: accounts.locations.findMatches\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.FindMatchingLocationsResponse.SCHEMA_REPRESENTATION)\n- [Authorization Scopes](#body.aspect)\n- [MatchedLocation](#MatchedLocation)\n - [JSON representation](#MatchedLocation.SCHEMA_REPRESENTATION)\n\nFinds all of the possible locations that are a match to the specified location. This operation is only valid if the location is unverified.\n\n### HTTP request\n\n`POST https://mybusiness.googleapis.com/v4/{name=accounts/*/locations/*}:findMatches`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|-----------------------------------------------------------------|\n| `name` | `string` The resource name of the location to find matches for. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation ||\n|---------------------------------------------------------------------------------------|---|\n| ``` { \"languageCode\": string, \"numResults\": integer, \"maxCacheDuration\": string } ``` |\n\n| Fields ||\n|--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `languageCode` | `string` The preferred language for the matching location (in BCP-47 format). |\n| `numResults` | `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| `maxCacheDuration` | `string (`[Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration)` format)` Deprecated. This field is ignored for all requests. A duration in seconds with up to nine fractional digits, terminated by '`s`'. Example: `\"3.5s\"`. |\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\nResponse message for Locations.FindMatchingLocations.\n\n| JSON representation ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"matchedLocations\": [ { object (/my-business/reference/rest/v4/accounts.locations/findMatches#MatchedLocation) } ], \"matchTime\": string } ``` |\n\n| Fields ||\n|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `matchedLocations[]` | `object (`[MatchedLocation](/my-business/reference/rest/v4/accounts.locations/findMatches#MatchedLocation)`)` A collection of locations that are potential matches to the specified location, listed in order from best to least match. If there is an exact match, it will be in the first position. |\n| `matchTime` | `string (`[Timestamp](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp)` format)` When the matching algorithm was last executed for this location. A timestamp in RFC3339 UTC \"Zulu\" format, with nanosecond resolution and up to nine fractional digits. Examples: `\"2014-10-02T15:01:23Z\"` and `\"2014-10-02T15:01:23.045123456Z\"`. |\n\n### Authorization Scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/plus.business.manage`\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).\n\nMatchedLocation\n---------------\n\nRepresents a possible match to a location.\n\n| JSON representation ||\n|--------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"location\": { object (/my-business/reference/rest/v4/accounts.locations#Location) }, \"isExactMatch\": boolean } ``` |\n\n| Fields ||\n|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `location` | `object (`[Location](/my-business/reference/rest/v4/accounts.locations#Location)`)` The sparsely populated location that is a potential match. Unpopulated fields include, but may not be limited to: name (the matched location cannot be retrieved via `locations.get` nor `locations.batchGet`); `storeCode`; `serviceArea` coverage area details; `labels`; `adWordsLocationExtensions`; `photos` |\n| `isExactMatch` | `boolean` Is this an exact match? |"]]