Compare Analytics API
Compare unified metrics across up to 10 URLs — each row is the analytics/post object (1 credit/resolved URL).
GET request to /v1/analytics/compare that responds with clean JSON and costs 1 credit/url. Pass cache=true for a free 24h cache hit; default is always fresh. Start with 100 free credits — no credit card.What is the Compare Analytics API?
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}. Failed URLs appear in failed[] with a reason. Bills 1 credit per successfully resolved URL that is not served from the 24h cache shared with post analytics; no bulk discount vs N separate /post calls — the win is one HTTP round-trip. Pass cache=true for free cache hits.
What you get
- Compare Analytics fields as clean structured JSON
- IDs, URLs, and titles where the platform exposes them
- Engagement or popularity signals when available
- Stable IDs for joining with other endpoints
Try it
Fill in the parameters below and copy a ready-to-run request, or open the live Playground to run it against your account (no API key paste).
Parameters
curl "https://api.captapi.com/v1/analytics/compare?urls=https%3A%2F%2Fwww.tiktok.com%2F%40khaby.lame%2Fvideo%2F7646812028874673439%2Chttps%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ" \
-H "Authorization: Bearer capt_live_..."
# or: -H "x-api-key: capt_live_..."Edit the parameters and the code updates instantly. Switch languages and hit copy.
Example response
{
"success": true,
"data": {
"count": 2,
"resolved": 2,
"failedCount": 0,
"results": [
{
"platform": "tiktok",
"url": "https://www.tiktok.com/@khaby.lame/video/7646812028874673439",
"id": "7646812028874673439",
"title": "Thank you, please come again!!!🙋🏿♂️💸#learnfromkhaby #comedy",
"publishedAt": "2026-06-02T14:56:35.000Z",
"durationSeconds": 29,
"thumbnailUrl": "https://p19-common-sign.tiktokcdn-us.com/tos-useast8-p-0068-tx2/oUAHVIiQDac8uC75AEfyALAA1FrTAqEEQ3GRPe~tplv-tiktokx-origin.image?dr=9636&x-expires=1783263600&x-signature=2PlkofS3nAbuOWtQQSaCTJIU0bQ%3D&t=4d5b0474&ps=13740610&shp=81f88b70&shcp=43f4a2f9&idc=useast5",
"author": {
"username": "khaby.lame",
"displayName": "Khabane lame",
"url": "https://www.tiktok.com/@khaby.lame",
"verified": true
},
"metrics": {
"views": 14700000,
"viewsIsApproximate": false,
"likes": 1300000,
"comments": 13600,
"commentsIsApproximate": false,
"shares": 13400,
"saves": 50705,
"interactions": 1377705,
"interactionsIsApproximate": false,
"engagementRate": 0.0937,
"engagementRateBasis": "interactions/views"
},
"status": "ok"
},
{
"platform": "youtube",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"id": "dQw4w9WgXcQ",
"title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
"publishedAt": "2009-10-25T06:57:33.000Z",
"durationSeconds": 213,
"thumbnailUrl": "https://i.ytimg.com/vi_webp/dQw4w9WgXcQ/sddefault.webp",
"author": {
"username": "RickAstleyYT",
"displayName": "Rick Astley",
"url": "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw",
"verified": null
},
"metrics": {
"views": 1799593805,
"viewsIsApproximate": false,
"likes": 19303349,
"comments": 2400000,
"commentsIsApproximate": true,
"shares": null,
"saves": null,
"interactions": 21703349,
"interactionsIsApproximate": true,
"engagementRate": 0.0121,
"engagementRateBasis": "interactions/views"
},
"status": "ok"
}
],
"failed": []
}
}Billing metadata is returned in response headers: X-Captapi-Credits (credits charged), X-Captapi-Cache (hit or miss), and X-Captapi-Source. Failed requests (4xx/5xx) are never charged. See the full list of error codes in the error reference.
Response structure
A successful call returns success, cached, creditsUsed, and a data object with the following fields:
Top-level fields
countNumber of items in this bucket (e.g. commenters from this country in the sample).resolvedResolved. Example: 2.failedCountNumber of URLs that could not be resolved in this compare batch.failedUnresolved URLs as {url, platform, reason}.
Results
Each item in results contains:
platformPlatform identifier for this response (matches the endpoint's platform).urlCanonical URL of the item.idStable platform ID for the item.titleTitle of the item.publishedAtFull ISO-8601 UTC with milliseconds (same as analytics/post) — never date-only.durationSecondsLength in seconds for this item (full media length, or a segment span when the endpoint documents a start/end).thumbnailUrlThumbnail image URL.authorAuthor name or handle.metricsObject with views, viewsIsApproximate, likes, comments, commentsIsApproximate, shares.statusRow status: ok when the URL resolved, error when it failed.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| urls | string | Yes | Comma-separated post/video/reel URLs (up to 10), any mix of the same 11 platforms as Post Analytics. Example: a TikTok URL and a YouTube URL in one call. |
| cache | boolean | No | Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. Envelope includes cached + cachedAt on hits. |
Authentication: send your key as Authorization: Bearer capt_live_.... A typical call costs 1 credit/url. Pass cache=true for a free 24h cache hit; default is always fresh.
How it works
- 1. Sign up — get 100 free credits, no card required.
- 2. Create a key from your dashboard.
- 3. Send one request to
/v1/analytics/compareand parse the JSON response.
Use cases
A/B uploads
Pass two URLs (e.g. TikTok + YouTube) and compare the same metrics{} object side by side.
Partial batches
Use failed[] + status when one URL dies — resolved rows still bill and return full post analytics.
One round-trip
Up to 10 URLs per call; same per-URL credit as Post Analytics, cache shared.
Frequently asked questions
What does the Compare Analytics API do?+
The Compare Analytics API lets you fetch full metadata and key stats from a public Utilities post or video URL using one GET request to /v1/analytics/compare. It returns clean JSON — no OAuth or infrastructure setup required.
How many credits does the Compare Analytics API cost?+
Billing is 1 credit per successfully resolved URL that is not served from cache. Cache hits (cache=true) are free, same as Post Analytics. Failed URLs appear in failed[] and are not billed. There is no bulk discount vs calling /v1/analytics/post once per URL — compare saves HTTP round-trips. A fully failed batch still records a minimal 1-credit charge.
Do I need a Utilities API key or OAuth?+
No. A single Captapi key works across every platform Captapi supports — YouTube, TikTok, Instagram, Facebook, Twitter/X, Reddit, Threads, Bluesky, Pinterest, LinkedIn, Rumble, Spotify, Kwai, and more. We handle proxies, rate limits, retries, and authentication for you.
How is engagementRate calculated?+
On Post Analytics and Compare, engagementRate is always interactions ÷ views (a ratio). Every metrics object includes engagementRateBasis: "interactions/views". TikTok popular-creators uses a different basis (Creative Center percent or avgLikesPerVideo/followers) — do not compare those numbers to post analytics without reading engagementRateBasis.
What do commentsIsApproximate / interactionsIsApproximate mean?+
Some platforms expose compact UI counts (YouTube "2.4M" comments). We still return an integer, but commentsIsApproximate=true means that integer is rounded — interactions and engagementRate inherit the same uncertainty via interactionsIsApproximate. Prefer exact likes when present; do not treat interactions as unit-precise when the flag is true.
Which platforms are supported?+
Eleven: YouTube, TikTok, Instagram, Facebook, X, Reddit, Threads, Bluesky, Pinterest, LinkedIn, and Rumble. That is intentionally not the full Captapi catalog — Kwai, Twitch, Spotify, Snapchat, and others are out of scope for this unified metrics shape.
What happens when some URLs fail?+
Each results[] row has status ok or error and a platform field when detected. Failed URLs also appear in failed[] as {url, platform, reason}. Only successfully resolved URLs are billed (1 credit each; cache hits free).
Is each results[] row the same as Post Analytics?+
Yes — the same mapper and schema (platform, id, title, url, publishedAt, durationSeconds, thumbnailUrl, author{}, metrics{}), plus status. publishedAt is full ISO with milliseconds on both endpoints.
Is the Compare Analytics API suitable for production use?+
Yes. It is a stable REST endpoint with predictable JSON and automatic retries. Pass cache=true to serve from the 24h cache (0 credits on hit); default is always fresh. Hits include cached + cachedAt. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. Use it for analytics, monitoring, and content automation.
More Utilities APIs
Ready to use the Compare Analytics API?
Sign up, grab your key, and make your first call in 60 seconds.