---
title: "Compare Analytics API"
method: GET
path: "/v1/analytics/compare"
tags: ["Utilities"]
---

# Compare Analytics API

`GET /v1/analytics/compare`

## Request

- Base URL: `https://api.captapi.com`
- URL: `https://api.captapi.com/v1/analytics/compare`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Compare unified metrics across up to 10 URLs — each row is the analytics/post object (1 credit/resolved URL).

Pass up to 10 comma-separated post/video/reel URLs (any mix of the same 11 platforms as Post Analytics) and get count/resolved/failedCount plus results[] and failed[]. Each ok row is exactly the /v1/analytics/post object plus status — platform, id, title, url, publishedAt (full ISO), durationSeconds, thumbnailUrl, author{}, metrics{views, likes, comments, shares, saves, interactions, engagementRate, engagementRateBasis, approximate flags}. A URL that cannot be resolved is status error and also appears in failed[] — never status ok with zero metrics. Bills 1 credit per successfully resolved URL that is not served from the 24h cache shared with post analytics; failed URLs are not billed (including an all-failed batch). No bulk discount vs N separate /post calls — the win is one HTTP round-trip. Pass cache=true for free cache hits.

Docs: https://captapi.com/apis/analytics-compare

## Query parameters

- `urls` string, required
- `cache` boolean

## Response `200`

Success. The data object for this endpoint.

- object
  - `success` unknown, required
  - `data` object, required
    - `count` integer: Number of items in this bucket (e.g. commenters from this country in the sample).
    - `resolved` integer: Resolved. Example: 2.
    - `failedCount` integer: Number of URLs that could not be resolved in this compare batch.
    - `results` object[]
      - `platform` string: Platform identifier for this response (matches the endpoint's platform).
      - `url` string: Canonical URL of the item.
      - `id` string: Id of this results item.
      - `title` string: Title of this results item.
      - `publishedAt` string: Full ISO-8601 UTC with milliseconds (same as analytics/post) — never date-only.
      - `durationSeconds` integer: Length in seconds for this item (full media length, or a segment span when the endpoint documents a start/end).
      - `thumbnailUrl` string: Thumbnail image URL.
      - `author` object: Author name or handle.
        - `username` string
        - `displayName` string
        - `url` string: Canonical URL of the item.
        - `verified` boolean, nullable
      - `metrics` object: Object with views, viewsIsApproximate, likes, comments, commentsIsApproximate, shares.
        - `views` integer
        - `viewsIsApproximate` boolean
        - `likes` integer
        - `comments` integer
        - `commentsIsApproximate` boolean
        - `shares` integer, nullable
        - `saves` integer, nullable
        - `interactions` integer
        - `interactionsIsApproximate` boolean
        - `engagementRate` number
        - `engagementRateBasis` string
      - `status` string: Row status: ok when the URL resolved, error when it failed.
    - `failed` unknown[]: Unresolved URLs as {url, platform, reason}.
      - unknown

## Other responses

- `400`: Bad request: wrong platform URL, unknown endpoint, or an invalid parameter value. Not billed.
- `401`: Missing, invalid or revoked API key. Not billed.
- `402`: Not enough credits for this request. Not billed.
- `404`: The resource does not exist or is not public. Not billed.
- `422`: A required parameter is missing or has the wrong type. Not billed.
- `429`: Rate limit reached. Wait for Retry-After seconds. Not billed.
- `502`: The platform could not be reached or returned nothing usable. Retryable, not billed. 503 and 504 use the same envelope.

---

[API](https://skmtc.dev/captapi/apis/captapi-api.md) · [All operations](https://skmtc.dev/captapi/apis/captapi-api/llms.txt) · [OpenAPI document](https://skmtc.dev/captapi/apis/captapi-api/revisions/c9b9ac5ff1bd?raw)
