> ## 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 Page Analytics

> Read LinkedIn company page analytics from Zernio: page views, clicks, reactions, engagement rate and follower gains. The connected member must be a page.

Read LinkedIn company page analytics from Zernio: page views, clicks, reactions, engagement rate and follower gains.

> [!NOTE]
>
> Tool ID: `zernio_get_linkedin_page_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_page_analytics',
  {
    "accountId": "123456789"
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline run zernio_get_linkedin_page_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": {
    "success": true,
    "accountId": "123456789",
    "platform": "facebook"
  }
}
```

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

## Input reference

Returns aggregate analytics for a LinkedIn organization page. Parallel to /v1/accounts/\{id}/linkedin-aggregate-analytics (which handles personal accounts only). Backed by LinkedIn's organizationalEntityShareStatistics, organizationalEntityFollowerStatistics, and organizationPageStatistics endpoints. Response shape matches /v1/analytics/instagram/account-insights. Max 365 days, fromDate no older than 365 days ago, defaults to last 30 days. Scope requirements: r\_organization\_social, r\_organization\_followers, and r\_organization\_admin must all be present on the account. Accounts connected before these scopes were included in the OAuth flow will return 412 with a reauth hint. Enforced by this endpoint: - Page-view metrics accept only metricType=total\_value (LinkedIn omits per-day segmentation even when the API is called with DAY granularity, so a time-series response would be meaningless). - See the live schema below for the complete notes.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.accountId` | `string` | Yes | — | The Zernio SocialAccount ID for the LinkedIn organization account. |
| `payload.metrics` | `string` | No | — | Comma-separated list. Defaults to "impressions,clicks,engagement\_rate,organic\_followers\_gained,followers\_gained,followers\_lost". Share statistics (support both total\_value and time\_series): - impressions - unique\_impressions - clicks - likes - comments - shares - engagement\_rate (0..1, LinkedIn-computed) Follower-gain statistics (support total\_value and time\_series): - organic\_followers\_gained (per-day organic gains for time\_series. sum of organic gains over the range for total\_value) - See the live schema for the complete constraint. |
| `payload.fromDate` | `string` | No | — | Start date (YYYY-MM-DD). Defaults to 30 days ago. Format: `date`. |
| `payload.toDate` | `string` | No | — | End date (YYYY-MM-DD). Defaults to today. Format: `date`. |
| `payload.since` | `string` | No | — | Alias of fromDate, kept for existing callers Format: `date`. |
| `payload.until` | `string` | No | — | Alias of toDate, kept for existing callers Format: `date`. |
| `payload.metricType` | `"time_series" \| "total_value"` | No | `"total_value"` | Allowed: `time_series`, `total_value`. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Returns aggregate analytics for a LinkedIn organization page. Parallel to /v1/accounts/{id}/linkedin-aggregate-analytics (which handles personal accounts only). Backed by LinkedIn's organizationalEntityShareStatistics, organizationalEntityFollowerStatistics, and organizationPageStatistics endpoints. Response shape matches /v1/analytics/instagram/account-insights. Max 365 days, fromDate no older than 365 days ago, defaults to last 30 days. Scope requirements: r_organization_social, r_organization_followers, and r_organization_admin must all be present on the account. Accounts connected before these scopes were included in the OAuth flow will return 412 with a reauth hint. Enforced by this endpoint: - Page-view metrics accept only metricType=total_value (LinkedIn omits per-day segmentation even when the API is called with DAY granularity, so a time-series response would be meaningless). - Date range capped at 365 days, starting no more than 365 days ago. LinkedIn keeps about 13 months of follower stats, and they end 2 days before today.",
    "properties": {
      "accountId": {
        "type": "string",
        "description": "The Zernio SocialAccount ID for the LinkedIn organization account."
      },
      "metrics": {
        "type": "string",
        "description": "Comma-separated list. Defaults to \"impressions,clicks,engagement_rate,organic_followers_gained,followers_gained,followers_lost\". Share statistics (support both total_value and time_series): - impressions - unique_impressions - clicks - likes - comments - shares - engagement_rate (0..1, LinkedIn-computed) Follower-gain statistics (support total_value and time_series): - organic_followers_gained (per-day organic gains for time_series; sum of organic gains over the range for total_value) - paid_followers_gained (per-day paid gains for time_series; sum of paid gains over the range for total_value) Page-view statistics (total_value ONLY - LinkedIn platform limit): - page_views_total - page_views_overview - page_views_careers - page_views_jobs - page_views_life Zernio-synthesized from daily follower snapshots: - followers_gained - followers_lost"
      },
      "fromDate": {
        "type": "string",
        "description": "Start date (YYYY-MM-DD). Defaults to 30 days ago.",
        "format": "date"
      },
      "toDate": {
        "type": "string",
        "description": "End date (YYYY-MM-DD). Defaults to today.",
        "format": "date"
      },
      "since": {
        "type": "string",
        "description": "Alias of fromDate, kept for existing callers",
        "format": "date"
      },
      "until": {
        "type": "string",
        "description": "Alias of toDate, kept for existing callers",
        "format": "date"
      },
      "metricType": {
        "type": "string",
        "default": "total_value",
        "enum": [
          "time_series",
          "total_value"
        ]
      }
    },
    "required": [
      "accountId"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Shared account-insights response envelope used by every platform-level analytics endpoint (/v1/analytics/\{facebook\|instagram\|youtube\|linkedin\|tiktok\|pinterest}/\*). The name is historical - the shape was first shipped for Instagram and every new platform endpoint reuses it for response-shape consistency. The platform field echoes back which platform served the response. |
| `result.data.success` | `boolean` | No | — | — |
| `result.data.accountId` | `string` | No | — | The Zernio SocialAccount ID |
| `result.data.platform` | `"facebook" \| "instagram" \| "youtube" \| "linkedin" \| "tiktok" \| "pinterest"` | No | — | Platform that served this response. Allowed: `facebook`, `instagram`, `youtube`, `linkedin`, `tiktok`, `pinterest`. |
| `result.data.dateRange` | `object` | No | — | — |
| `result.data.dateRange.since` | `string` | No | — | Format: `date`. |
| `result.data.dateRange.until` | `string` | No | — | Format: `date`. |
| `result.data.metricType` | `"time_series" \| "total_value"` | No | — | Allowed: `time_series`, `total_value`. |
| `result.data.breakdown` | `string` | No | — | Breakdown dimension used (only present when breakdown was requested) |
| `result.data.metrics` | `record` | No | — | Object keyed by metric name. - For time\_series: each metric has "total" (number) and "values" (array of \{date, value}). - For total\_value: each metric has "total" (number) and optionally "breakdowns" (array of \{dimension, value}). **Monetary metrics** also carry "unit" and "currency". Zernio never rescales money: "total" and every "values\[].value" are the platform's raw numbers in the stated unit. Monetary metrics keep "values" even on metricType=total\_value, because their "total" is the sum of See the live schema for the complete constraint. |
| `result.data.unavailableMetrics` | `array` | No | — | Requested metrics that could not be served. Present only when at least one metric is unavailable, absent otherwise. Each listed metric is OMITTED from "metrics" rather than reported as 0, which is how an unavailable metric is distinguished from a genuine zero. The request itself still succeeds with HTTP 200. |
| `result.data.unavailableMetrics[].metric` | `string` | No | — | The requested metric name. |
| `result.data.unavailableMetrics[].reason` | `"not_enrolled" \| "permission_missing" \| "unsupported_metric" \| "no_data" \| "unreadable_value" \| "mixed_currency" \| "upstream_error"` | No | — | Why the metric is unavailable: - "not\_enrolled": the account is not enrolled in the program behind this metric. - "permission\_missing": the connected user lacks access to this metric. - "unsupported\_metric": the platform does not accept this metric name on the API version Zernio uses. - "no\_data": the platform returned no bucket for this metric over the requested range. - "unreadable\_value": the platform returned a value shape Zernio cannot read, so no total is reported. - "mixed\_currency": See the live schema for the complete constraint. |
| `result.data.unavailableMetrics[].message` | `string` | No | — | Platform-provided explanation when available (access tokens redacted), otherwise Zernio copy. |
| `result.data.dataDelay` | `string` | No | — | — |
| `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": {
        "type": "object",
        "description": "Shared account-insights response envelope used by every platform-level analytics endpoint (/v1/analytics/{facebook|instagram|youtube|linkedin|tiktok|pinterest}/*). The name is historical - the shape was first shipped for Instagram and every new platform endpoint reuses it for response-shape consistency. The platform field echoes back which platform served the response.",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "accountId": {
            "type": "string",
            "description": "The Zernio SocialAccount ID"
          },
          "platform": {
            "type": "string",
            "description": "Platform that served this response.",
            "enum": [
              "facebook",
              "instagram",
              "youtube",
              "linkedin",
              "tiktok",
              "pinterest"
            ]
          },
          "dateRange": {
            "type": "object",
            "properties": {
              "since": {
                "type": "string",
                "format": "date"
              },
              "until": {
                "type": "string",
                "format": "date"
              }
            },
            "additionalProperties": false
          },
          "metricType": {
            "type": "string",
            "enum": [
              "time_series",
              "total_value"
            ]
          },
          "breakdown": {
            "type": "string",
            "description": "Breakdown dimension used (only present when breakdown was requested)"
          },
          "metrics": {
            "type": "object",
            "description": "Object keyed by metric name. - For time_series: each metric has \"total\" (number) and \"values\" (array of {date, value}). - For total_value: each metric has \"total\" (number) and optionally \"breakdowns\" (array of {dimension, value}). **Monetary metrics** also carry \"unit\" and \"currency\". Zernio never rescales money: \"total\" and every \"values[].value\" are the platform's raw numbers in the stated unit. Monetary metrics keep \"values\" even on metricType=total_value, because their \"total\" is the sum of the daily buckets the platform returned over the range. Keep the series to reconcile that sum against the platform's own reporting before invoicing on it. A metric that could not be served is absent from this object and listed in \"unavailableMetrics\" instead, so an unavailable metric is never reported as a zero.",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "total": {
                  "type": "number",
                  "description": "Sum or aggregate value for the metric"
                },
                "values": {
                  "type": "array",
                  "description": "Daily values (for time_series, and always on monetary metrics)",
                  "items": {
                    "type": "object",
                    "properties": {
                      "date": {
                        "type": "string",
                        "format": "date"
                      },
                      "value": {
                        "type": "number"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "breakdowns": {
                  "type": "array",
                  "description": "Breakdown values (only for total_value with breakdown)",
                  "items": {
                    "type": "object",
                    "properties": {
                      "dimension": {
                        "type": "string"
                      },
                      "value": {
                        "type": "number"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "unit": {
                  "type": "string",
                  "description": "Present on monetary metrics only. The scale of \"total\" and of every \"values[].value\", exactly as the platform returned them. - \"micro_amount\": the platform returned an object carrying a micro amount; values are that integer, summed, unconverted. Zernio publishes no divisor because Meta documents none: divide by the scale you verified against the Page's own Meta Business Suite export. On Facebook Page insights this is always content_monetization_earnings. - \"unspecified\": the platform returned a bare number with no unit metadata, passed through as-is; the platform does not state whether it is major or minor currency units. On Facebook Page insights this is always monetization_approximate_earnings.",
                  "enum": [
                    "micro_amount",
                    "unspecified"
                  ]
                },
                "currency": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ISO 4217 currency of a monetary metric, or null when the platform omitted it. Always null on monetization_approximate_earnings, which Meta returns as a bare number with no currency; always present on content_monetization_earnings."
                }
              },
              "additionalProperties": false
            }
          },
          "unavailableMetrics": {
            "type": "array",
            "description": "Requested metrics that could not be served. Present only when at least one metric is unavailable, absent otherwise. Each listed metric is OMITTED from \"metrics\" rather than reported as 0, which is how an unavailable metric is distinguished from a genuine zero. The request itself still succeeds with HTTP 200.",
            "items": {
              "type": "object",
              "properties": {
                "metric": {
                  "type": "string",
                  "description": "The requested metric name."
                },
                "reason": {
                  "type": "string",
                  "description": "Why the metric is unavailable: - \"not_enrolled\": the account is not enrolled in the program behind this metric. - \"permission_missing\": the connected user lacks access to this metric. - \"unsupported_metric\": the platform does not accept this metric name on the API version Zernio uses. - \"no_data\": the platform returned no bucket for this metric over the requested range. - \"unreadable_value\": the platform returned a value shape Zernio cannot read, so no total is reported. - \"mixed_currency\": readable values disagree on currency or unit within the range. - \"upstream_error\": any other platform failure. \"no_data\" is the common case in practice. The others are defensive: \"not_enrolled\" and \"unsupported_metric\" in particular have not been observed on live Facebook traffic, since a non-enrolled Page returns zeros rather than an error and metric names are validated before any platform call.",
                  "enum": [
                    "not_enrolled",
                    "permission_missing",
                    "unsupported_metric",
                    "no_data",
                    "unreadable_value",
                    "mixed_currency",
                    "upstream_error"
                  ]
                },
                "message": {
                  "type": "string",
                  "description": "Platform-provided explanation when available (access tokens redacted), otherwise Zernio copy."
                }
              },
              "additionalProperties": false
            }
          },
          "dataDelay": {
            "type": "string"
          }
        },
        "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.