Facebook Pixel
APILinkedIn Analytics

Get creator analytics

Retrieve LinkedIn creator analytics for the authenticated account. Includes engagement metrics, content performance, audience insights, and growth trends. Supports various time ranges and metric filters.

POST/analytics/creator
Authentication requiredAnalytics

Code Examples

curl -X POST 'https://api.connectsafely.ai/linkedin/analytics/creator' \
-H 'Authorization: Bearer <your_api_key>' \
-H 'Content-Type: application/json' \
-d '{"accountId":"acc_12345","filters":{"resultType":null,"timeRange":null,"lineChartType":null,"metricType":null,"startDate":"2024-01-15","endDate":"2024-01-15"}}'

Parameters

No parameters.

Request Body

FieldTypeRequiredDescription
accountIdstringNoLinkedIn account ID to use. If not provided, uses the default account.
filtersobjectNoAnalytics filters

Example

{
  "accountId": "acc_12345",
  "filters": {
    "resultType": null,
    "timeRange": null,
    "lineChartType": null,
    "metricType": null,
    "startDate": "2024-01-15",
    "endDate": "2024-01-15"
  }
}

Responses

StatusDescription
200Creator analytics retrieved successfully
400Bad Request - Invalid filters or missing required fields
401Unauthorized - Invalid or missing API key
500Internal Server Error - Failed to get LinkedIn credentials or analytics

200 Response Parameters

NameTypeDescription
successboolean
accountIdstringLinkedIn account ID used
profileIdstringLinkedIn profile URN
isLineChartbooleanWhether line chart data was requested
filtersobjectFilters applied to the request
dataobjectSimplified analytics data

200 Example

{
  "success": true,
  "accountId": "696ce9e780e0483585e4e553",
  "profileId": "ACoAAATPlQ0Bc8wdg-Iy8wZgEDuSdIVWJiE1Aio",
  "isLineChart": false,
  "filters": {
    "resultType": "ENGAGEMENT",
    "timeRange": "past_7_days"
  },
  "data": {
    "summary": {
      "metrics": [
        {
          "title": "Total followers",
          "value": "12,841",
          "change": 1,
          "changeDescription": "vs. prior 7 days",
          "description": "The total number of people that currently follow you."
        }
      ]
    },
    "chart": {
      "title": "New followers",
      "xValueUnit": "day",
      "yValueUnit": "New followers",
      "points": [
        {
          "date": "Feb 18",
          "value": 9,
          "tooltip": "Wednesday, Feb 18, 2026",
          "change": null
        },
        {
          "date": "Feb 19",
          "value": 16,
          "tooltip": "Thursday, Feb 19, 2026",
          "change": 77.8
        },
        {
          "date": "Feb 20",
          "value": 25,
          "tooltip": "Friday, Feb 20, 2026",
          "change": 56.3
        }
      ]
    }
  }
}

400 Response Parameters

NameTypeDescription
successboolean
errorobject

400 Example

{
  "success": false,
  "error": {
    "issues": [
      {
        "code": "custom",
        "message": "startDate and endDate are required when timeRange is \"custom\"",
        "path": [
          "filters",
          "startDate"
        ]
      }
    ],
    "name": "ZodError"
  }
}

401 Response Parameters

NameTypeDescription
errorstring

401 Example

{
  "error": "Unauthorized - Invalid credentials"
}

500 Response Parameters

NameTypeDescription
errorstring

500 Example

{
  "error": "Failed to get creator analytics",
  "success": false
}