/api/v4/locationsListar todas las ubicaciones
Devuelve una lista de las ubicaciones de tu cuenta paginada mediante cursores.
Parámetros
Consulta
| Nombre | Tipo | Obligatorio | Descripción | Predeterminado |
|---|---|---|---|---|
| first | integer | opcional | Number of records to fetch from the start of the connection (forward pagination). Combine with `after`. | 50 |
| last | integer | opcional | Number of records to fetch from the end of the connection (backward pagination). Combine with `before`. | — |
| after | string | opcional | Cursor to fetch records after. Pass `pageInfo.endCursor` from the previous page. | — |
| before | string | opcional | 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 | opcional | JSON-encoded filter object to narrow the result set (e.g. by approval status or sync state). | — |
Respuestas
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.
Recorre por páginas todas las ubicaciones de tu cuenta. Los resultados se ordenan por fecha de creación (los más recientes primero). Cada arista contiene un cursor (un token opaco en base64 que, para una ubicación, se decodifica como Location:<databaseId>) y un node que contiene el registro completo de la ubicación.
Caso de uso: sincronizar todas las ubicaciones con tu propio sistema. Empieza con ?first=50, lee pageInfo.hasNextPage y, si true, solicita la siguiente página con ?first=50&after=<pageInfo.endCursor>. Repite hasta que hasNextPage sea false. Para reanudar una carga de datos históricos desde el otro extremo, usa last + before con el cursor de la primera arista de la página desde la que retrocedes. El id en base64 del nodo es el identificador que esperan todos los demás endpoints; pásalo a obtener ubicaciones por sus ID, asistentes de voz o actualizar una ubicación.
Caso de uso: un subconjunto filtrado. Pasa un objeto codificado en JSON en filter para limitar el alcance de la conexión en el servidor (por ejemplo, por estado de aprobación) en lugar de obtener todas las páginas y filtrar en el cliente. Esto mantiene las cuentas grandes dentro de los límites de frecuencia de solicitudes.
Precaución con la paginación y los límites de frecuencia de solicitudes: los cursores son opacos: nunca construyas uno manualmente; vuelve a enviar siempre un cursor devuelto por la API, ya sea pageInfo.endCursor para avanzar o el cursor de una arista para retroceder (pageInfo no tiene startCursor). Usa first/after (para avanzar) o last/before (para retroceder), pero no ambas direcciones a la vez. Los bucles de paginación sin pausas son la causa más común de las respuestas 429; respeta la cabecera Retry-After y evita tener más de una solicitud de página en curso a la vez.
Cada ubicación devuelve placeActionLinks (los enlaces de acción de Google que gestiona Listings API) y discoveredPlaceActionLinks (los enlaces encontrados directamente en el perfil de Google del negocio que aún no se gestionan). Consulta la guía de enlaces de acción de lugares para saber cómo leerlos, adoptarlos y gestionarlos.
curl -X GET 'https://listingsapi.com/api/v4/locations' \ -H "Authorization: API $LISTINGSAPI_KEY"