curl --request GET \
--url https://api.social-api.ai/v1/platforms/google/accounts/{id}/insights \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.social-api.ai/v1/platforms/google/accounts/{id}/insights', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/platforms/google/accounts/{id}/insights"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"end_date": "<string>",
"metrics": [
{
"metric": "<string>",
"points": [
{
"date": "<string>",
"value": 123
}
],
"total": 123
}
],
"start_date": "<string>"
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}Get Google Business Profile performance metrics
Returns daily time series for a location: how many people saw it on Google Search and Maps, and how many then called, asked for directions, messaged, booked, ordered, or clicked through to the website. start_date and end_date are inclusive and formatted YYYY-MM-DD. metric takes a comma-separated list and defaults to every metric. A day with no activity comes back as a zero rather than a gap. Google publishes no retention window and no freshness lag for this data, so a recent day may still be filling in and an old range may return nothing.
curl --request GET \
--url https://api.social-api.ai/v1/platforms/google/accounts/{id}/insights \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.social-api.ai/v1/platforms/google/accounts/{id}/insights', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/platforms/google/accounts/{id}/insights"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"end_date": "<string>",
"metrics": [
{
"metric": "<string>",
"points": [
{
"date": "<string>",
"value": 123
}
],
"total": 123
}
],
"start_date": "<string>"
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}Authorizations
Prefix your API key with "Bearer ". Example: Authorization: Bearer sapi_key_...
Path Parameters
Connected account ID
Query Parameters
Inclusive start date, YYYY-MM-DD
Inclusive end date, YYYY-MM-DD
Comma-separated metric names, defaults to all
Response
OK
Show child attributes
Show child attributes