PostNext Analytics API

Performance metrics

GitHub OpenAPI

Operations 10

GET /api/v1/analytics Account activity summary #
GET /api/v1/analytics/overview Performance overview #
GET /api/v1/analytics/posts Per-post performance #
GET /api/v1/analytics/daily Daily activity counts #
GET /api/v1/analytics/audience-growth Audience (follower) growth over time #
GET /api/v1/analytics/engagement-over-time Engagement rate over time #
GET /api/v1/analytics/best-time-to-post Best time to post #
POST /api/v1/analytics/sync Sync analytics from the platforms #
GET /api/v1/analytics/post/{postId} Analytics for a single post #
GET /api/v1/analytics/post/{postId}/daily Daily analytics for a single post #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/postnext-io:postnext-io-analytics-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

postnext-io-analytics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PostNext Public Analytics API
  version: 1.0.0
  description: 'The PostNext public API lets you connect social channels, create, schedule

    and publish posts, manage media, and read analytics programmatically.


    ## Authentication

    Every request must include your API key in the `x-api-key` header. Each

    account has one key: copy it or regenerate it at

    https://postnext.io/account/api-keys. Regenerating it stops the old key

    working straight away.


    ```bash

    curl -H "x-api-key: YOUR_KEY" https://api-app.postnext.io/api/v1/account

    ```


    ## Response shapes

    Responses are JSON. Most endpoints wrap data in `{ "success": true, "data": ... }`,

    but a few return the payload at the top level for historical reasons; each

    operation below documents its exact shape. Errors are generally

    `{ "success": false, "error": { "message": "..." } }`, with a few endpoints

    adding a machine-readable `code` (noted per operation).


    ## Base URL

    All paths are relative to `https://api-app.postnext.io`. Note the mixed

    prefix: the posts, connections and assets resources are served under `/api`,

    while account and analytics are served under `/api/v1`.'
servers:
- url: https://api-app.postnext.io
  description: Production
security:
- ApiKeyAuth: []
tags:
- name: Analytics
  description: Performance metrics
