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

# Analytics summary

> Views, likes, comments, shares and saves for your published posts over the last 7 to 90 days, in total, per platform, per day and per post.

Totals for posts published in the last `days` days (default 30, 7 to 90), counted per account a post went to, plus a per-platform breakdown, a daily series and one entry per published post.

Metrics are polled from the platforms less often as a post ages: every 6 hours for its first 48 hours, then daily up to 7 days, every 3 days up to 30 days, and weekly up to 90 days. X posts are polled for 30 days. Call [Refresh analytics](https://tryunsora.com/docs/api-reference/analytics/refresh.md) for fresh figures.

```bash theme={null}
curl "https://mvp.tryunsora.com/api/v1/posts/analytics/summary?days=30" \
  -H "Authorization: Bearer uns_YOUR_API_KEY"
```


## OpenAPI

````yaml GET /posts/analytics/summary
openapi: 3.1.0
info:
  title: Unsora API
  version: 1.4.0
  description: >-
    Public API for Unsora integrations. Authenticate with an Unsora API key
    (`uns_…`, created under Developers → API keys in the app) as a Bearer token
    in the Authorization header. Limit: 60 requests per minute per key; over it,
    429 with code RATE_LIMIT_EXCEEDED.
servers:
  - url: https://mvp.tryunsora.com/api/v1
    description: Production
  - url: /api/v1
    description: This server
security: []
tags:
  - name: User
  - name: Models
    description: >-
      Every video, image and motion-control model, with each model's inputs
      taken from the provider's own request schema and prices quoted live. One
      generate endpoint covers all of them.
  - name: Video
  - name: Image
  - name: Influencer
  - name: Thumbnail
  - name: Clipping
  - name: Music
  - name: Voiceover
  - name: Upscaler
  - name: Subtitle removal
  - name: Motion control
  - name: Avatar
  - name: Movie materials
  - name: Voice clones
  - name: Voice changer
  - name: Uploads
  - name: Scheduler
paths:
  /posts/analytics/summary:
    get:
      tags:
        - Scheduler
      summary: Get post analytics summary
      description: >-
        Aggregates engagement metrics for posts published in the last `days`
        days, counted per account. Each post contributes its latest stored
        metrics snapshot. Snapshots are polled less often as a post ages: every
        6 hours for its first 48 hours, then daily up to 7 days, every 3 days up
        to 30 days, and weekly up to 90 days. X posts are polled every 12 hours,
        then every 2 days, then weekly, and stop at 30 days. Use POST
        /posts/analytics/refresh for fresh figures.
      parameters:
        - name: days
          in: query
          description: Window in days. Values outside 7–90 are clamped.
          schema:
            type: integer
            default: 30
            minimum: 7
            maximum: 90
      responses:
        '200':
          description: Analytics summary
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsSummaryResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    AnalyticsSummaryResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: object
          properties:
            days:
              type: integer
              description: Window used, after clamping.
            totals:
              $ref: '#/components/schemas/PostMetrics'
            postCount:
              type: integer
              description: Number of per-account posts published in the window.
            byPlatform:
              type: array
              items:
                type: object
                properties:
                  platform:
                    type: string
                  posts:
                    type: integer
                  views:
                    type: integer
                  likes:
                    type: integer
                  comments:
                    type: integer
                  shares:
                    type: integer
                  saves:
                    type: integer
                required:
                  - platform
                  - posts
                  - views
                  - likes
                  - comments
                  - shares
                  - saves
            timeseries:
              type: array
              description: >-
                One point per day from the start of the window to today. Each
                point sums every post's latest snapshot taken before the end of
                that day, so values are totals to date, not daily increments.
              items:
                type: object
                properties:
                  date:
                    type: string
                    format: date
                    description: YYYY-MM-DD.
                  views:
                    type: integer
                  likes:
                    type: integer
                  comments:
                    type: integer
                  shares:
                    type: integer
                required:
                  - date
                  - views
                  - likes
                  - comments
                  - shares
            posts:
              type: array
              description: One entry per account a post was published to, newest first.
              items:
                type: object
                properties:
                  postAccountId:
                    type: string
                  postId:
                    type: string
                    description: The post, for GET /posts/{id}.
                  platform:
                    type: string
                    description: Account provider. YouTube is google.
                  accountUsername:
                    anyOf:
                      - type: string
                      - type: 'null'
                  profilePicture:
                    anyOf:
                      - type: string
                      - type: 'null'
                  caption:
                    type: string
                    description: The account's customCaption, or the post caption.
                  postType:
                    type: string
                    enum:
                      - VIDEO
                      - IMAGE
                      - CAROUSEL
                      - TEXT
                  publishedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: 'null'
                  publishedUrl:
                    anyOf:
                      - type: string
                      - type: 'null'
                  metrics:
                    $ref: '#/components/schemas/PostMetrics'
                  lastFetchedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: 'null'
                    description: >-
                      Time of the latest snapshot. Null when metrics have not
                      been fetched yet; metrics are then 0.
                required:
                  - postAccountId
                  - platform
                  - caption
                  - postType
                  - metrics
                  - lastFetchedAt
          required:
            - days
            - totals
            - postCount
            - byPlatform
            - timeseries
            - posts
      required:
        - success
        - data
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
        error:
          type: string
        code:
          type: string
        message:
          type: string
      required:
        - error
    PostMetrics:
      type: object
      description: >-
        Cumulative counters. Metrics a platform does not expose are 0 (e.g.
        Bluesky views, TikTok saves, YouTube shares and saves). Facebook and
        LinkedIn likes count every reaction type. Pinterest views are
        impressions and shares are outbound clicks. X shares are reposts plus
        quotes and saves are bookmarks. Google Business Profile reports search
        views only.
      properties:
        views:
          type: integer
        likes:
          type: integer
        comments:
          type: integer
        shares:
          type: integer
        saves:
          type: integer
      required:
        - views
        - likes
        - comments
        - shares
        - saves
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Unsora API key (`uns_…`). A Clerk session token also works.

````

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