> ## 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.

# List social account post analytics

> Returns the organization's social account posts published in a range of
UTC days, each with its latest stored metrics. Posts are ordered by
`sortBy`, highest first, or newest first when `sortBy` is omitted.

Metrics are lifetime totals since publishing, as of
`metricsCollectedAt`. They are collected about once a day, and reading
them does not refresh them.

What `views` counts by platform:
- `INSTAGRAM`, `FACEBOOK`, `THREADS`: times the post was shown, repeats included.
- `TIKTOK`, `YOUTUBE`: video plays.
- `PINTEREST`: video views. Image Pins have none.
- `LINKEDIN_PAGES` reports `impressions` and `uniqueImpressions` instead.




## OpenAPI

````yaml /openapi.yaml get /social-account-posts/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-account-posts/analytics:
    get:
      tags:
        - Posts
      summary: List social account post analytics
      description: >
        Returns the organization's social account posts published in a range of

        UTC days, each with its latest stored metrics. Posts are ordered by

        `sortBy`, highest first, or newest first when `sortBy` is omitted.


        Metrics are lifetime totals since publishing, as of

        `metricsCollectedAt`. They are collected about once a day, and reading

        them does not refresh them.


        What `views` counts by platform:

        - `INSTAGRAM`, `FACEBOOK`, `THREADS`: times the post was shown, repeats
        included.

        - `TIKTOK`, `YOUTUBE`: video plays.

        - `PINTEREST`: video views. Image Pins have none.

        - `LINKEDIN_PAGES` reports `impressions` and `uniqueImpressions`
        instead.
      operationId: listSocialAccountPostAnalytics
      parameters:
        - name: startDate
          in: query
          required: true
          schema:
            type: string
            format: date
          description: First UTC day of the publish range, inclusive.
        - name: endDate
          in: query
          required: true
          schema:
            type: string
            format: date
          description: >-
            Last UTC day of the publish range, inclusive. The range can span at
            most 366 days.
        - name: sortBy
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/PostMetricName'
          description: >-
            Metric to order the posts by, highest first. Posts without it come
            last.
        - $ref: '#/components/parameters/ProjectIdsFilter'
        - $ref: '#/components/parameters/SocialAccountIdsFilter'
        - $ref: '#/components/parameters/SocialPlatformFilter'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Cursor'
      responses:
        '200':
          description: Social account post analytics.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSocialAccountPostAnalyticsResponse'
        '400':
          description: Invalid date range or cursor.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ListSocialAccountPostAnalyticsErrorResponse
        '429':
          $ref: '#/components/responses/TooManyConcurrentRequests'
      security:
        - ApiKey: []
components:
  schemas:
    PostMetricName:
      type: string
      enum:
        - views
        - impressions
        - uniqueImpressions
        - likes
        - reactions
        - comments
        - shares
        - saves
        - clicks
        - engagementRate
      description: Name of a `PostMetrics` field.
    ListSocialAccountPostAnalyticsResponse:
      type: object
      additionalProperties: false
      required:
        - socialAccountPosts
      properties:
        socialAccountPosts:
          type: array
          items:
            $ref: '#/components/schemas/SocialAccountPostAnalytics'
        nextCursor:
          type: string
          description: >-
            Opaque cursor for the next page of results. Omitted when there are
            no more results.
    ListSocialAccountPostAnalyticsErrorResponse:
      type: object
      additionalProperties: false
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/ListSocialAccountPostAnalyticsErrorCode'
        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.
    SocialAccountPostAnalytics:
      type: object
      additionalProperties: false
      required:
        - socialAccountPostId
        - postId
        - socialAccountId
        - platform
        - deliveryCompletedAt
        - metrics
      properties:
        socialAccountPostId:
          type: string
          description: Social account post identifier.
        postId:
          type: string
          description: Parent post identifier.
        socialAccountId:
          type: string
          description: Connected social account identifier.
        platform:
          $ref: '#/components/schemas/SocialPlatform'
        deliveryCompletedAt:
          type: string
          format: date-time
          description: UTC time when the post was published.
        externalPostUrl:
          type: string
          format: uri
        text:
          type: string
          description: >-
            First 200 characters of the post's text. Omitted when the post has
            no text.
        metrics:
          $ref: '#/components/schemas/PostMetrics'
        metricsCollectedAt:
          type: string
          format: date-time
          description: >-
            Oldest UTC collection time among `metrics`, so every value is at
            least this fresh. Omitted when `metrics` is empty.
    ListSocialAccountPostAnalyticsErrorCode:
      type: string
      enum:
        - INVALID_DATE_RANGE
        - INVALID_CURSOR
    ConcurrencyLimitErrorResponse:
      type: object
      additionalProperties: false
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/ConcurrencyLimitErrorCode'
        message:
          type: string
    PostMetrics:
      type: object
      additionalProperties: false
      description: |
        Latest stored lifetime totals of a social account post. A metric is
        omitted when the platform does not report it or nothing has been
        collected yet. Zero is a recorded value, not missing data.
      properties:
        views:
          type: number
          format: double
        impressions:
          type: number
          format: double
        uniqueImpressions:
          type: number
          format: double
        likes:
          type: number
          format: double
        reactions:
          type: number
          format: double
        comments:
          type: number
          format: double
        shares:
          type: number
          format: double
        saves:
          type: number
          format: double
        clicks:
          type: number
          format: double
        engagementRate:
          type: number
          format: double
          description: >-
            LinkedIn Pages provider-reported engagement ratio; 0.03 means 3
            percent.
    ConcurrencyLimitErrorCode:
      type: string
      enum:
        - TOO_MANY_CONCURRENT_REQUESTS
  parameters:
    ProjectIdsFilter:
      name: projectId
      in: query
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          type: string
      description: >-
        Only return items in these projects. Use project `id`s from List
        projects.
    SocialAccountIdsFilter:
      name: socialAccountId
      in: query
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          type: string
      description: >-
        Only return items for these social accounts. Use social account `id`s
        from List social accounts.
    SocialPlatformFilter:
      name: platform
      in: query
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/SocialPlatform'
      description: Only return items on these social platforms.
    Limit:
      name: limit
      in: query
      required: false
      schema:
        type: integer
        format: int32
        minimum: 1
        maximum: 100
        default: 50
      description: Number of items to return.
    Cursor:
      name: cursor
      in: query
      required: false
      schema:
        type: string
      description: Opaque cursor for the next page of results.
  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.