/api/v4/locationsTüm konumları listeleme
Hesabınızdaki konumların imleç tabanlı sayfalandırılmış bir listesini döndürür.
Parametreler
Sorgu
| Ad | Tür | Zorunlu | Açıklama | Varsayılan |
|---|---|---|---|---|
| first | integer | isteğe bağlı | Number of records to fetch from the start of the connection (forward pagination). Combine with `after`. | 50 |
| last | integer | isteğe bağlı | Number of records to fetch from the end of the connection (backward pagination). Combine with `before`. | — |
| after | string | isteğe bağlı | Cursor to fetch records after. Pass `pageInfo.endCursor` from the previous page. | — |
| before | string | isteğe bağlı | Cursor to fetch records before, used with `last`. Pass the `cursor` of the first edge of the page you are moving back from. `pageInfo` carries no `startCursor` field, so the edge cursor is the value to use. | — |
| filter | string | isteğe bağlı | JSON-encoded filter object to narrow the result set (e.g. by approval status or sync state). | — |
Yanıtlar
200Cursor-paginated connection of locations. Each edge exposes a `cursor` and a `node` (the full location).
{ "data": { "allLocations": { "edges": [ { "cursor": "TG9jYXRpb246MTgwMDI4OQ==", "node": { "id": "TG9jYXRpb246MTgwMDI4OQ==", "databaseId": 1800289, "accountId": 12345, "accountName": "owner@brightsmile-dental.com", "name": "Jenny Home", "approved": "APPROVED", "archived": false, "archivalScheduledAt": null, "archivedAt": null, "street": "600 Congress Ave, Suite 200", "city": "Austin", "stateIso": "TX", "stateName": "Texas", "postalCode": "78701", "countryIso": "US", "countryCode": "1", "latitude": "30.2711286", "longitude": "-97.7436995", "phone": "5125550142", "additionalPhones": [], "bizUrl": null, "hideAddress": false, "storeId": null, "categoryId": 15, "subCategoryId": 1432, "subCategoryName": "Restaurants", "additionalCategoryIds": [], "additionalCategoryNames": [], "description": "This is a standalone duplex house. A comfortable, private residence located in the Bouldin Creek neighborhood of Austin, offering spacious duplex living with easy access to the surrounding South Congress area and downtown Austin.", "businessHours": [], "package": "PREMIUM", "planId": 3797, "planName": "Launch", "temporarilyClosed": false, "ownerEmail": null, "ownerName": null, "googleVerificationStatus": { "status": "NOT_CONNECTED", "message": null }, "voiceStatus": 3, "uid": "3c92283c-6145-4a43-8a62-0c15fd712021", "createdDate": "July 06, 2026", "lastUpdatedDate": "July 06, 2026", "updatedAt": "2026-07-06T18:33:29.664Z", "placeActionLinks": [ { "placeActionType": "FOOD_ORDERING", "uri": "https://order.example.com", "isPreferred": true, "name": "locations/1944.../placeActionLinks/54ada85bc246058a", "submissionStatus": "success", "submissionMessage": "Already up to date on Google.", "lastSubmittedAt": "2026-07-08T12:14:36Z" } ], "discoveredPlaceActionLinks": [ { "placeActionType": "APPOINTMENT", "uri": "https://book.example.com", "isPreferred": false, "name": "locations/1944.../placeActionLinks/abc123", "providerType": "MERCHANT", "isEditable": true } ] } } ], "pageInfo": { "hasNextPage": false, "hasPreviousPage": false, "endCursor": "TG9jYXRpb246MTgwMDI4OQ==", "total": 1 } } }}401Unauthenticated, missing or invalid API key.
429Rate limit exceeded. Retry after the `Retry-After` header value.
Hesabınızdaki tüm konumları sayfa sayfa getirir. Sonuçlar oluşturulma tarihine göre sıralanır (en yeniler önce). Her edge, bir cursor (bir konum için kodu çözüldüğünde Location:<databaseId> değerini veren opak bir base64 belirteci) ve konum kaydının tamamını içeren bir node taşır.
Kullanım senaryosu: tüm konumları kendi sisteminizle senkronize etme. ?first=50 ile başlayın, pageInfo.hasNextPage değerini okuyun ve true ise ?first=50&after=<pageInfo.endCursor> ile sonraki sayfayı isteyin. hasNextPage değeri false olana kadar tekrarlayın. Geçmiş veri aktarımına diğer uçtan devam etmek için geriye doğru ayrıldığınız sayfanın ilk edge'inin cursor değeriyle birlikte last + before kullanın. Node'un base64 biçimindeki id değeri, diğer tüm endpoint'lerin beklediği tanımlayıcıdır; bu değeri kimliklere göre konumları getirme, sesli asistanlar veya konum güncelleme için kullanın.
Kullanım senaryosu: filtrelenmiş bir alt küme. Her sayfayı çekip istemci tarafında filtrelemek yerine, bağlantının kapsamını sunucu tarafında daraltmak için (örneğin onay durumuna göre) filter içinde JSON olarak kodlanmış bir nesne iletin. Bu, büyük hesapların istek hızı sınırları içinde kalmasını sağlar.
Sayfalandırma + istek hızı sınırı konusunda dikkat edilmesi gereken nokta: İmleçler opaktır: asla elle bir imleç oluşturmayın; her zaman API'nin döndürdüğü bir imleci yeniden gönderin; ileri giderken pageInfo.endCursor, geri giderken ise bir edge'in kendi cursor değerini kullanın (pageInfo içinde startCursor bulunmaz). Ya first/after (ileri) ya da last/before (geri) kullanın; iki yönü aynı anda kullanmayın. Art arda hızlıca istek gönderen sayfalandırma döngüleri, 429 yanıtlarının en yaygın nedenidir; Retry-After üstbilgisine uyun ve bir sayfa isteği tamamlanmadan başka bir sayfa istemekten kaçının.
Her konum, placeActionLinks (Listings API'nin yönettiği Google işlem bağlantıları) ve discoveredPlaceActionLinks (doğrudan işletmenin Google profilinde bulunan ve henüz yönetilmeyen bağlantılar) döndürür. Bunların nasıl okunacağını, yönetim kapsamına alınacağını ve yönetileceğini öğrenmek için Yer İşlem Bağlantıları kılavuzuna bakın.
curl -X GET 'https://listingsapi.com/api/v4/locations' \ -H "Authorization: API $LISTINGSAPI_KEY"