> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Zernio: Get Linkedin Profile Analytics

> Read totals or a daily series for a personal LinkedIn account connected to Zernio: impressions, reach, reactions, comments, shares, saves and sends.

Read totals or a daily series for a personal LinkedIn account connected to Zernio: impressions, reach, reactions, comments, shares, saves and sends.

> [!NOTE]
>
> Tool ID: `zernio_get_linkedin_profile_analytics`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'zernio_get_linkedin_profile_analytics',
  {
    "accountId": "123456789"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline run zernio_get_linkedin_profile_analytics --input '{
  "accountId": "123456789"
}'
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "accountId": "123456789",
    "platform": "example",
    "accountType": "example"
  }
}
```

Use `deepline describe zernio_get_linkedin_profile_analytics --json` for the latest machine-readable contract.

## Input reference

Returns aggregate analytics across all posts for a LinkedIn personal account. Requires r\_member\_postAnalytics scope. Covers every post authored by the member, whether or not it was published through Zernio (LinkedIn aggregates by member, not by post). Org accounts should use /v1/analytics instead. Saves (POST\_SAVE) and sends (POST\_SEND) are available for personal accounts. Organization pages always return 0 for these two metrics because LinkedIn does not expose them on the organization analytics endpoint.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.accountId` | `string` | Yes | — | The ID of the LinkedIn personal account |
| `payload.aggregation` | `"TOTAL" \| "DAILY"` | No | `"TOTAL"` | TOTAL (default, lifetime totals) or DAILY (time series). MEMBERS\_REACHED not available with DAILY. Allowed: `TOTAL`, `DAILY`. |
| `payload.fromDate` | `string` | No | — | Start date (YYYY-MM-DD). If omitted, returns lifetime analytics. Format: `date`. |
| `payload.toDate` | `string` | No | — | End date (YYYY-MM-DD, exclusive). Defaults to today if omitted. Format: `date`. |
| `payload.startDate` | `string` | No | — | Alias of fromDate, kept for existing callers Format: `date`. |
| `payload.endDate` | `string` | No | — | Alias of toDate, kept for existing callers Format: `date`. |
| `payload.metrics` | `string` | No | — | Comma-separated metrics: IMPRESSION, MEMBERS\_REACHED, REACTION, COMMENT, RESHARE, POST\_SAVE, POST\_SEND. Omit for all. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Returns aggregate analytics across all posts for a LinkedIn personal account. Requires r_member_postAnalytics scope. Covers every post authored by the member, whether or not it was published through Zernio (LinkedIn aggregates by member, not by post). Org accounts should use /v1/analytics instead. Saves (POST_SAVE) and sends (POST_SEND) are available for personal accounts. Organization pages always return 0 for these two metrics because LinkedIn does not expose them on the organization analytics endpoint.",
    "properties": {
      "accountId": {
        "type": "string",
        "description": "The ID of the LinkedIn personal account"
      },
      "aggregation": {
        "type": "string",
        "description": "TOTAL (default, lifetime totals) or DAILY (time series). MEMBERS_REACHED not available with DAILY.",
        "default": "TOTAL",
        "enum": [
          "TOTAL",
          "DAILY"
        ]
      },
      "fromDate": {
        "type": "string",
        "description": "Start date (YYYY-MM-DD). If omitted, returns lifetime analytics.",
        "format": "date"
      },
      "toDate": {
        "type": "string",
        "description": "End date (YYYY-MM-DD, exclusive). Defaults to today if omitted.",
        "format": "date"
      },
      "startDate": {
        "type": "string",
        "description": "Alias of fromDate, kept for existing callers",
        "format": "date"
      },
      "endDate": {
        "type": "string",
        "description": "Alias of toDate, kept for existing callers",
        "format": "date"
      },
      "metrics": {
        "type": "string",
        "description": "Comma-separated metrics: IMPRESSION, MEMBERS_REACHED, REACTION, COMMENT, RESHARE, POST_SAVE, POST_SEND. Omit for all."
      }
    },
    "required": [
      "accountId"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.accountId` | `string` | No | — | — |
| `result.data.platform` | `string` | No | — | — |
| `result.data.accountType` | `string` | No | — | — |
| `result.data.username` | `string` | No | — | — |
| `result.data.aggregation` | `"TOTAL"` | No | — | — |
| `result.data.dateRange` | `object \| null` | No | — | — |
| `result.data.dateRange.startDate` | `string` | No | — | — |
| `result.data.dateRange.endDate` | `string` | No | — | — |
| `result.data.analytics` | `object` | No | — | — |
| `result.data.analytics.impressions` | `integer` | No | — | Total impressions across all posts |
| `result.data.analytics.reach` | `integer` | No | — | Unique members reached across all posts |
| `result.data.analytics.reactions` | `integer` | No | — | Total reactions across all posts |
| `result.data.analytics.comments` | `integer` | No | — | Total comments across all posts |
| `result.data.analytics.shares` | `integer` | No | — | Total reshares across all posts |
| `result.data.analytics.saves` | `integer` | No | — | Total times posts were saved (personal accounts only) |
| `result.data.analytics.sends` | `integer` | No | — | Total times posts were sent via LinkedIn messaging (personal accounts only) |
| `result.data.analytics.engagementRate` | `number` | No | — | Overall engagement rate, as a percentage rounded to 2 decimals: (reactions + comments + shares + saves + sends) / impressions \* 100. Clicks are not counted and there is no fallback denominator, so this is 0 whenever impressions is 0. NOT the same formula as PostAnalytics.engagementRate on GET /v1/analytics. |
| `result.data.note` | `string` | No | — | — |
| `result.data.lastUpdated` | `string` | No | — | — |
| `result.data.analytics.impressions[].date` | `string` | No | — | — |
| `result.data.analytics.impressions[].count` | `integer` | No | — | — |
| `result.data.analytics.reactions[].date` | `string` | No | — | — |
| `result.data.analytics.reactions[].count` | `integer` | No | — | — |
| `result.data.analytics.comments[].date` | `string` | No | — | — |
| `result.data.analytics.comments[].count` | `integer` | No | — | — |
| `result.data.analytics.shares[].date` | `string` | No | — | — |
| `result.data.analytics.shares[].count` | `integer` | No | — | — |
| `result.data.analytics.saves[].date` | `string` | No | — | — |
| `result.data.analytics.saves[].count` | `integer` | No | — | — |
| `result.data.analytics.sends[].date` | `string` | No | — | — |
| `result.data.analytics.sends[].count` | `integer` | No | — | — |
| `result.data.skippedMetrics` | `array` | No | — | Metrics that were skipped due to API limitations |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "description": "Provider response payload.",
        "anyOf": [
          {
            "type": "object",
            "description": "Response for TOTAL aggregation (lifetime totals)",
            "properties": {
              "accountId": {
                "type": "string"
              },
              "platform": {
                "type": "string"
              },
              "accountType": {
                "type": "string"
              },
              "username": {
                "type": "string"
              },
              "aggregation": {
                "type": "string",
                "enum": [
                  "TOTAL"
                ]
              },
              "dateRange": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "startDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date"
                  }
                },
                "additionalProperties": false
              },
              "analytics": {
                "type": "object",
                "properties": {
                  "impressions": {
                    "type": "integer",
                    "description": "Total impressions across all posts"
                  },
                  "reach": {
                    "type": "integer",
                    "description": "Unique members reached across all posts"
                  },
                  "reactions": {
                    "type": "integer",
                    "description": "Total reactions across all posts"
                  },
                  "comments": {
                    "type": "integer",
                    "description": "Total comments across all posts"
                  },
                  "shares": {
                    "type": "integer",
                    "description": "Total reshares across all posts"
                  },
                  "saves": {
                    "type": "integer",
                    "description": "Total times posts were saved (personal accounts only)"
                  },
                  "sends": {
                    "type": "integer",
                    "description": "Total times posts were sent via LinkedIn messaging (personal accounts only)"
                  },
                  "engagementRate": {
                    "type": "number",
                    "description": "Overall engagement rate, as a percentage rounded to 2 decimals: (reactions + comments + shares + saves + sends) / impressions * 100. Clicks are not counted and there is no fallback denominator, so this is 0 whenever impressions is 0. NOT the same formula as PostAnalytics.engagementRate on GET /v1/analytics."
                  }
                },
                "additionalProperties": false
              },
              "note": {
                "type": "string"
              },
              "lastUpdated": {
                "type": "string",
                "format": "date-time"
              }
            },
            "additionalProperties": false
          },
          {
            "type": "object",
            "description": "Response for DAILY aggregation (time series breakdown)",
            "properties": {
              "accountId": {
                "type": "string"
              },
              "platform": {
                "type": "string"
              },
              "accountType": {
                "type": "string"
              },
              "username": {
                "type": "string"
              },
              "aggregation": {
                "type": "string",
                "enum": [
                  "DAILY"
                ]
              },
              "dateRange": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "startDate": {
                    "type": "string",
                    "format": "date"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date"
                  }
                },
                "additionalProperties": false
              },
              "analytics": {
                "type": "object",
                "description": "Daily breakdown of each metric as date/count pairs. Reach not available with DAILY aggregation.",
                "properties": {
                  "impressions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "date": {
                          "type": "string",
                          "format": "date"
                        },
                        "count": {
                          "type": "integer"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "reactions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "date": {
                          "type": "string",
                          "format": "date"
                        },
                        "count": {
                          "type": "integer"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "comments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "date": {
                          "type": "string",
                          "format": "date"
                        },
                        "count": {
                          "type": "integer"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "shares": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "date": {
                          "type": "string",
                          "format": "date"
                        },
                        "count": {
                          "type": "integer"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "saves": {
                    "type": "array",
                    "description": "Daily saves (personal accounts only)",
                    "items": {
                      "type": "object",
                      "properties": {
                        "date": {
                          "type": "string",
                          "format": "date"
                        },
                        "count": {
                          "type": "integer"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "sends": {
                    "type": "array",
                    "description": "Daily sends via LinkedIn messaging (personal accounts only)",
                    "items": {
                      "type": "object",
                      "properties": {
                        "date": {
                          "type": "string",
                          "format": "date"
                        },
                        "count": {
                          "type": "integer"
                        }
                      },
                      "additionalProperties": false
                    }
                  }
                },
                "additionalProperties": false
              },
              "skippedMetrics": {
                "type": "array",
                "description": "Metrics that were skipped due to API limitations",
                "items": {
                  "type": "string"
                }
              },
              "note": {
                "type": "string"
              },
              "lastUpdated": {
                "type": "string",
                "format": "date-time"
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Connect integrations](https://deepline.com/docs/integrations.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.