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

# Get an account's analytics

> Get one account's followers, the totals of its posts and each copy's numbers.

> [!NOTE]
>
> Needs `analytics:read`. See [Permissions](/docs/essentials/authentication.md#permissions).

Gives the account's latest follower count, the totals of its published posts, and in `platform_posts` a row per copy, newest first. Without dates every copy is listed, unpublished ones with `analytics: null` (not on Free: see below). With dates, or with `published_only=1`, only published copies are. `published_only` takes `1` or `0`, not `true` or `false`.

A Google Business Profile location also has `google_business`: its own daily numbers from Google (views on Maps and Search, calls, directions, website clicks and more) for the dates, or the last 28 days without dates.

On Free (the workspace owner's plan), the dates are limited to the workspace's last 7 days, in its time zone, and the answer has `range_limited`. The dates are then always set, so on the free plan `platform_posts` has only copies published in those days, with no scheduled or failed rows. A Free location's Google numbers aren't read, so `google_business` is empty unless they were read before. See [Plan limits](/docs/plan-limits.md#analytics-on-free).

## Errors

| Status | `error` | When | Retry? |
| - | - | - | - |
| 401 | | No API key, or not a valid one. | No: fix the key. |
| 403 | | The key lacks `analytics:read`, or its user is inactive. | No: grant it in Settings → API. |
| 404 | | No account with that id in the workspaces the key can reach. | No. |
| 422 | | A date isn't `Y-m-d`, `end_date` is before `start_date`, or `published_only` isn't `0` or `1`. | No: fix the request. |
| 429 | | More than 60 requests a minute. | Yes, after `Retry-After` seconds. |

## Related

* [Get a workspace's analytics](/docs/api-reference/analytics/workspace.md): every account's followers at once.
* [Read analytics](/docs/guides/analytics.md#google-business-profile-locations): what a location's numbers mean.


## OpenAPI

````yaml GET /analytics/accounts/{account}
openapi: 3.0.3
info:
  title: PostSyncer API
  description: >-
    Post to 12 social networks from your code: posts, media, comments,
    analytics, webhooks and more.
  version: 1.0.0
servers:
  - url: https://postsyncer.com/api/v1
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: The workspaces the key can reach.
  - name: Accounts
    description: Connected social accounts, links to connect more, and disconnecting them.
  - name: Posts
    description: Drafts, scheduled and published posts, approvals and a post's history.
  - name: Post settings
    description: A post's auto-plug, comment moderation and contact collection.
  - name: Media
    description: >-
      The media library: file uploads, URL imports, and reading videos and
      social posts' files.
  - name: Folders
    description: Folders that organise the media library.
  - name: Comments
    description: >-
      Comments on your posts: reading, replying, editing, hiding, deleting and
      syncing them.
  - name: Reviews
    description: Google Business Profile reviews and your replies to them.
  - name: Analytics
    description: Workspace, account and post performance.
  - name: Brand
    description: >-
      A workspace's brand: identity, voice, look, accounts, competitors,
      learnings and rules.
  - name: Labels
    description: Labels used to tag posts.
  - name: Campaigns
    description: Campaigns used to group posts.
  - name: Snippets
    description: Saved snippets and hashtag groups to drop into posts.
  - name: Webhooks
    description: Signed webhook endpoints that get your notification events.
  - name: Billing
    description: >-
      The owner's plan, invoices and the links that pay for, change or cancel
      it.
  - name: Team
    description: A workspace's teammates and invitations, and their roles.
  - name: Notifications
    description: >-
      Your bell and notification settings, and the workspace's Slack, Discord
      and Telegram channels.
  - name: Blog-to-social
    description: Blog feeds that turn a workspace's new articles into posts.
  - name: Products
    description: Products the workspace's posts can promote.
  - name: Contacts
    description: People who commented on the workspace's posts, and the lists they are on.
  - name: Profile
    description: 'The key''s user: their name and sign-in email.'
  - name: API keys
    description: 'Your API keys: listing and deleting them.'
  - name: Agent sign-up
    description: >-
      An AI agent signs a person up with a code emailed to them, and gets their
      first key. No key needed.
paths:
  /analytics/accounts/{account}:
    get:
      tags:
        - Analytics
      summary: Get an account's analytics
      description: >-
        Needs `analytics:read`. One account's latest follower count, the totals
        of its published posts, and a row for each of its copies, newest first.
        Without dates every copy is listed, unpublished ones with `analytics:
        null`; with dates or `published_only=1`, only published copies. The
        numbers are each post's totals as last read from its network, not what
        changed between the dates: the dates pick which posts count, by the day
        each was published. A Google Business Profile location also has
        `google_business`: its own daily numbers from Google for the dates (the
        last 28 days without dates). On Free (the workspace owner's plan), the
        dates are limited to the workspace's last 7 days (today and the 6 days
        before, in its time zone): only the asked days inside them count, the
        last 7 days when no dates are sent, and none when every asked day is
        older. The answer has `range_limited`. The dates are then always set, so
        on the free plan the list has only copies published in those days, with
        no scheduled or failed rows; and a Free location's Google numbers aren't
        read, so `google_business` is empty unless they were read before.
      operationId: getAccountAnalytics
      parameters:
        - name: account
          in: path
          required: true
          description: The account's id.
          schema:
            type: integer
        - name: start_date
          in: query
          required: false
          description: >-
            Only posts published on this day or later (`Y-m-d`, in the
            workspace's time zone). Leave both dates out for lifetime numbers
            over every post (on the free plan, only the last 7 days; see
            `range_limited`).
          schema:
            type: string
            format: date
            example: '2030-03-01'
        - name: end_date
          in: query
          required: false
          description: >-
            Only posts published on this day or earlier. It must not be before
            `start_date`.
          schema:
            type: string
            format: date
            example: '2030-03-31'
        - name: published_only
          in: query
          required: false
          description: >-
            `1` lists only published copies, without dates too. Send `1` or `0`:
            `true` and `false` are refused with `422`.
          schema:
            type: integer
            enum:
              - 0
              - 1
            default: 0
      responses:
        '200':
          description: The account's followers, totals and copies.
          content:
            application/json:
              schema:
                type: object
                required:
                  - account_id
                  - followers
                  - followers_synced_at
                  - total
                  - platform_posts
                properties:
                  account_id:
                    type: integer
                  followers:
                    type: integer
                    nullable: true
                    description: The latest follower count read; null when none was read.
                  followers_synced_at:
                    type: string
                    format: date-time
                    nullable: true
                    description: When it was read, ISO 8601.
                  total:
                    $ref: '#/components/schemas/AnalyticsTotals'
                  platform_posts:
                    type: array
                    description: Newest first.
                    items:
                      $ref: '#/components/schemas/AnalyticsAccountPlatformPostRow'
                  range_limited:
                    $ref: '#/components/schemas/AnalyticsRangeLimited'
                  google_business:
                    type: object
                    allOf:
                      - $ref: '#/components/schemas/GoogleBusinessMetrics'
                    description: >-
                      Google Business Profile locations only. On the free plan
                      location stats are not read, so this block is empty (null
                      totals, no days) unless numbers were read before the plan
                      changed.
              examples:
                default:
                  summary: An Instagram account
                  value:
                    account_id: 301
                    followers: 4210
                    followers_synced_at: '2030-03-16T06:00:00+00:00'
                    total:
                      comments: 12
                      likes: 248
                      shares: 9
                      impressions: 3120
                      quotes: 0
                      saves: 31
                      views: 0
                      reach: 2870
                      clicks: 0
                      profile_visits: 44
                      engagement_rate: 9.62
                    platform_posts:
                      - platform_post_id: 7815
                        post_id: 4195
                        platform: instagram
                        status: PENDING
                        post_url: null
                        analytics: null
                      - platform_post_id: 7801
                        post_id: 4182
                        platform: instagram
                        status: PUBLISHED
                        post_url: https://www.instagram.com/p/DHk2mQ7sLtA/
                        analytics:
                          comments: 12
                          likes: 248
                          shares: 9
                          impressions: 3120
                          quotes: null
                          saves: 31
                          views: null
                          reach: 2870
                          clicks: null
                          profile_visits: 44
                          engagement_rate: 9.62
                          pending: false
                          synced_at: '2030-03-16T09:00:00+00:00'
                google_business:
                  summary: A Google Business Profile location, two days
                  value:
                    account_id: 304
                    followers: null
                    followers_synced_at: null
                    total:
                      comments: 0
                      likes: 0
                      shares: 0
                      impressions: 0
                      quotes: 0
                      saves: 0
                      views: 0
                      reach: 0
                      clicks: 0
                      profile_visits: 0
                      engagement_rate: null
                    platform_posts: []
                    google_business:
                      totals:
                        impressions_desktop_maps: 75
                        impressions_desktop_search: 175
                        impressions_mobile_maps: 400
                        impressions_mobile_search: 640
                        direction_requests: 33
                        call_clicks: 10
                        website_clicks: 41
                        messaging_clicks: null
                        bookings: null
                        food_menu_clicks: 7
                        search_views: 815
                        maps_views: 475
                      days:
                        - day: '2030-03-13'
                          impressions_desktop_maps: 40
                          impressions_desktop_search: 85
                          impressions_mobile_maps: 210
                          impressions_mobile_search: 330
                          direction_requests: 18
                          call_clicks: 6
                          website_clicks: 22
                          messaging_clicks: null
                          bookings: null
                          food_menu_clicks: 4
                          search_views: 415
                          maps_views: 250
                        - day: '2030-03-14'
                          impressions_desktop_maps: 35
                          impressions_desktop_search: 90
                          impressions_mobile_maps: 190
                          impressions_mobile_search: 310
                          direction_requests: 15
                          call_clicks: 4
                          website_clicks: 19
                          messaging_clicks: null
                          bookings: null
                          food_menu_clicks: 3
                          search_views: 400
                          maps_views: 225
                free:
                  summary: 'On Free: the last 7 days'
                  value:
                    account_id: 301
                    followers: 4210
                    followers_synced_at: '2030-03-16T06:00:00+00:00'
                    total:
                      comments: 12
                      likes: 248
                      shares: 9
                      impressions: 3120
                      quotes: 0
                      saves: 31
                      views: 0
                      reach: 2870
                      clicks: 0
                      profile_visits: 44
                      engagement_rate: 9.62
                    platform_posts:
                      - platform_post_id: 7801
                        post_id: 4182
                        platform: instagram
                        status: PUBLISHED
                        post_url: https://www.instagram.com/p/DHk2mQ7sLtA/
                        analytics:
                          comments: 12
                          likes: 248
                          shares: 9
                          impressions: 3120
                          quotes: null
                          saves: 31
                          views: null
                          reach: 2870
                          clicks: null
                          profile_visits: 44
                          engagement_rate: 9.62
                          pending: false
                          synced_at: '2030-03-16T09:00:00+00:00'
                    range_limited:
                      days: 7
                      reason: free_plan
        '401':
          $ref: '#/components/responses/Unauthorized401'
        '403':
          description: The key lacks `analytics:read`, or its user is inactive.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missing_permission:
                  summary: The key lacks analytics:read
                  value:
                    message: >-
                      This API key does not have the "analytics:read"
                      permission. Edit the key in PostSyncer under Settings →
                      API to grant it.
                inactive_account:
                  summary: The key's user is inactive
                  value:
                    message: Your account is inactive.
        '404':
          $ref: '#/components/responses/NotFound404'
        '422':
          description: >-
            A date isn't `Y-m-d`, `end_date` is before `start_date`, or
            `published_only` isn't `0` or `1`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
              examples:
                start_date:
                  summary: Not Y-m-d
                  value:
                    message: The start date field must match the format Y-m-d.
                    errors:
                      start_date:
                        - The start date field must match the format Y-m-d.
                end_before_start:
                  summary: end_date before start_date
                  value:
                    message: The end date must be on or after the start date.
                    errors:
                      end_date:
                        - The end date must be on or after the start date.
                published_only:
                  summary: published_only=true
                  value:
                    message: The published only field must be true or false.
                    errors:
                      published_only:
                        - The published only field must be true or false.
        '429':
          $ref: '#/components/responses/RateLimited429'
components:
  schemas:
    AnalyticsTotals:
      type: object
      description: >-
        Totals of the published copies counted: each counter summed over the
        copies whose network reports it (0 when none does).
      required:
        - comments
        - likes
        - shares
        - impressions
        - quotes
        - saves
        - views
        - reach
        - clicks
        - profile_visits
        - engagement_rate
      properties:
        comments:
          type: integer
          description: Comments and replies.
        likes:
          type: integer
          description: Likes and reactions.
        shares:
          type: integer
          description: Shares plus reposts (retweets, boosts).
        impressions:
          type: integer
          description: >-
            Views of the post: its impressions or views, as the app shows them
            under Views. Engagement rate divides by this.
        quotes:
          type: integer
          description: Quote posts.
        saves:
          type: integer
          description: Saves and bookmarks.
        views:
          type: integer
          description: Video views, where the network counts them apart from `impressions`.
        reach:
          type: integer
          description: Accounts reached, where the network reports it.
        clicks:
          type: integer
          description: Link or pin clicks.
        profile_visits:
          type: integer
          description: Profile visits from the post.
        engagement_rate:
          type: number
          format: float
          nullable: true
          description: >-
            A percent with 2 decimals (5.23 means 5.23%): (likes + comments +
            shares + quotes + saves + clicks) ÷ impressions × 100. Worked out
            from the summed numbers of the copies that have impressions, never
            an average of their rates. Null when no copy has impressions.
    AnalyticsAccountPlatformPostRow:
      type: object
      description: One copy of a post on this account.
      required:
        - platform_post_id
        - post_id
        - platform
        - status
        - post_url
        - analytics
      properties:
        platform_post_id:
          type: integer
          description: The copy's id (`platforms[].id` on the post).
        post_id:
          type: integer
        platform:
          type: string
          description: The network, like `instagram`.
        status:
          type: string
          enum:
            - PENDING
            - IN_PROGRESS
            - PUBLISHED
            - FAILED
          description: The copy's status.
        post_url:
          type: string
          nullable: true
          description: The post on the network, once published.
        analytics:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/AnalyticsCopy'
          description: The numbers; null on a copy that is not published.
    AnalyticsRangeLimited:
      type: object
      description: >-
        Only when the workspace's owner is on Free: the numbers cover the posts
        published in its last 7 days (today and the 6 days before, in the
        workspace's time zone). Asked dates inside those days are kept and the
        rest left out; without dates it is these 7 days instead of every post.
      required:
        - days
        - reason
      properties:
        days:
          type: integer
          enum:
            - 7
        reason:
          type: string
          enum:
            - free_plan
    GoogleBusinessMetrics:
      type: object
      description: >-
        A Google Business Profile location's own numbers from Google, by day. A
        number is null when Google reported none of its days. Google sends them
        a few days late.
      required:
        - totals
        - days
      properties:
        totals:
          type: object
          required:
            - impressions_desktop_maps
            - impressions_desktop_search
            - impressions_mobile_maps
            - impressions_mobile_search
            - direction_requests
            - call_clicks
            - website_clicks
            - messaging_clicks
            - bookings
            - food_menu_clicks
            - search_views
            - maps_views
          properties:
            impressions_desktop_maps:
              type: integer
              nullable: true
              description: Views on Google Maps on a computer.
            impressions_desktop_search:
              type: integer
              nullable: true
              description: Views in Google Search on a computer.
            impressions_mobile_maps:
              type: integer
              nullable: true
              description: Views on Google Maps on a phone.
            impressions_mobile_search:
              type: integer
              nullable: true
              description: Views in Google Search on a phone.
            direction_requests:
              type: integer
              nullable: true
              description: Requests for directions.
            call_clicks:
              type: integer
              nullable: true
              description: Taps on the call button.
            website_clicks:
              type: integer
              nullable: true
              description: Clicks to the website.
            messaging_clicks:
              type: integer
              nullable: true
              description: Taps on the message button.
            bookings:
              type: integer
              nullable: true
              description: Bookings made.
            food_menu_clicks:
              type: integer
              nullable: true
              description: Clicks on the food menu.
            search_views:
              type: integer
              nullable: true
              description: 'Search views: desktop plus phone.'
            maps_views:
              type: integer
              nullable: true
              description: 'Maps views: desktop plus phone.'
        days:
          type: array
          description: One row per day Google reported, oldest first.
          items:
            type: object
            required:
              - day
              - impressions_desktop_maps
              - impressions_desktop_search
              - impressions_mobile_maps
              - impressions_mobile_search
              - direction_requests
              - call_clicks
              - website_clicks
              - messaging_clicks
              - bookings
              - food_menu_clicks
              - search_views
              - maps_views
            properties:
              day:
                type: string
                format: date
                description: '`Y-m-d`.'
              impressions_desktop_maps:
                type: integer
                nullable: true
                description: Views on Google Maps on a computer.
              impressions_desktop_search:
                type: integer
                nullable: true
                description: Views in Google Search on a computer.
              impressions_mobile_maps:
                type: integer
                nullable: true
                description: Views on Google Maps on a phone.
              impressions_mobile_search:
                type: integer
                nullable: true
                description: Views in Google Search on a phone.
              direction_requests:
                type: integer
                nullable: true
                description: Requests for directions.
              call_clicks:
                type: integer
                nullable: true
                description: Taps on the call button.
              website_clicks:
                type: integer
                nullable: true
                description: Clicks to the website.
              messaging_clicks:
                type: integer
                nullable: true
                description: Taps on the message button.
              bookings:
                type: integer
                nullable: true
                description: Bookings made.
              food_menu_clicks:
                type: integer
                nullable: true
                description: Clicks on the food menu.
              search_views:
                type: integer
                nullable: true
                description: 'Search views: desktop plus phone.'
              maps_views:
                type: integer
                nullable: true
                description: 'Maps views: desktop plus phone.'
    Error:
      type: object
      description: >-
        An error answer. Every one has `message`, in plain words; some add an
        `error` code and fields of their own.
      required:
        - message
      properties:
        message:
          type: string
          description: What went wrong and what to do about it.
        error:
          type: string
          description: >-
            A code a few errors add, such as `rate_limited`. See [Handle
            errors](/essentials/error-handling#answers-with-an-error-code).
    ValidationError:
      type: object
      description: '422: the request didn''t pass validation, and nothing changed.'
      required:
        - message
        - errors
      properties:
        message:
          type: string
          description: >-
            The first error and, when there are more, how many: `(and 1 more
            error)`, `(and 2 more errors)`.
        errors:
          type: object
          description: >-
            The messages, by field. A field inside a list is named with dots:
            `accounts.0.id`.
          additionalProperties:
            type: array
            items:
              type: string
    AnalyticsCopy:
      type: object
      description: >-
        One published copy's numbers, as last read from its network. A counter
        the network doesn't report for this kind of post is null, not 0 (for
        example impressions on Bluesky and Mastodon, reach on TikTok).
      required:
        - comments
        - likes
        - shares
        - impressions
        - quotes
        - saves
        - views
        - reach
        - clicks
        - profile_visits
        - engagement_rate
        - pending
        - synced_at
      properties:
        comments:
          type: integer
          nullable: true
          description: Comments and replies.
        likes:
          type: integer
          nullable: true
          description: Likes and reactions.
        shares:
          type: integer
          nullable: true
          description: Shares plus reposts (retweets, boosts).
        impressions:
          type: integer
          nullable: true
          description: >-
            Views of the post: its impressions or views, as the app shows them
            under Views. Engagement rate divides by this.
        quotes:
          type: integer
          nullable: true
          description: Quote posts.
        saves:
          type: integer
          nullable: true
          description: Saves and bookmarks.
        views:
          type: integer
          nullable: true
          description: Video views, where the network counts them apart from `impressions`.
        reach:
          type: integer
          nullable: true
          description: Accounts reached, where the network reports it.
        clicks:
          type: integer
          nullable: true
          description: Link or pin clicks.
        profile_visits:
          type: integer
          nullable: true
          description: Profile visits from the post.
        engagement_rate:
          type: number
          format: float
          nullable: true
          description: >-
            A percent with 2 decimals (5.23 means 5.23%): (likes + comments +
            shares + quotes + saves + clicks) ÷ impressions × 100. Null without
            impressions.
        pending:
          type: boolean
          description: >-
            True until the copy's numbers were read from the network once; its
            counters are 0 until then.
        synced_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            When the numbers were last read, ISO 8601; null before the first
            read.
  responses:
    Unauthorized401:
      description: No API key, or not a valid one.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            unauthenticated:
              summary: No valid API key
              value:
                message: Unauthenticated.
    NotFound404:
      description: Nothing with that id in the workspaces the key can reach.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            not_found:
              summary: Not found
              value:
                message: Not found.
    RateLimited429:
      description: >-
        More than 60 requests in a minute from this key's user (the API and the
        MCP server share the count). Wait `Retry-After` seconds.
      headers:
        Retry-After:
          description: Seconds until requests are allowed again.
          schema:
            type: integer
        X-RateLimit-Limit:
          description: Requests allowed a minute.
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: Requests left this minute.
          schema:
            type: integer
        X-RateLimit-Reset:
          description: When requests are allowed again, as a Unix timestamp.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            too_many_attempts:
              summary: Too many requests
              value:
                message: Too Many Attempts.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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