GET/api/v4/locations

Elenca tutte le sedi

Restituisce un elenco delle sedi del tuo account paginato tramite cursore.

Richiede una chiave API. Consulta Autenticazione per il formato dell’header e la rotazione delle chiavi.

Parametri

Query

NomeTipoObbligatorioDescrizionePredefinito
firstintegerfacoltativoNumber of records to fetch from the start of the connection (forward pagination). Combine with `after`.50
lastintegerfacoltativoNumber of records to fetch from the end of the connection (backward pagination). Combine with `before`.—
afterstringfacoltativoCursor to fetch records after. Pass `pageInfo.endCursor` from the previous page.—
beforestringfacoltativoCursor 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.—
filterstringfacoltativoJSON-encoded filter object to narrow the result set (e.g. by approval status or sync state).—

Risposte

200Cursor-paginated connection of locations. Each edge exposes a `cursor` and a `node` (the full location).
Response
{  "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.

Scorre tutte le sedi del tuo account, pagina per pagina. I risultati sono ordinati per data di creazione (dal più recente). Ogni edge contiene un cursor (un token base64 opaco che, per una sede, viene decodificato in Location:<databaseId>) e un node contenente il record completo della sede.

Caso d'uso: sincronizzare tutte le sedi nel tuo sistema. Inizia con ?first=50, leggi pageInfo.hasNextPage e, se true, richiedi la pagina successiva con ?first=50&after=<pageInfo.endCursor>. Ripeti finché hasNextPage non è false. Per riprendere un recupero dei dati pregressi dall'altra estremità, usa last + before con il cursor del primo edge della pagina dalla quale stai tornando indietro. L'id in base64 del nodo è l'identificatore previsto da tutti gli altri endpoint: passalo a recupera sedi per ID, assistenti vocali o aggiorna sede.

Caso d'uso: un sottoinsieme filtrato. Passa un oggetto codificato in JSON in filter per limitare l'ambito della connessione lato server (ad esempio in base allo stato di approvazione), anziché recuperare tutte le pagine e filtrare lato client. Questo mantiene gli account di grandi dimensioni entro i limiti di frequenza delle richieste.

Insidia della paginazione e dei limiti di frequenza delle richieste: i cursori sono opachi: non crearne mai uno manualmente; reinvia sempre un cursore restituito dall'API, usando pageInfo.endCursor per andare avanti oppure il cursor di un edge per tornare indietro (pageInfo non ha startCursor). Usa first/after (in avanti) oppure last/before (indietro), mai entrambe le direzioni contemporaneamente. I cicli di paginazione senza pause sono la causa più comune delle risposte 429; rispetta l'header Retry-After ed evita di avere più di una richiesta di pagina in corso alla volta.

Ogni sede restituisce placeActionLinks (i link alle azioni di Google gestiti da Listings API) e discoveredPlaceActionLinks (i link trovati direttamente sul profilo Google dell'attività che non sono ancora gestiti). Consulta la guida ai link alle azioni dei luoghi per sapere come leggerli, prenderli in gestione e gestirli.

Request
curl -X GET 'https://listingsapi.com/api/v4/locations' \  -H "Authorization: API $LISTINGSAPI_KEY"