GET/api/v4/locations

Alle Standorte auflisten

Gibt eine mit Cursorn paginierte Liste der Standorte in Ihrem Konto zurück.

Erfordert einen API-Schlüssel. Format des Headers und Schlüsselrotation finden Sie unter Authentifizierung.

Parameter

Query

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

Antworten

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.

Durchläuft alle Standorte in Ihrem Konto seitenweise. Die Ergebnisse sind nach Erstellungsdatum sortiert (neueste zuerst). Jede Edge enthält einen cursor (ein opakes Base64-Token, das bei einem Standort zu Location:<databaseId> dekodiert wird) und einen node mit dem vollständigen Standortdatensatz.

Anwendungsfall: Alle Standorte mit Ihrem eigenen System synchronisieren. Beginnen Sie mit ?first=50, lesen Sie pageInfo.hasNextPage aus und fordern Sie, wenn true gilt, die nächste Seite mit ?first=50&after=<pageInfo.endCursor> an. Wiederholen Sie dies, bis hasNextPage den Wert false hat. Um einen Backfill vom anderen Ende aus fortzusetzen, verwenden Sie last + before mit dem cursor der ersten Edge der Seite, von der aus Sie zurückblättern. Der Base64-Wert id des Knotens ist der Bezeichner, den alle anderen Endpunkte erwarten; übergeben Sie ihn an Standorte anhand ihrer IDs abrufen, Sprachassistenten oder Standort aktualisieren.

Anwendungsfall: Eine gefilterte Teilmenge. Übergeben Sie in filter ein JSON-kodiertes Objekt, um die Verbindung serverseitig einzugrenzen (beispielsweise nach Genehmigungsstatus), statt jede Seite abzurufen und clientseitig zu filtern. So bleiben große Konten innerhalb der Ratenlimits.

Stolperfalle bei Paginierung und Ratenlimits: Cursor sind opak: Erstellen Sie niemals einen Cursor von Hand; senden Sie immer einen von der API zurückgegebenen Cursor erneut, entweder pageInfo.endCursor beim Vorwärtsblättern oder den eigenen cursor einer Edge beim Rückwärtsblättern (pageInfo hat keinen startCursor). Verwenden Sie entweder first/after (vorwärts) oder last/before (rückwärts), nicht beide Richtungen gleichzeitig. Paginierungsschleifen mit sehr kurzen Abständen sind die häufigste Ursache für 429-Antworten; beachten Sie den Header Retry-After und vermeiden Sie es, mehr als eine Seitenanfrage gleichzeitig laufen zu lassen.

Jeder Standort gibt placeActionLinks (die von Listings API verwalteten Google-Aktionslinks) und discoveredPlaceActionLinks (Links, die direkt im Google-Profil des Unternehmens gefunden wurden und noch nicht verwaltet werden) zurück. Wie Sie diese auslesen, übernehmen und verwalten, erfahren Sie im Leitfaden zu Place Action Links.

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