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

# Get social account analytics

> Returns account-level metrics of one social account over a range of UTC
days: its follower count and the views, engagements and other activity
across all of its content. Per-post metrics are in each social account
post's `metrics`.

Each point covers one UTC day. Metrics are collected about once a day,
so the latest day or two may be missing. Reading analytics does not
refresh them.

Metrics by platform:
- `FACEBOOK`: followers, views, engagements.
- `INSTAGRAM`: followers, views, engagements, likes, comments, shares, saves.
- `LINKEDIN_PAGES`: followers, impressions, engagements, likes, comments, shares, clicks.
- `PINTEREST`: followers, impressions, engagements, saves, clicks, views (video views).
- `YOUTUBE`: followers (subscribers), views, likes, comments, shares.
- Other platforms have no account analytics and return empty `metrics`.




## OpenAPI

````yaml /openapi.yaml get /social-accounts/{socialAccountId}/analytics
openapi: 3.1.0
info:
  title: WoopSocial API
  version: 1.0.0
  summary: API for WoopSocial integrations.
  description: >
    This is the public-facing OpenAPI contract for WoopSocial. It supports
    scheduling posts for various social media platforms such as Bluesky,
    Facebook, Instagram, LinkedIn, LinkedIn Pages, Pinterest, Threads, TikTok, X
    (formerly Twitter) and YouTube.
servers:
  - url: https://api.woopsocial.com/v1
    description: WoopSocial API URL.
  - url: http://localhost:9123/api/external/v1
    description: Local WoopSocial API URL.
security: []
tags:
  - name: Posts
    description: Post scheduling endpoints.
  - name: Projects
    description: Project discovery endpoints.
  - name: Social Accounts
    description: Connected social account discovery endpoints.
  - name: Media
    description: Media upload endpoints.
  - name: Webhooks
    description: Webhook endpoint management.
  - name: Feedback
    description: Send product feedback to the WoopSocial team.
  - name: Health
    description: Basic connectivity endpoints.
  - name: Me
    description: The WoopSocial user a connection acts as.
paths:
  /social-accounts/{socialAccountId}/analytics:
    get:
      tags:
        - Social Accounts
      summary: Get social account analytics
      description: >
        Returns account-level metrics of one social account over a range of UTC

        days: its follower count and the views, engagements and other activity

        across all of its content. Per-post metrics are in each social account

        post's `metrics`.


        Each point covers one UTC day. Metrics are collected about once a day,

        so the latest day or two may be missing. Reading analytics does not

        refresh them.


        Metrics by platform:

        - `FACEBOOK`: followers, views, engagements.

        - `INSTAGRAM`: followers, views, engagements, likes, comments, shares,
        saves.

        - `LINKEDIN_PAGES`: followers, impressions, engagements, likes,
        comments, shares, clicks.

        - `PINTEREST`: followers, impressions, engagements, saves, clicks, views
        (video views).

        - `YOUTUBE`: followers (subscribers), views, likes, comments, shares.

        - Other platforms have no account analytics and return empty `metrics`.
      operationId: getSocialAccountAnalytics
      parameters:
        - $ref: '#/components/parameters/SocialAccountId'
        - name: startDate
          in: query
          required: true
          schema:
            type: string
            format: date
          description: First UTC day of the range, inclusive.
        - name: endDate
          in: query
          required: true
          schema:
            type: string
            format: date
          description: >-
            Last UTC day of the range, inclusive. The range can span at most 366
            days.
      responses:
        '200':
          description: Social account analytics.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SocialAccountAnalytics'
        '400':
          description: Invalid date range.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSocialAccountAnalyticsErrorResponse'
        '404':
          description: Social account not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSocialAccountAnalyticsErrorResponse'
        '429':
          $ref: '#/components/responses/TooManyConcurrentRequests'
      security:
        - ApiKey: []
