Skip to content
SynupAPI
Get an API key
GETapi.synup.com/api/v4/locations/{locationId}/facebook-analytics

Get Facebook Page Analytics

This API retrieves profile analytics data from Facebook for a specific location.

Requires an API key. Send it as Authorization: API <your-key> — see Getting started.

Parameters

Path

NameTypeRequiredDescription
locationIdstringrequiredLocation ID

Query

NameTypeRequiredDescription
fromDatestringoptionalStart date of date range filter (YYYY-MM-DD)
toDatestringoptionalEnd date of date range filter (YYYY-MM-DD)

Request

Request
curl -X GET 'https://api.synup.com/api/v4/locations/:locationId/facebook-analytics?fromDate=&toDate=' \
  -H 'Authorization: API YOUR_API_KEY' \
  -H 'Content-Type: application/json'

Responses

StatusDescription
200Successful response
401Unauthorized
404Location not found
Example response (generated from the schema)
{
  "data": {
    "facebookInsights": {
      "ctaAction": [
        {
          "startTime": "2018-11-13T00:00:00+00:00",
          "value": 0
        }
      ],
      "directionsAction": [
        {
          "startTime": "2018-11-13T00:00:00+00:00",
          "value": 0
        }
      ],
      "phoneAction": [
        {
          "startTime": "2018-11-13T00:00:00+00:00",
          "value": 0
        }
      ],
      "views": [
        {
          "startTime": "2018-11-13T00:00:00+00:00",
          "value": 0
        }
      ],
      "websiteAction": [
        {
          "startTime": "2018-11-13T00:00:00+00:00",
          "value": 0
        }
      ]
    }
  }
}

Response body

NameTypeRequiredDescription
dataobjectoptional
data.facebookInsightsobjectoptional
data.facebookInsights.ctaActionarray of objectoptionalThe number of times the CTA on the page was clicked
data.facebookInsights.ctaAction[].startTimestringoptionalStart time of the analytics period
data.facebookInsights.ctaAction[].valueintegeroptionalMetric value for the period
data.facebookInsights.directionsActionarray of objectoptionalThe number of times directions for the particular location was requested
data.facebookInsights.directionsAction[].startTimestringoptionalStart time of the analytics period
data.facebookInsights.directionsAction[].valueintegeroptionalMetric value for the period
data.facebookInsights.phoneActionarray of objectoptionalThe number of times the call number for the location was requested
data.facebookInsights.phoneAction[].startTimestringoptionalStart time of the analytics period
data.facebookInsights.phoneAction[].valueintegeroptionalMetric value for the period
data.facebookInsights.viewsarray of objectoptionalThe number of times the page was viewed
data.facebookInsights.views[].startTimestringoptionalStart time of the analytics period
data.facebookInsights.views[].valueintegeroptionalMetric value for the period
data.facebookInsights.websiteActionarray of objectoptionalThe number of times the website URL for the location was requested
data.facebookInsights.websiteAction[].startTimestringoptionalStart time of the analytics period
data.facebookInsights.websiteAction[].valueintegeroptionalMetric value for the period