
- Create a workspace key at app.caelario.com/connect and send it as X-API-Key (or a Bearer token) to https://api.caelario.com. Every call is scoped to that workspace's credits, jobs and results.
- Use POST /v1/extract for one target up to 50 results, POST /v1/jobs for anything larger, POST /v1/batches for up to 100 targets and POST /v1/schedules to repeat a request daily, weekly or monthly.
- Every platform returns the same field names: like_count, comment_count, share_count, view_count, published_at, content_url. Fields a platform doesn't show come back as null, never as zero.
- Each operation has a published price per delivered result. You reserve the maximum, pay for what's delivered, and pay nothing for empty or failed requests.
- The insights endpoints return the same snapshots, comparisons and brand dashboards the Caelario app shows.
Your first request in five steps
You need a Caelario workspace and a terminal. New workspaces start with 200 free credits, valid for 30 days.
- 1
Create a key
Sign in or create an account at app.caelario.com/connect and create an API key, or open Developers in the dashboard. Name it after the environment that will use it. The full secret is shown once; Caelario stores only a digest, so a lost key is replaced, not recovered.
- 2
Keep it server-side
Put the key in an environment variable or your secret manager. Never ship it in browser JavaScript, a mobile app or a public repository. Use separate keys for development and production so you can revoke one without touching the other.
- 3
Read the catalog
GET /v1/platforms returns every operation with its maximum results, credits per result, any flat base cost and an available flag. Build your client from this response rather than hard-coding prices. GET /v1/account and GET /v1/usage/current confirm the key works and show your balance.
- 4
Run one bounded request
POST /v1/extract with platform, operation, target and limit. It returns the completed result and final billing in the same response, as long as the request asks for 50 results or fewer.
- 5
Go durable for anything bigger
POST /v1/jobs returns 202 with a job ID straight away. Poll GET /v1/jobs/{job_id} until status is completed, failed or cancelled, then download GET /v1/jobs/{job_id}/export as json, csv or xlsx. Exports of stored results don't cost credits.
Extract, job, batch or schedule: which to use
The request body is the same everywhere: platform, operation, target (or targets) and limit. What changes is how long the work may take and how many targets it covers.
| Endpoint | Use it for | What you get back |
|---|---|---|
| POST /v1/extract | One target, 50 results or fewer, when you want the answer inside the request | 200 with the completed result and billed credits. Larger limits return 422 limit_exceeds_synchronous_maximum. |
| POST /v1/jobs | One target of any size, or work that must survive a closed connection | 202 with a job ID; progress, retries and the result on GET /v1/jobs/{job_id} |
| POST /v1/batches | The same operation across up to 100 targets, e.g. 30 competitors' posts | 202 with a batch ID; each target is its own job that retries or fails alone |
| POST /v1/schedules | Repeating a job or batch once, daily, weekly or monthly | 201 with the schedule; each run creates normal jobs you read the usual way |
Schedules take an IANA timezone and keep the same local time across daylight-saving changes. Pause, resume, run now and delete are separate endpoints under /v1/schedules/{schedule_id}.
A real response, field by field: Red Bull on TikTok
We called tiktok/profile for redbull with include_posts set to 3, which returns the profile and its most recent videos in one result. Below are the fields that matter, with the values that came back and what each means. Media URLs and long captions are trimmed.
Counts as returned. The platform has already rounded the large ones.
See the full table
| Field | Example value | Meaning |
|---|---|---|
| profile.platform_user_id | 160822079959736320 | Stable account ID. Key your database on this, since handles can change. |
| profile.username / display_name | redbull / Red Bull | Handle and display name |
| profile.follower_count | 24000000 | Followers as TikTok shows them. Large counts are rounded (24M). |
| profile.post_count / following_count | 3237 / 541 | Public videos and accounts followed |
| profile.total_likes | 642500000 | Lifetime likes. TikTok shows this; platforms that don't return null. |
| posts[].platform_content_id | 7706093984610815254 | The video's ID; content_url is its public link |
| posts[].published_at | 2026-11-09T09:00:35Z | Publish time, always UTC in ISO 8601 |
| posts[].view_count | 27800000 | Views. Reliable on TikTok, YouTube and X; patchy on Facebook and Instagram, where it's often null. |
| posts[].like_count / comment_count | 2000000 / 17200 | Likes (on Facebook, all reactions) and comments |
| posts[].share_count / save_count | 290800 / 112300 | Shares and saves. Null where the platform hides them, such as Instagram shares and saves. |
| posts[].duration_seconds | 25 | Video length |
| posts[].hashtags | pradalinearossa, redbull, givesyouwiiings, wingsuit, catapult | Parsed from the caption, lowercase, without # |
| posts[].music.sound_id | 7706094045835053846 | The sound used; pass it to sound_videos to see who else used it |
| posts[].is_pinned | true | Pinned to the top of the profile |
| posts[].is_ad / sponsors | false / [] | TikTok's ad flag, and paid-partnership labels where the platform shows them |
| billed_credits (job) | 4 | 1 for the profile plus 1 for each of the 3 videos |
What it tells you
- All three "recent" videos were pinned, and the third was posted on 1 October 2025. Pinned posts come first, so drop is_pinned items before you calculate posting pace or recent averages.
- The wingsuit video's caption names Prada and uses #PradaLineaRossa, yet sponsors is empty because TikTok didn't label it as a paid partnership. Read captions and hashtags as well as the sponsors field when you look for brand deals.
- Counts arrive as integers, but the platform has already rounded large ones (2,000,000 likes, 24,000,000 followers). Don't report false precision.
- Shares were 1.05% of views on that video (290,800 of 27.8 million), and saves 0.40%. Ratios like these are comparable across accounts of any size.
Collected through the Caelario MCP server, which calls the same /v1/extract endpoint. 4 credits.
Sources: Red Bull on TikTok · Wingsuit video
One schema across Instagram, TikTok, YouTube, X and Facebook
Every content item, from an Instagram reel to an X post to a Facebook Page post, comes back with the same core fields: platform, platform_content_id, username, kind, media_type, caption, published_at, like_count, comment_count, share_count, view_count, save_count, content_url, thumbnail_url, hashtags, is_pinned and collaborator_usernames. Profiles share platform_user_id, username, display_name, biography, follower_count, following_count, post_count, total_likes and verified. Comments share text, like_count, reply_count, published_at and a comment_url you can pass to comment_replies.
Platform-specific fields sit alongside the core ones: YouTube's title, Facebook's reactions breakdown, TikTok's music. Ad library records have their own shape, with started_at, active, publisher_platforms and creative URLs.
The rule that keeps analysis honest: null means the platform doesn't show the number, and 0 means it shows zero. Instagram doesn't publish shares, so share_count is null there. Compute averages over the items that have a value, and never treat null as zero.
A few meanings differ by platform, and the schema can't hide them. Facebook's like_count is the sum of all reactions. YouTube's posts operation mixes long videos and Shorts, newest first. Instagram returns collaborative posts with the primary publisher in username and co-authors in collaborator_usernames. Check these before comparing platforms; the platform guides cover each one.
Pagination and large results
You don't page through the platforms yourself. You set one total limit, up to the operation's maximum (200 TikTok videos, 100 Instagram posts, 500 playlist items and so on), and Caelario walks the platform's pages internally, saving progress as it goes. The job finishes when it reaches your limit or the platform has nothing more to show.
A limit is a maximum, not a promise. If an account has fewer public items, or the platform shows only part of a list, the job completes with fewer results and a notice such as fewer_results or no_results. You pay only for what was delivered. Our request for 20 comments on a Facebook post returned the 10 Facebook displayed and cost 10 credits, not 20.
A completed job's result is stored. GET /v1/jobs/{job_id} returns it, and the export endpoint gives you the whole thing as JSON, CSV or XLSX for batches too. Reading or exporting a stored result never re-runs the extraction. If you work through the MCP server, get_extraction_result pages a large result in slices so it fits an AI model's context.
How credits, estimates and settlement work
Every operation has a published price in GET /v1/platforms. These are the rules that turn a price into a charge.
| Metric | What it means | How to read it |
|---|---|---|
| credits_per_result | The price of each delivered item. Instagram posts are 1, YouTube videos 1, Meta Ad Library records 2, Facebook Page profiles 1. | Multiply by your limit to get the most a request can cost. |
| base_credits | A flat price for operations sold as a complete collection, such as Instagram stories and highlights (5 each when non-empty). | Charged once per non-empty result, whatever the item count. |
| Transcripts and analytics | One-result operations with their own price: 10 for a YouTube transcript, 20 for other platforms, 5 for Facebook Page analytics. | Check the catalog; these aren't per-item. |
| Reservation | Creating work reserves the maximum: limit × rate (+ any base). A profile with include_posts reserves the profile plus each requested post. | If the balance can't cover it, you get 402 insufficient_credits before anything runs. |
| Settlement | When the job finishes you're charged for delivered results and the rest of the reservation is released. Empty and failed results cost nothing. | billed_credits on the job is the final charge. Our two-brand TikTok batch reserved 32 and billed 17 because one account had no videos. |
| Plans and packs | Monthly plans include research credits (3,000 to 100,000 a month) and the API. Credit packs (5,000 for $19, 20,000 for $39, 50,000 for $79) work with or without a plan and never expire. | At 1 credit per post, the $19 pack covers 5,000 Instagram posts. |
What operations cost, per delivered result
Published prices quoted above. Multiply by your limit for the most a request can cost.
Instagram stories and highlights are a flat 5 credits when non-empty.
Errors you'll meet, and how to handle each
Errors return a JSON body with an error code, and every response carries an X-Request-ID you can quote to support.
401 missing_authentication or invalid_api_key
The header is missing, or the key was revoked or belongs to another workspace. Rotate by creating a new key, deploying it, then revoking the old one.
402 insufficient_credits
The maximum reservation is more than your balance. Lower the limit, split the targets, or add credits. Nothing was charged.
422 unsupported_operation or limit_exceeds_synchronous_maximum
The operation isn't in the catalog for that platform, or you sent more than 50 results to /v1/extract. Move large requests to /v1/jobs.
429 rate_limit_exceeded or concurrent_job_limit_exceeded
Wait for the Retry-After header, or for running jobs to finish. Your account's limits are in GET /v1/account.
503 operation_unavailable
The operation is temporarily switched off (today, TikTok's single-ad detail) and is rejected before any credits are reserved. Retrying won't help; use an alternative such as TikTok ad search.
Retries that double-charge
If a write times out and you retry, send an Idempotency-Key header and reuse it with the identical body. Caelario returns the original job instead of reserving twice. Reusing a key with a different body returns 409 idempotency_key_conflict.
A completed job with fewer results than you asked for
Not an error. Read the notices array (fewer_results, no_results) and adjust your analysis rather than retrying.
Insights endpoints: snapshots, comparisons and dashboards
Above the raw data, the same key reaches the endpoints that power the Caelario app. They aren't in the public OpenAPI file yet, so treat their response shapes as subject to change.
POST /v1/insights/find-handles takes brand names or websites and returns each brand's likely handle per platform, free. POST /v1/insights/snapshots builds a competitor snapshot: a brand and up to five competitors on up to five platforms, collecting each profile plus 24 recent posts. GET /v1/insights/snapshots/{snapshot_id} returns the scoreboard and actions, and every snapshot has a share link that opens without a login.
For ongoing work, POST /v1/insights/brands starts tracking a brand's handles on a daily or weekly refresh, and GET /v1/insights/brands/{brand_id}/dashboard returns follower growth, engagement rate, posting pace, top posts and suggested actions for 7 to 90 days. POST /v1/insights/comparisons groups a client brand with up to five competitors, and GET /v1/insights/comparisons/{comparison_id}/dashboard returns the side-by-side leaderboard and trends. GET /v1/insights/history/{platform}/{handle} returns a tracked account's follower history, and GET /v1/insights/alerts lists breakout-post, follower-spike and posting alerts. For how agencies use these, see /use-cases/competitor-tracking.
The same data without writing code
Everything the API does is also available in the app and through AI assistants, on the same workspace and balance.
Ask AI and templates
Ask a research question in plain English, or start from one of 15 templates in Insights. A question's plan shows each step and its maximum credits before you approve; a template shows its steps and a flat price that includes a basic AI insight. The API equivalents are POST /v1/assistant/plans and /v1/assistant/templates/{template_id}/plans.
MCP server and Claude connector
Let Claude, Codex or Claude Code call the operations for you, with estimates first. See /solutions/social-media-mcp-server.
One workspace
Jobs created by your code appear in the dashboard alongside the team's, on the same balance.