Google Business Profile एपीआई में
एपीआई का नया तरीका है. इसकी मदद से, एक ही एपीआई अनुरोध में कई `डेली मेट्रिक` फ़ेच की जा सकती हैं.
सेवा बंद होने का शेड्यूल देखें. साथ ही, v4 reportInsights API वाले तरीके से Google Business Profile की परफ़ॉर्मेंस एपीआई में माइग्रेट करने के बारे में निर्देश देखें.
Method: accounts.locations.list
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
बताए गए खाते के लिए जगहों की सूची बनाता है.
एचटीटीपी अनुरोध
GET https://mybusiness.googleapis.com/v4/{parent=accounts/*}/locations
यह यूआरएल gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल करता है.
पाथ पैरामीटर
पैरामीटर |
parent |
string
उस खाते का नाम जिससे जगहों की जानकारी फ़ेच करनी है. अगर Account AccountType व्यक्तिगत है, तो सिर्फ़ वे जगहें दिखाई जाती हैं जिनका मालिकाना हक खाते के पास है. ऐसा न करने पर, यह सीधे या किसी दूसरे तरीके से खाते से ऐक्सेस की जा सकने वाली सभी जगहों की जानकारी दिखाएगा.
|
क्वेरी पैरामीटर
पैरामीटर |
pageSize |
integer
हर पेज पर कितनी जगहों की जानकारी फ़ेच की जा सकती है. डिफ़ॉल्ट वैल्यू 100, कम से कम वैल्यू, और ज़्यादा से ज़्यादा साइज़ 100 है.
|
pageToken |
string
अगर बताया जाता है, तो यह अगली page जगहों को फ़ेच करता है. यह पेज टोकन, locations.list को किए गए पिछले कॉल से तब दिखता है, जब अनुरोध किए गए पेज साइज़ के हिसाब से जगहों की संख्या उससे ज़्यादा होती है.
|
filter |
string
एक फ़िल्टर, जो दिखाए जाने वाले स्थानों को सीमित करता है. इस जवाब में सिर्फ़ फ़िल्टर से मेल खाने वाली एंट्री शामिल होती हैं. अगर filter खाली है, तो पाबंदियां लागू होती हैं और अनुरोध किए गए खाते के लिए सभी जगहों (पेज पर नंबर वाले) को वापस लाया जाता है. मान्य फ़ील्ड और उदाहरण के इस्तेमाल के बारे में ज़्यादा जानकारी के लिए, जगह की जानकारी के डेटा की गाइड के साथ काम करना देखें.
|
languageCode (deprecated) |
string
डिसप्ले लोकेशन प्रॉपर्टी पाने के लिए भाषा का BCP 47 कोड. अगर यह भाषा उपलब्ध नहीं है, तो इसे जगह की भाषा में दिखाया जाएगा. अगर इनमें से कोई भी उपलब्ध नहीं है, तो जानकारी अंग्रेज़ी में दी जाएगी. समर्थन नहीं होना या रुकना. यह फ़ील्ड 15 अगस्त, 2020 के बाद लागू नहीं रहेगा. इसके बजाय, स्थान की भाषा का उपयोग हमेशा किया जाएगा.
|
orderBy |
string
अनुरोध को क्रम से लगाया जा रहा है. एक से ज़्यादा फ़ील्ड को कॉमा लगाकर अलग किया जाना चाहिए. इसके लिए, एसक्यूएल सिंटैक्स का इस्तेमाल किया जाना चाहिए. क्रम से लगाने का डिफ़ॉल्ट क्रम बढ़ते क्रम में है. घटते क्रम में लगाने के लिए, प्रत्यय " वर्णन" को जोड़ा जाना चाहिए. OrderBy के लिए मान्य फ़ील्ड, locationName और storeCode हैं. उदाहरण के लिए: "locationName, storeCode desc" या "जगह का नाम" या "storeCode desc"
|
अनुरोध का मुख्य भाग
अनुरोध का मुख्य हिस्सा खाली होना चाहिए.
जवाब का मुख्य भाग
अगर एपीआई सही से जुड़ जाता है, ताे जवाब के मुख्य भाग में नीचे दिए गए स्ट्रक्चर शामिल होता है.
Places.ListLocations के लिए रिस्पॉन्स मैसेज.
JSON के काेड में दिखाना |
{
"locations": [
{
object (Location )
}
],
"nextPageToken": string,
"totalSize": integer
} |
फ़ील्ड |
locations[] |
object (Location )
जगहें.
|
nextPageToken |
string
अगर जगहों की संख्या, पेज के साइज़ से ज़्यादा हो गई है, तो इस फ़ील्ड में एक टोकन होता है. इसकी मदद से, locations.list को किए जाने वाले अगले कॉल पर जगहों की जानकारी का अगला पेज फ़ेच किया जा सकता है. अगर कोई और जगह नहीं है, तो जवाब में यह फ़ील्ड मौजूद नहीं होगा.
|
totalSize |
integer
पेज नंबर पर ध्यान दिए बिना सूची में जगहों की अनुमानित संख्या.
|
अनुमति पाने के लिंक
इनमें से किसी एक OAuth स्कोप की ज़रूरत होती है:
https://www.googleapis.com/auth/plus.business.manage
https://www.googleapis.com/auth/business.manage
ज़्यादा जानकारी के लिए, OAuth 2.0 की खास जानकारी देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eLists all accessible locations for a specified Google My Business account, including directly or indirectly owned locations based on account type.\u003c/p\u003e\n"],["\u003cp\u003eAllows filtering, pagination, and sorting of location data through query parameters like \u003ccode\u003efilter\u003c/code\u003e, \u003ccode\u003epageSize\u003c/code\u003e, \u003ccode\u003epageToken\u003c/code\u003e, and \u003ccode\u003eorderBy\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eReturns a list of locations with details like location name, store code, and other properties, along with pagination information if applicable.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with specific OAuth scopes for accessing and managing business data.\u003c/p\u003e\n"],["\u003cp\u003eProvides a total count of locations irrespective of pagination for easier management and understanding of the data set.\u003c/p\u003e\n"]]],[],null,["# Method: accounts.locations.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListLocationsResponse.SCHEMA_REPRESENTATION)\n- [Authorization Scopes](#body.aspect)\n\nLists the locations for the specified account.\n\n### HTTP request\n\n`GET https://mybusiness.googleapis.com/v4/{parent=accounts/*}/locations`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` The name of the account to fetch locations from. If the [Account](/my-business/reference/rest/v4/accounts#Account) is of [AccountType](/my-business/reference/rest/v4/accounts#Account.AccountType) PERSONAL, only Locations that are directly owned by the Account are returned, otherwise it will return all accessible locations from the Account, either directly or indirectly. |\n\n### Query parameters\n\n| Parameters ||\n|---------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageSize` | `integer` How many locations to fetch per page. Default is 100, minimum is 1, and maximum page size is 100. |\n| `pageToken` | `string` If specified, it fetches the next `page` of locations. The page token is returned by previous calls to `locations.list` when there were more locations than could fit in the requested page size. |\n| `filter` | `string` A filter constraining the locations to return. The response includes only entries that match the filter. If `filter` is empty, then constraints are applied and all locations (paginated) are retrieved for the requested account. For more information about valid fields and example usage, see [Work with Location Data Guide](https://developers.google.com/my-business/content/location-data#filter_results_when_you_list_locations). |\n| `languageCode` **(deprecated)** | `string` The BCP 47 code of language to get display location properties in. If this language is not available, they will be provided in the language of the location. If neither is available, they will be provided in English. Deprecated. After August 15th, 2020, this field will no longer be applied. Instead, the language of the location will always be used. |\n| `orderBy` | `string` Sorting order for the request. Multiple fields should be comma-separated, following SQL syntax. The default sorting order is ascending. To specify descending order, a suffix \" desc\" should be added. Valid fields to orderBy are locationName and storeCode. For example: \"locationName, storeCode desc\" or \"locationName\" or \"storeCode desc\" |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\nResponse message for Locations.ListLocations.\n\n| JSON representation ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"locations\": [ { object (/my-business/reference/rest/v4/accounts.locations#Location) } ], \"nextPageToken\": string, \"totalSize\": integer } ``` |\n\n| Fields ||\n|-----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `locations[]` | `object (`[Location](/my-business/reference/rest/v4/accounts.locations#Location)`)` The locations. |\n| `nextPageToken` | `string` If the number of locations exceeded the requested page size, this field is populated with a token to fetch the next page of locations on a subsequent call to `locations.list`. If there are no more locations, this field is not present in the response. |\n| `totalSize` | `integer` The approximate number of Locations in the list irrespective of pagination. |\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)."]]