paths:
  /api/v1/analytics:
    get:
      tags:
      - Analytics
      summary: Account activity summary
      description: Counts of posts, ideas and assets created in the last 7 days.
      operationId: getAnalytics
      responses:
        '200':
          description: Summary counts
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/AnalyticsSummary'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /api/v1/analytics/overview:
    get:
      tags:
      - Analytics
      summary: Performance overview
      operationId: getAnalyticsOverview
      parameters:
      - $ref: '#/components/parameters/AnalyticsChannel'
      - $ref: '#/components/parameters/AnalyticsPeriod'
      responses:
        '200':
          description: Aggregated totals over the selected period
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/AnalyticsOverview'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/NotTeamMember'
  /api/v1/analytics/posts:
    get:
      tags:
      - Analytics
      summary: Per-post performance
      operationId: getAnalyticsPosts
      parameters:
      - $ref: '#/components/parameters/AnalyticsChannel'
      - $ref: '#/components/parameters/AnalyticsPeriod'
      - name: sort
        in: query
        schema:
          type: string
          enum:
          - engagement
          - impressions
          - likes
          - recent
          default: engagement
      responses:
        '200':
          description: Per-post metric rows
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/AnalyticsPosts'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/NotTeamMember'
  /api/v1/analytics/daily:
    get:
      tags:
      - Analytics
      summary: Daily activity counts
      description: Per-day counts of posts, ideas and assets over the last N days (max 60).
      operationId: getDailyAnalytics
      parameters:
      - name: days
        in: query
        schema:
          type: integer
          default: 7
          minimum: 1
          maximum: 60
      responses:
        '200':
          description: Daily count series
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/AnalyticsDailyPoint'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /api/v1/analytics/audience-growth:
    get:
      tags:
      - Analytics
      summary: Audience (follower) growth over time
      operationId: getAudienceGrowth
      parameters:
      - $ref: '#/components/parameters/AnalyticsChannel'
      - $ref: '#/components/parameters/AnalyticsPeriod'
      responses:
        '200':
          description: Follower-count time series
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      series:
                        type: array
                        items:
                          $ref: '#/components/schemas/AudienceGrowthPoint'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/NotTeamMember'
  /api/v1/analytics/engagement-over-time:
    get:
      tags:
      - Analytics
      summary: Engagement rate over time
      description: Per-day engagement rate for the period. Requires a paid tier.
      operationId: getEngagementOverTime
      parameters:
      - $ref: '#/components/parameters/AnalyticsChannel'
      - $ref: '#/components/parameters/AnalyticsPeriod'
      responses:
        '200':
          description: Engagement-rate time series
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      series:
                        type: array
                        items:
                          $ref: '#/components/schemas/EngagementPoint'
                      capability:
                        type: string
                        enum:
                        - ok
                        - insights_unavailable
                        - api_tier_limited
                        - no_data_yet
                        - unsupported
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/NotTeamMember'
  /api/v1/analytics/best-time-to-post:
    get:
      tags:
      - Analytics
      summary: Best time to post
      description: 'Recommended posting slots for a platform, derived from your own post

        performance. Requires a paid subscription.'
      operationId: getBestTimeToPost
      parameters:
      - name: platform
        in: query
        required: true
        schema:
          $ref: '#/components/schemas/ProviderName'
      - name: timezone
        in: query
        schema:
          type: string
          default: UTC
        description: IANA timezone for the returned hours.
      - name: topN
        in: query
        schema:
          type: integer
          default: 5
          minimum: 1
          maximum: 24
      responses:
        '200':
          description: Ranked posting-time recommendations
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/BestTimeResult'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /api/v1/analytics/sync:
    post:
      tags:
      - Analytics
      summary: Sync analytics from the platforms
      description: 'Triggers an on-demand refresh of post metrics and follower counts for

        your team, pulling fresh numbers from the connected platforms. Bounded by

        per-platform call caps and rate-limited. Requires a paid tier.'
      operationId: syncAnalytics
      responses:
        '200':
          description: Sync result summary
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      synced:
                        type: boolean
                      summary:
                        type:
                        - object
                        - 'null'
                        properties:
                          teamId:
                            type: string
                          twitterSnapped:
                            type: integer
                          instagramSnapped:
                            type: integer
                          tiktokSnapped:
                            type: integer
                          linkedinSnapped:
                            type: integer
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/NotTeamMember'
  /api/v1/analytics/post/{postId}:
    get:
      tags:
      - Analytics
      summary: Analytics for a single post
      description: Latest stored metrics for one post, one entry per provider it was published to.
      operationId: getPostAnalytics
      parameters:
      - name: postId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Latest per-provider metrics for the post
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      postId:
                        type: string
                      providers:
                        type: array
                        items:
                          $ref: '#/components/schemas/PostMetricsEntry'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/NotTeamMember'
  /api/v1/analytics/post/{postId}/daily:
    get:
      tags:
      - Analytics
      summary: Daily analytics for a single post
      description: Daily snapshot series plus day-over-day deltas per provider.
      operationId: getPostDailyAnalytics
      parameters:
      - name: postId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Daily snapshots and deltas
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      postId:
                        type: string
                      series:
                        type: array
                        items:
                          $ref: '#/components/schemas/PostMetricsEntry'
                      deltas:
                        type: array
                        items:
                          type: object
                          properties:
                            date:
                              type: string
                            provider:
                              type: string
                            delta:
                              type: object
                              additionalProperties:
                                type: number
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/NotTeamMember'
components:
  schemas:
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            message:
              type: string
        code:
          type: string
          description: Present on some endpoints only.
    AnalyticsDailyPoint:
      type: object
      properties:
        date:
          type: string
          example: '2026-07-15'
        posts:
          $ref: '#/components/schemas/AnalyticsCount'
        ideas:
          $ref: '#/components/schemas/AnalyticsCount'
        assets:
          $ref: '#/components/schemas/AnalyticsCount'
    AnalyticsPosts:
      type: object
      properties:
        rows:
          type: array
          items:
            $ref: '#/components/schemas/PostPerformanceRow'
        capability:
          type: string
          enum:
          - ok
          - insights_unavailable
          - api_tier_limited
          - no_data_yet
          - unsupported
    PostPerformanceRow:
      type: object
      properties:
        postId:
          type: string
        provider:
          type: string
        channelName:
          type:
          - string
          - 'null'
        publishedAt:
          type:
          - string
          - 'null'
          format: date-time
        impressions:
          type: integer
        reach:
          type: integer
        likes:
          type: integer
        comments:
          type: integer
        engagementRate:
          type:
          - number
          - 'null'
    AnalyticsCount:
      type: object
      properties:
        teamCount:
          type: integer
        userCount:
          type: integer
    AudienceGrowthPoint:
      type: object
      properties:
        date:
          type: string
        followers:
          type: integer
    PostMetricsEntry:
      type: object
      properties:
        provider:
          type: string
          example: instagram
        date:
          type: string
          example: '2026-07-15'
        snappedAt:
          type: string
          format: date-time
        metrics:
          type: object
          description: Platform-normalized metrics (impressions, reach, likes, comments, shares, saves, views - varies by platform).
          additionalProperties: true
    EngagementPoint:
      type: object
      properties:
        date:
          type: string
        engagementRate:
          type:
          - number
          - 'null'
        numerator:
          type: integer
        denominator:
          type:
          - integer
          - 'null'
    ProviderName:
      type: string
      enum:
      - twitter
      - instagram
      - linkedin
      - threads
      - youtube
      - tiktok
      - bluesky
    BestTimeResult:
      type: object
      properties:
        platform:
          type: string
        timezone:
          type: string
        sampleWindowDays:
          type: integer
        sampleSize:
          type: integer
        metricsAvailable:
          type: boolean
        recommendations:
          type: array
          items:
            type: object
            properties:
              dayOfWeek:
                type: integer
                description: 0=Sun ... 6=Sat
              dayLabel:
                type: string
                example: Tue
              hour:
                type: integer
                description: 0-23, in the requested timezone
              score:
                type: number
              basedOn:
                type: object
                properties:
                  posts:
                    type: integer
                  avgEngagement:
                    type: number
    AnalyticsOverview:
      type: object
      properties:
        totals:
          $ref: '#/components/schemas/AnalyticsTotals'
        coverage:
          type: number
          description: Fraction of posts in the period that have snapshot data.
        dataThrough:
          type:
          - string
          - 'null'
          format: date-time
        vsPrevious:
          type:
          - object
          - 'null'
          allOf:
          - $ref: '#/components/schemas/AnalyticsTotals'
        capability:
          type: string
          enum:
          - ok
          - insights_unavailable
          - api_tier_limited
          - no_data_yet
          - unsupported
    AnalyticsSummary:
      type: object
      properties:
        posts:
          $ref: '#/components/schemas/AnalyticsCount'
        ideas:
          $ref: '#/components/schemas/AnalyticsCount'
        assets:
          $ref: '#/components/schemas/AnalyticsCount'
    AnalyticsTotals:
      type: object
      properties:
        impressions:
          type: integer
        reach:
          type: integer
        likes:
          type: integer
        comments:
          type: integer
        engagementRate:
          type:
          - number
          - 'null'
          description: Fraction (not a percentage).
  responses:
    NotTeamMember:
      description: Caller is not a member of the team
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    AnalyticsChannel:
      name: channel
      in: query
      schema:
        type: string
      description: Channel/provider id to filter by. Omit or "all" for no filter.
    AnalyticsPeriod:
      name: period
      in: query
      schema:
        type: string
        enum:
        - 7d
        - 30d
        - 90d
        - all
        default: 30d
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key