Analytics
Every profile analytics endpoint with a cURL, Python and Node sample: daily Google and Facebook metrics and weekly Bing views for a location.
Profile analytics say how often a location was seen and acted on at each
publisher: impressions, page views, direction requests, calls and website
clicks. There are three endpoints, one per publisher, and all three are
reads, so a Read key is enough. Every metric is a time series of
{ startTime, value } points; the API returns no scalar totals, so the sums
you show are ones you compute.
Endpoints at a glance
All three share the same parameters. fromDate and toDate are
YYYY-MM-DD, both optional; omit them and the publisher's default recent
window is used. The path takes the base64 Relay id or the plain number. A
value that is neither returns 200 with the insights object set to null
and an errors array, which looks like a disconnected profile, so check
errors first.
Read Google metrics for a date range
GET /locations/{locationId}/google-analytics returns data.googleInsights
with one daily series per metric. total is profile impressions, search
plus maps; it does not include the action metrics. Use it for a
before-and-after visibility report around a data change.
curl "https://listingsapi.com/api/v4/locations/TG9jYXRpb246MTgwMDI4OQ==/google-analytics?fromDate=2026-08-01&toDate=2026-08-31" \-H "Authorization: API $LISTINGSAPI_KEY"{ "data": { "googleInsights": { "total": [ { "startTime": "2026-08-01T00:00:00+00:00", "value": 412 }, { "startTime": "2026-08-02T00:00:00+00:00", "value": 388 } ], "search": [{ "startTime": "2026-08-01T00:00:00+00:00", "value": 300 }], "maps": [{ "startTime": "2026-08-01T00:00:00+00:00", "value": 112 }], "directionsAction": [{ "startTime": "2026-08-01T00:00:00+00:00", "value": 24 }], "phoneAction": [{ "startTime": "2026-08-01T00:00:00+00:00", "value": 8 }], "websiteAction": [{ "startTime": "2026-08-01T00:00:00+00:00", "value": 41 }], "businessBookings": [{ "startTime": "2026-08-01T00:00:00+00:00", "value": 0 }], "businessFoodOrders": [{ "startTime": "2026-08-01T00:00:00+00:00", "value": 0 }], "businessFoodMenuClicks": [{ "startTime": "2026-08-01T00:00:00+00:00", "value": 0 }] } }}Each point's startTime is the day the count is bucketed under. In the
sample, total on the first day is 412, which is 300 search plus 112
maps.
A metric is null, not an empty array, when the location has no Google data
for the window or its Google profile is not connected. Handle null and
[] the same way when you aggregate.
Read Facebook metrics for a date range
GET /locations/{locationId}/facebook-analytics has the same shape under
data.facebookInsights with five daily series. It requires the location's
Facebook Page to be connected. ctaAction is how you measure a "Book now"
or "Call now" button over a campaign window.
curl "https://listingsapi.com/api/v4/locations/TG9jYXRpb246MTgwMDI4OQ==/facebook-analytics?fromDate=2026-08-01&toDate=2026-08-31" \-H "Authorization: API $LISTINGSAPI_KEY"{ "data": { "facebookInsights": { "views": [{ "startTime": "2026-08-01T00:00:00+00:00", "value": 120 }], "ctaAction": [{ "startTime": "2026-08-01T00:00:00+00:00", "value": 5 }], "directionsAction": [{ "startTime": "2026-08-01T00:00:00+00:00", "value": 3 }], "phoneAction": [{ "startTime": "2026-08-01T00:00:00+00:00", "value": 2 }], "websiteAction": [{ "startTime": "2026-08-01T00:00:00+00:00", "value": 9 }] } }}There is no page-likes metric. Every series comes back null when the Page
has no data for the range or is not connected, so check for null before
iterating.
Read Bing views for a date range
GET /locations/{locationId}/bing-analytics returns a single series,
data.bingInsights.views, bucketed by week rather than day. Each point is
one week's view count starting at startTime. Data refreshes every Monday
for the preceding week, so the newest complete week is the latest you will
see. Fetch a multi-month range for a trend line; it is not suited to
day-level attribution.
curl "https://listingsapi.com/api/v4/locations/TG9jYXRpb246MTgwMDI4OQ==/bing-analytics?fromDate=2026-06-01&toDate=2026-08-31" \-H "Authorization: API $LISTINGSAPI_KEY"{ "data": { "bingInsights": { "views": [ { "startTime": "2026-06-01T00:00:00+00:00", "value": 73 }, { "startTime": "2026-06-08T00:00:00+00:00", "value": 58 } ] } }}Unlike Google and Facebook, Bing reports no data as an empty views array
with a 200, not as null. Treat both as "nothing to show", and test for
length == 0 if you want a "no data" label, since an empty array sums to
0.
Errors you will see
The reference pages name no resource-specific error codes for analytics. The cases you will meet:
The full list is in Error codes.
Next steps
- Fetch profile analytics: sum a series
into a monthly total and compare two periods, with the
nullguards. - Review analytics: rating, volume and response rate for the same location, with built-in period deltas.
- Reviews: the review analytics endpoints alongside the rest of the reviews resource.
- Reference landing: Analytics. SDKs: Python analytics, Node analytics.