Core

Analytics

Unified analytics for posts

Returns analytics for posts. If postId is provided, returns analytics for a single post. Otherwise returns a paginated list of posts with overview stats.

Important: Understanding Post IDs

This endpoint uses two types of posts:

  • Late Posts - Posts scheduled/created via the Late API (e.g., via POST /v1/posts)
  • External Posts - Posts synced from social platforms for analytics tracking

When you schedule a post via Late and it gets published, both records exist:

  1. The original Late Post (returned when you created the post)
  2. An External Post (created when we sync analytics from the platform)

List endpoint behavior:

  • Returns External Post IDs (_id field)
  • Use the isExternal field to identify post origin:
    • isExternal: true - Synced from platform (may have been originally scheduled via Late)
    • isExternal: false - Late-scheduled post (shown when querying by Late post ID)

Single post behavior (postId parameter):

  • Accepts both Late Post IDs and External Post IDs
  • If you pass a Late Post ID, the API automatically resolves it to the corresponding External Post analytics
  • Both return the same analytics data for the same underlying social media post

Correlating posts: Use platformPostUrl (e.g., https://www.instagram.com/reel/ABC123/) as the unique identifier - it's consistent across both Late and External post records.

Note: For follower count history and growth metrics, use the dedicated /v1/accounts/follower-stats endpoint.

LinkedIn Analytics:

  • Personal Accounts: Per-post analytics available for posts published through Late. External posts cannot be synced due to LinkedIn API restrictions.
  • Organization Accounts: Full analytics support including external post syncing.

Rate Limit: 150 requests per hour per user. Note: The rate limit only applies to refresh operations (pulling fresh data from platforms). Reading cached analytics data does not count against the rate limit. Rate limit headers are included in responses:

  • X-RateLimit-Limit: Maximum requests allowed
  • X-RateLimit-Remaining: Requests remaining in current window
  • X-RateLimit-Reset: ISO timestamp when the limit resets
GET
/v1/analytics
AuthorizationBearer <token>

API key authentication - use your Late API key as a Bearer token

In: header

Query Parameters

postId?string

Returns analytics for a single post. Accepts both Late Post IDs (from POST /v1/posts) and External Post IDs (from this endpoint's list response). The API automatically resolves Late Post IDs to their corresponding External Post analytics.

platform?string

Filter by platform (default "all")

profileId?string

Filter by profile ID (default "all")

fromDate?string

Inclusive lower bound

Formatdate
toDate?string

Inclusive upper bound

Formatdate
limit?integer

Page size (default 50)

Default50
Range1 <= value <= 100
page?integer

Page number (default 1)

Default1
Range1 <= value
sortBy?string

Sort by date or engagement

Default"date"
Value in"date" | "engagement"
order?string

Sort order

Default"desc"
Value in"asc" | "desc"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://getlate.dev/api/v1/analytics"

{
  "postId": "65f1c0a9e2b5af0012ab34cd",
  "status": "published",
  "content": "Check out our new product launch!",
  "scheduledFor": "2024-11-01T10:00:00Z",
  "publishedAt": "2024-11-01T10:00:05Z",
  "analytics": {
    "impressions": 15420,
    "reach": 12350,
    "likes": 342,
    "comments": 28,
    "shares": 45,
    "clicks": 189,
    "views": 0,
    "engagementRate": 2.78,
    "lastUpdated": "2024-11-02T08:30:00Z"
  },
  "platformAnalytics": [
    {
      "platform": "twitter",
      "status": "published",
      "accountId": "64e1f0a9e2b5af0012ab34cd",
      "accountUsername": "@acmecorp",
      "analytics": {
        "impressions": 15420,
        "reach": 12350,
        "likes": 342,
        "comments": 28,
        "shares": 45,
        "clicks": 189,
        "views": 0,
        "engagementRate": 2.78,
        "lastUpdated": "2024-11-02T08:30:00Z"
      }
    }
  ],
  "platform": "twitter",
  "platformPostUrl": "https://twitter.com/acmecorp/status/123456789",
  "isExternal": false
}

{
  "error": "Unauthorized"
}
{
  "error": "Analytics add-on required",
  "code": "analytics_addon_required"
}
{
  "error": "Not found"
}
{
  "error": "Rate limit exceeded",
  "message": "Analytics endpoint allows 150 requests per hour. Please try again later.",
  "resetTime": "2025-10-29T19:24:33.707Z"
}
{
  "error": "string",
  "details": {}
}

Get follower stats and growth metrics

Returns follower count history and growth metrics for connected social accounts. Requires analytics add-on subscription.

GET
/v1/accounts/follower-stats
AuthorizationBearer <token>

API key authentication - use your Late API key as a Bearer token

In: header

Query Parameters

accountIds?string

Comma-separated list of account IDs (optional, defaults to all user's accounts)

profileId?string

Filter by profile ID

fromDate?string

Start date in YYYY-MM-DD format (defaults to 30 days ago)

Formatdate
toDate?string

End date in YYYY-MM-DD format (defaults to today)

Formatdate
granularity?string

Data aggregation level

Default"daily"
Value in"daily" | "weekly" | "monthly"

Response Body

application/json

application/json

application/json

curl -X GET "https://getlate.dev/api/v1/accounts/follower-stats"
{
  "accounts": [
    {
      "_id": "64e1...",
      "platform": "twitter",
      "username": "@acme",
      "currentFollowers": 1250,
      "growth": 50,
      "growthPercentage": 4.17,
      "dataPoints": 30
    }
  ],
  "stats": {
    "64e1...": [
      {
        "date": "2024-01-01",
        "followers": 1200
      },
      {
        "date": "2024-01-02",
        "followers": 1250
      }
    ]
  },
  "dateRange": {
    "from": "2024-01-01T00:00:00.000Z",
    "to": "2024-01-31T23:59:59.999Z"
  },
  "granularity": "daily"
}
{
  "error": "Unauthorized"
}
{
  "error": "Analytics add-on required",
  "message": "Follower stats tracking requires the Analytics add-on. Please upgrade to access this feature.",
  "requiresAddon": true
}

Get aggregate analytics for a LinkedIn personal account

Returns aggregate analytics across ALL posts for a LinkedIn personal account. Uses LinkedIn's memberCreatorPostAnalytics API with q=me finder.

Important: This endpoint only works for LinkedIn personal accounts. Organization accounts should use the standard /v1/analytics endpoint for per-post analytics.

Required Scope: r_member_postAnalytics

If the connected account doesn't have this scope, you'll receive a 403 error with instructions to reconnect.

Aggregation Options:

  • TOTAL (default): Returns lifetime totals for all metrics
  • DAILY: Returns daily breakdown of metrics over time

Available Metrics:

  • IMPRESSION: Number of times posts were displayed
  • MEMBERS_REACHED: Unique members who saw posts (NOT available with DAILY aggregation)
  • REACTION: Total reactions (likes, celebrates, etc.)
  • COMMENT: Total comments
  • RESHARE: Total reshares/reposts

Date Range Filtering: Use startDate and endDate parameters to filter analytics to a specific time period. If omitted, returns lifetime analytics.

LinkedIn API Limitation: The combination of MEMBERS_REACHED + DAILY aggregation is not supported by LinkedIn's API.

GET
/v1/accounts/{accountId}/linkedin-aggregate-analytics
AuthorizationBearer <token>

API key authentication - use your Late API key as a Bearer token

In: header

Path Parameters

accountIdstring

The ID of the LinkedIn personal account

Query Parameters

aggregation?string

Type of aggregation for the analytics data.

  • TOTAL (default): Returns single totals for each metric
  • DAILY: Returns daily breakdown of metrics

Note: MEMBERS_REACHED metric is not available with DAILY aggregation.

Default"TOTAL"
Value in"TOTAL" | "DAILY"
startDate?string

Start date for analytics data in YYYY-MM-DD format. If provided without endDate, endDate defaults to today. If omitted entirely, returns lifetime analytics.

Formatdate
endDate?string

End date for analytics data in YYYY-MM-DD format (exclusive). If provided without startDate, startDate defaults to 30 days before endDate.

Formatdate
metrics?string

Comma-separated list of metrics to fetch. If omitted, fetches all available metrics. Valid values: IMPRESSION, MEMBERS_REACHED, REACTION, COMMENT, RESHARE

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://getlate.dev/api/v1/accounts/string/linkedin-aggregate-analytics?startDate=2024-01-01&endDate=2024-01-31&metrics=IMPRESSION%2CREACTION%2CCOMMENT"

{
  "accountId": "64abc123def456",
  "platform": "linkedin",
  "accountType": "personal",
  "username": "John Doe",
  "aggregation": "TOTAL",
  "dateRange": null,
  "analytics": {
    "impressions": 1250000,
    "reach": 450000,
    "reactions": 7500,
    "comments": 2500,
    "shares": 1200,
    "engagementRate": 0.9
  },
  "note": "Aggregate analytics across all posts on this LinkedIn personal account (lifetime totals).",
  "lastUpdated": "2025-01-15T10:30:00.000Z"
}

{
  "error": "This endpoint only supports LinkedIn accounts",
  "code": "invalid_platform"
}

{
  "error": "Unauthorized"
}
{
  "error": "string",
  "code": "string"
}
{
  "error": "Missing r_member_postAnalytics scope. Please reconnect your LinkedIn account to grant analytics permissions.",
  "code": "missing_scope",
  "requiredScope": "r_member_postAnalytics",
  "action": "reconnect"
}
Empty

Get analytics for a specific LinkedIn post by URN

Returns analytics for a specific LinkedIn post using its URN. Works for both personal and organization accounts.

This is useful for fetching analytics of posts that weren't published through Late, as long as you have the post URN.

For Personal Accounts:

  • Uses memberCreatorPostAnalytics API + memberCreatorVideoAnalytics for video posts
  • Requires r_member_postAnalytics scope
  • Available metrics: impressions, reach, likes, comments, shares, video views (video posts only)
  • Clicks are NOT available for personal accounts

For Organization Accounts:

  • Uses organizationalEntityShareStatistics API + videoAnalytics for video posts
  • Requires r_organization_social scope
  • Available metrics: impressions, reach, clicks, likes, comments, shares, video views (video posts only), engagement rate
GET
/v1/accounts/{accountId}/linkedin-post-analytics
AuthorizationBearer <token>

API key authentication - use your Late API key as a Bearer token

In: header

Path Parameters

accountIdstring

The ID of the LinkedIn account

Query Parameters

urnstring

The LinkedIn post URN

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://getlate.dev/api/v1/accounts/string/linkedin-post-analytics?urn=urn%3Ali%3Ashare%3A7123456789012345678"
{
  "accountId": "64abc123def456",
  "platform": "linkedin",
  "accountType": "personal",
  "username": "John Doe",
  "postUrn": "urn:li:share:7123456789012345678",
  "analytics": {
    "impressions": 5420,
    "reach": 3200,
    "likes": 156,
    "comments": 23,
    "shares": 12,
    "clicks": 0,
    "views": 1250,
    "engagementRate": 5.17
  },
  "lastUpdated": "2025-01-15T10:30:00.000Z"
}

{
  "error": "Missing required parameter: urn",
  "code": "missing_urn",
  "example": "urn:li:share:7123456789012345678 or urn:li:ugcPost:7123456789012345678"
}

{
  "error": "Unauthorized"
}
Empty
{
  "error": "string",
  "code": "missing_scope",
  "requiredScope": "string",
  "action": "reconnect"
}

{
  "error": "Account not found"
}