components:
  parameters:
    SocialAccountId:
      name: socialAccountId
      in: path
      required: true
      schema:
        type: string
      description: The `id` of a social account from List social accounts.
  schemas:
    SocialAccountAnalytics:
      type: object
      additionalProperties: false
      required:
        - socialAccountId
        - platform
        - metrics
      properties:
        socialAccountId:
          type: string
          description: Connected social account identifier.
        platform:
          $ref: '#/components/schemas/SocialPlatform'
        metrics:
          $ref: '#/components/schemas/SocialAccountAnalyticsMetrics'
    GetSocialAccountAnalyticsErrorResponse:
      type: object
      additionalProperties: false
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/GetSocialAccountAnalyticsErrorCode'
        message:
          type: string
    SocialPlatform:
      type: string
      enum:
        - PINTEREST
        - LINKEDIN
        - LINKEDIN_PAGES
        - INSTAGRAM
        - FACEBOOK
        - THREADS
        - TIKTOK
        - X
        - YOUTUBE
        - BLUESKY
        - WOOPTEST
      description: |
        Identifies which social media platform this data structure targets.
    SocialAccountAnalyticsMetrics:
      type: object
      additionalProperties: false
      description: |
        Account metrics over the range. A metric the platform does not report
        is omitted. A metric with empty `points` is reported by the platform
        but has nothing collected in the range yet. A period without a point
        has nothing collected; zero is a recorded value, not missing data.
      properties:
        followers:
          $ref: '#/components/schemas/AccountFollowersMetric'
        impressions:
          $ref: '#/components/schemas/AccountActivityMetric'
        views:
          $ref: '#/components/schemas/AccountActivityMetric'
        engagements:
          $ref: '#/components/schemas/AccountActivityMetric'
        likes:
          $ref: '#/components/schemas/AccountActivityMetric'
        comments:
          $ref: '#/components/schemas/AccountActivityMetric'
        shares:
          $ref: '#/components/schemas/AccountActivityMetric'
        saves:
          $ref: '#/components/schemas/AccountActivityMetric'
        clicks:
          $ref: '#/components/schemas/AccountActivityMetric'
    GetSocialAccountAnalyticsErrorCode:
      type: string
      enum:
        - SOCIAL_ACCOUNT_NOT_FOUND
        - INVALID_DATE_RANGE
    ConcurrencyLimitErrorResponse:
      type: object
      additionalProperties: false
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/ConcurrencyLimitErrorCode'
        message:
          type: string
    AccountFollowersMetric:
      type: object
      additionalProperties: false
      description: >-
        Follower count. Each point holds the count on the last collected day of
        its period.
      required:
        - points
      properties:
        latest:
          type: number
          format: double
          description: Latest follower count in the range. Omitted when `points` is empty.
        change:
          type: number
          format: double
          description: >-
            Latest minus earliest follower count in the range. Omitted when
            `points` is empty.
        points:
          $ref: '#/components/schemas/AccountAnalyticsPoints'
    AccountActivityMetric:
      type: object
      additionalProperties: false
      description: >-
        Activity across the account. Each point adds up the collected days of
        its period.
      required:
        - points
      properties:
        total:
          type: number
          format: double
          description: >-
            Sum over the collected days of the range. Omitted when `points` is
            empty.
        points:
          $ref: '#/components/schemas/AccountAnalyticsPoints'
    ConcurrencyLimitErrorCode:
      type: string
      enum:
        - TOO_MANY_CONCURRENT_REQUESTS
    AccountAnalyticsPoints:
      type: array
      description: Points ordered oldest first.
      items:
        $ref: '#/components/schemas/AccountAnalyticsPoint'
    AccountAnalyticsPoint:
      type: object
      additionalProperties: false
      required:
        - date
        - value
      properties:
        date:
          type: string
          format: date
          description: >-
            First UTC day of the period the point covers. Each point currently
            covers one day.
        value:
          type: number
          format: double
  responses:
    TooManyConcurrentRequests:
      description: Too many requests are already in progress for this API key.
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying.
          required: true
          schema:
            type: integer
            format: int32
            minimum: 1
            example: 1
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ConcurrencyLimitErrorResponse'
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: API key

````

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