APILinkedIn Analytics
Get weekly engagement data
Retrieve weekly engagement statistics for email reports. Returns comment and reaction counts broken down by day for the past 7 days, along with summary statistics and analytics data. Useful for automated weekly reports.
GET
/engagement/weeklyAuthentication requiredAnalytics
Code Examples
curl -X GET 'https://api.connectsafely.ai/linkedin/engagement/weekly' \ -H 'Authorization: Bearer <your_api_key>'Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
accountId | query | No | string | LinkedIn account ID to use. If not provided, uses the default account. |
Request Body
No request body.
Responses
| Status | Description |
|---|---|
| 200 | Weekly engagement data retrieved successfully |
| 400 | Bad Request - Account does not have profile ID |
| 401 | Unauthorized - Invalid or missing API key |
| 500 | Internal Server Error - Failed to get LinkedIn credentials or engagement data |
200 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
accountId | string | |
profileId | string | |
period | object | |
summary | object | |
dailyBreakdown | array | |
analytics | object | LinkedIn analytics data (followers, engagement metrics) |
accountInfo | object |
200 Example
{
"success": true,
"accountId": "696ce9e780e0483585e4e553",
"profileId": "ACoAAATPlQ0Bc8wdg-Iy8wZgEDuSdIVWJiE1Aio",
"period": {
"startDate": "2026-02-16",
"endDate": "2026-02-23",
"days": 7
},
"summary": {
"totalComments": 250,
"totalReactions": 250,
"totalEngagements": 500,
"avgEngagementsPerDay": 250,
"daysWithActivity": 2,
"mostActiveDay": "2026-02-22"
},
"dailyBreakdown": [
{
"date": "2026-02-16",
"comments": 0,
"reactions": 0,
"total": 0
},
{
"date": "2026-02-17",
"comments": 0,
"reactions": 0,
"total": 0
},
{
"date": "2026-02-21",
"comments": 37,
"reactions": 25,
"total": 62
},
{
"date": "2026-02-22",
"comments": 69,
"reactions": 77,
"total": 146
}
],
"analytics": {
"summary": {
"metrics": [
{
"title": "Total followers",
"value": "12,841",
"change": 0.9
}
]
},
"chart": {
"title": "New followers",
"points": [
{
"date": "Feb 21",
"value": 72
}
]
}
},
"accountInfo": {
"firstName": "John",
"lastName": "Doe",
"publicId": "john-doe"
}
}400 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
400 Example
{
"error": "LinkedIn account does not have a profile ID. Please reconnect your LinkedIn account.",
"success": false
}401 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
401 Example
{
"error": "Unauthorized - Invalid credentials"
}500 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
500 Example
{
"error": "Failed to get weekly engagement data",
"success": false
}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.
Integrations
Connect ConnectSafely with Zapier, Make.com, n8n, HubSpot and MCP servers for LinkedIn automation. Build powerful integrations with no code.
