# Give an agent socialdata (/docs/agents) An agent can reach socialdata in three ways. Use one or more of them: | Way | Use it when | |---|---| | [The MCP server](/docs/mcp) | The agent runs in an MCP client, such as Claude Code, Cursor, or Codex | | [The agent skill](/docs/skills) | The agent reads skills. The skill tells it when and how to use socialdata | | [/llms-full.txt](/llms-full.txt) | The agent reads docs as text. Each page is also at its URL plus `.md`, and [/llms.txt](/llms.txt) lists them | ## Rules for the agent [#rules-for-the-agent] Copy these rules into the instructions of your agent, such as `AGENTS.md` or `CLAUDE.md`: ```md ## socialdata - Name an account or a post with a link, `platform:@handle`, or an id (`platform:account:ID`, `platform:post:ID`). `account_history`, `post_history`, and `untrack` take only ids: get one from `lookup` or a search first. - To find items, use `search_posts` and `search_accounts`. They cost 0 credits. Use `lookup` for one item that you can name. - Only `lookup` and `track` can cost credits. Check `meta.credits_spent` and `meta.credits_left_today` in each answer. - Do not set `max_age_s` unless the task needs fresh numbers. - Before you compare numbers, read `observed_at`. A null count is unknown, not 0. - Page with `next_cursor`: pass it as `cursor` until it is null. - On an error, read `code` and `retryable`. Do not retry `not_found`, `private`, or `restricted`. ``` ## Common tasks [#common-tasks] | Task | Tools, in order | |---|---| | The current numbers of one account or post | `lookup` with its link | | The growth of an account | `lookup` to get the id, then `account_history` | | How a post grew after it was posted | `lookup` to get the id, then `post_history` | | The top posts about a topic this week | `search_posts` with `q` and `sort: [{"field": "view_count_gained_7d"}]` | | The posts of one account | `search_posts` with `account` | | The fastest-growing accounts in a watchlist | `search_accounts` with `watchlist` and `sort: [{"field": "follower_count_change_30d"}]` | | Follow accounts or posts over time | `track` into a watchlist, then `watchlist_items` or the search tools with `watchlist` | | Stop following an item | `watchlist_items` to get its id, then `untrack` | | A question that no other tool answers | `sql` | ## Notes per tool [#notes-per-tool] - **lookup.** An item that socialdata has never seen costs up to 2 credits. `max_age_s` makes it read the platform again when the stored data is older. A long YouTube video fails with `unsupported_media_type` after 1 credit. - **account_history and post_history.** They take an id, never a handle or a link. An item that socialdata has never seen fails with `not_stored`: call `lookup` first. - **search_posts and search_accounts.** Up to 100 results a page. `relevance` sorting needs `q`, and a row whose value is unknown sorts last and never passes a filter. Results can be a few minutes behind `lookup`, and `synced_at` gives the time of each row. - **track.** Read `results`: each ref gets its own outcome. [Track accounts and posts](/docs/concepts/tracking) explains them. - **sql.** One `SELECT`, at most 1,000 rows, 10 seconds, and 10,000,000 rows read. Filter on `platform` and `platform_account_id` to stay inside the limits. ## Freshness [#freshness] socialdata measures tracked accounts and posts on a schedule. A post is measured about every 4 hours in its first 3 days, about every 12 hours until it is 14 days old, then about once a day. A tracked post is measured until 30 days after it was posted. socialdata measures a tracked account as often as it posts, or at the fixed `interval_s` (at least 900 seconds) that you give `track`. An agent that needs a number from the last hour calls `lookup` with `max_age_s: 3600`. That call can cost credits. [Read an answer](/docs/concepts/answers) explains the freshness fields. ## History [#history] `account_history` returns 30 days by default. With `grain: "hour"`, the range can be at most 14 days. With `grain: "day"`, it can be at most 3,660 days. `post_history` returns at most the 1,000 newest measurements of a post. ## Limits and errors [#limits-and-errors] - One API key can send 120 requests a minute. - Your organization has a daily credit limit. [Credits and limits](/docs/concepts/credits) says what costs credits. - [Errors](/docs/errors) lists each code and what an agent does about it. # Authentication (/docs/authentication) Every call acts for one organization. The two ways to call socialdata find your organization differently. | You call | You send | Your organization comes from | |---|---|---| | The HTTP API | An API key, in the `x-api-key` header | The key | | The MCP server | An OAuth access token, which your MCP client gets for you | The organization that you chose when you signed in | `GET /health` needs neither. ## HTTP: the API key [#http-the-api-key] Send the key in the `x-api-key` header of each call to `/v1`: ```sh curl -s https://api.socialdata.product.studio/v1/watchlists -H "x-api-key: $SOCIALDATA_API_KEY" ``` A missing or unknown key gets status 401: ```json {"code":"unauthorized","message":"Send the API key of an organization in the x-api-key header.","retryable":false,"trace_id":"2a2593aeba0892a5f03a7ec0d9fd3727","credits_spent":0} ``` ## MCP: sign in [#mcp-sign-in] The MCP server takes no API key. Your MCP client signs in through OAuth and registers itself, so you do not create a client ID. The first time you connect, your browser opens three pages: 1. **Sign in.** Enter your email address, then the code that socialdata sends to it. 2. **Choose an organization.** Choose one, or create one. The client acts for it. 3. **Allow access.** Allow the client to call the tools. If a call answers `forbidden`, sign in again and choose an organization. ## Rate limit [#rate-limit] One API key can send 120 requests a minute. Above that, the answer is `rate_limited` with status 429. Wait `retry_after_s` seconds, then retry. ## What an organization may do [#what-an-organization-may-do] `track` and `untrack` need an organization that may track: `can_track` in the answer of `watchlists` says whether yours may. Media links on posts need an organization that may read media. # Read an answer (/docs/concepts/answers) ## meta [#meta] Every answer has a `meta` object: | Field | Meaning | |---|---| | `as_of` | The answer holds no data read after this time | | `source` | `store`: data that socialdata already held. `live`: this call read the platform. `vendor_cache`: this call used a recent copy that socialdata's data provider held, and each observed time is the time of that copy. Only `lookup` answers `live` or `vendor_cache` | | `credits_spent` | What this call cost | | `credits_left_today` | What your organization can still spend on lookups today (UTC) | | `trace_id` | The id of the call. Quote it when you report a problem | | `warnings` | Notes about the answer, each with a `code` and a `message`. Usually empty | ## Warnings [#warnings] | Code | Meaning | |---|---| | `stale` | `lookup` could not read the platform, so the answer holds stored data older than `max_age_s` | | `handle_changed` | No account holds the handle now, and the answer is the account that held it before | | `first_observation` | This call read the item for the first time, so no change over time is known yet | | `partial_backfill` | socialdata is still reading the older posts of the account | | `counter_decreased` | A count dropped between two measurements. The answer keeps the values that the platform showed | | `mixed_platforms` | The answer mixes platforms, whose counts are not measured the same way | ## How fresh is a number [#how-fresh-is-a-number] socialdata measures each tracked account and post on a schedule, and `lookup` can read the platform on demand. Three fields say how old a number is: - `observed_at` on a post, and `_observed_at` on an account: when socialdata read that number on the platform. - `synced_at` on a search result: when the search results last took the row. A row follows a new measurement within about 5 minutes, so a search can be a few minutes behind `lookup`. - `windows_synced_at` on a search result: when socialdata last computed the gains, the follower changes, `posts_30d`, the medians, and `outlier_score` of the row. Their windows end at this time, and socialdata computes them again every hour for a row measured in the last 30 days. - `meta.as_of`: the answer holds nothing read after it. To make sure a number is recent, call `lookup` with `max_age_s`. If the newest data is older, `lookup` reads the platform again, which can cost credits. If it cannot, the answer keeps the stored data and carries the warning `stale`. ## Counts and changes [#counts-and-changes] - A count is `null` when the platform does not show it, for example likes that the author hides. `null` is not `0`. - YouTube rounds follower counts to three significant digits. `follower_count_precision` is `3` then. - A change, such as `follower_count_change_30d` or `view_count_gained_7d`, is the count at the end of the window minus the count at its start. It is negative when the count dropped, and `null` when socialdata has no measurement near the window start. - A `_pct` field is a fraction: `0.026` means 2.6%. - `text_spoken` and `text_on_screen` are `null` until socialdata has read the video, and an empty string when it found no words. - `outlier_score` is `null` when the author's median is 0, unknown, or built from fewer than 5 posts. - Counts from different platforms are not measured the same way. An answer that mixes platforms carries the warning `mixed_platforms`. ## Availability [#availability] `availability.status` says whether socialdata can read an account or a post on the platform: | Status | Meaning | |---|---| | `available` | The platform shows it | | `private` | Only approved followers can see it | | `restricted` | The platform limits who can see it, for example by age or region | | `unavailable` | The last read failed for another reason | The history of a private or deleted item stays readable. ## Media [#media] `media_status` says whether socialdata holds copies of a post's video and images: | Status | Meaning | |---|---| | `stored` | `media` lists the files | | `pending` | The copy is not ready yet | | `none` | The post has no media, for example a text post | | `failed` | socialdata could not copy the files | | `skipped` | A long video, which socialdata does not copy | | `not_permitted` | Your organization may not read media | Each `url` is a signed link to socialdata's copy and stops working 1 hour after the answer. Call again for a new link. `search_posts` adds media links only when you send `include: ["media"]`. `thumbnail` on a post, `avatar` on an account, and `account_avatar` on a post (the picture of its author) are images that socialdata stores as WebP within 512 by 512 pixels. Each is `null` until socialdata has stored one, and its `url` also stops working 1 hour after the answer. ## Pages [#pages] A tool that returns a list returns one page and `next_cursor`. Pass `next_cursor` as `cursor` to get the next page. `next_cursor` is `null` on the last page. `limit` sets the page size, from 1 to 100. # Credits and limits (/docs/concepts/credits) Most calls cost nothing. A call costs credits only when socialdata must read the platform for you, and `meta.credits_spent` of each answer says what it cost. ## What costs credits [#what-costs-credits] Only `lookup` and `track` can cost credits. The other eight tools read data that socialdata already holds and cost 0. | Call | Credits | |---|---| | `lookup` of an account or a post that socialdata already holds | 0 | | `lookup` of a post that socialdata has never seen | Up to 1. Up to 2 for a LinkedIn or a Snapchat post, because socialdata also reads its author | | `lookup` of an account that socialdata has never seen | Up to 2 | | `lookup` with `max_age_s` of 86400 (a day) or more, when a recent cached copy is not older | 0. `meta.source` is `vendor_cache` | | `lookup` of a long YouTube video | 1, then the call fails with `unsupported_media_type` | | `track` of a handle, of a post link that carries the post id, or of an item that socialdata holds | 0 | | `track` of a ref that socialdata must read first | What `lookup` of that ref costs | `max_age_s` makes `lookup` read the platform again when the newest data is older. Without it, an item that socialdata holds costs nothing, however old its data. Updates of tracked accounts and posts do not cost your organization credits. ## The daily limit [#the-daily-limit] `meta.credits_left_today` says what your organization can still spend on lookups today (UTC). When a call needs more, it fails with `budget_exceeded` and status 429. `resets_at` says when the limit resets, and `limit` says which limit refused the call: `organization` is your organization's daily limit, and `lookup_share` and `day` are shared daily limits of socialdata. ## Tracking limits [#tracking-limits] Your plan sets how many accounts and posts your organization can track. When `track` has no room, the result of that ref is `refused` with `account_limit_reached` or `post_limit_reached`. ## The rate limit [#the-rate-limit] One API key can send 120 requests a minute. Above that, the answer is `rate_limited` with status 429. Wait `retry_after_s` seconds, then retry. # Name an account or a post (/docs/concepts/refs) A ref names one account or one post. `lookup`, `track`, and the `account` filter of `search_posts` take refs. A ref has one of these forms: | Form | Example | |---|---| | A profile link | `https://www.tiktok.com/@acme_studio` | | A post link | `https://x.com/AcmeStudio/status/1830000000000000001` | | `platform:@handle` | `instagram:@acme.co` | | `platform:account:ID` | `instagram:account:1789456123` | | `platform:post:ID` | `tiktok:post:7431852096741258240` | `platform` is one of `instagram`, `tiktok`, `youtube`, `threads`, `facebook`, `x`, `linkedin`, and `snapchat`. ## Ids [#ids] `account_history`, `post_history`, and `untrack` take an id, never a handle or a link. The id of an account is `platform:account:ID`, and the id of a post is `platform:post:ID`. Build it from `platform` and `platform_account_id` or `platform_post_id` of any answer. To turn a handle or a link into an id, call `lookup` with it. An account in a watchlist that socialdata has not found yet has the id `platform:pending:N` from `watchlist_items`, which only `untrack` takes. ## Links on each platform [#links-on-each-platform] | Platform | An account | A post | |---|---|---| | Instagram | `https://www.instagram.com/acme.co/` | `https://www.instagram.com/reel/C0dE1234567/` or `/p/` | | TikTok | `https://www.tiktok.com/@acme_studio` | `https://www.tiktok.com/@acme_studio/video/7431852096741258240` | | YouTube | `https://www.youtube.com/@acme.co` | `https://www.youtube.com/shorts/aBcD1234EfG` | | Threads | `https://www.threads.net/@acme.co` | `https://www.threads.net/@acme.co/post/DAbC123xYz9` | | Facebook | `https://www.facebook.com/AcmeStudio` | `https://www.facebook.com/AcmeStudio/videos/1234567890123456/` | | X | `https://x.com/acmestudio` | `https://x.com/AcmeStudio/status/1830000000000000001` | | LinkedIn | `https://www.linkedin.com/company/acme-studio/` | `https://www.linkedin.com/posts/acme-studio_launch-day-activity-7400000000000000001-AbCd` | | Snapchat | `https://www.snapchat.com/add/acme.co` | `https://www.snapchat.com/spotlight/AbCdEf123456` | Some links need more than the link itself: - **Short links.** socialdata follows the redirect of a short link, such as `https://vm.tiktok.com/ZMabc123/`, `https://t.snapchat.com/AbCdEf12`, or `https://t.co/AbCdEf123`. A short link that leads off the platform is refused. - **Facebook links with only a number.** socialdata reads the platform to place a link such as `https://www.facebook.com/100012345678901`, or a Facebook video link, so `lookup` and `track` of it can cost credits. - **LinkedIn.** Only company pages and their posts are refs. A personal profile, such as `https://www.linkedin.com/in/someone/`, is `invalid_ref`. - **Long YouTube videos.** A `watch?v=` or `youtu.be` link does not say whether the video is a Short. If it is a long video, `lookup` answers `unsupported_media_type` after it spent 1 credit to learn the length. A link to any other site, such as `https://pinterest.com/acmestudio/`, is `unsupported_platform`. # Track accounts and posts (/docs/concepts/tracking) A watchlist is a named list of accounts and posts in your organization. socialdata measures every item in a watchlist on a schedule and keeps each measurement, so the history tools and the search tools can show growth. ## Add and remove items [#add-and-remove-items] `track` adds 1 to 100 refs to a watchlist. A new name creates the watchlist. A post link or a post id tracks that post, not its author. `untrack` removes one item by its id. The history of the item stays readable, and `is_still_polled` says whether another watchlist still lists it. `track` and `untrack` need an organization that may track. `can_track` in the answer of `watchlists` says whether yours may. Otherwise the call fails with `forbidden`. ## The result of each ref [#the-result-of-each-ref] Each ref gets its own `outcome` in `results`: | Outcome | Meaning | |---|---| | `added` | The item is now in the watchlist | | `already_in_watchlist` | Nothing changed | | `pending` | A handle that socialdata has never seen. It is added, and `id` fills in after the first read | | `refused` | Nothing was added. `error_code` says why | | `error_code` | What to do | |---|---| | `invalid_ref` or `unsupported_platform` | Fix the ref. [Name an account or a post](/docs/concepts/refs) gives the forms | | `not_stored` | The post link has no post id that socialdata knows. Call `lookup` with the link first | | `account_limit_reached` or `post_limit_reached` | Your plan has no room for another account or post | ## How often socialdata measures [#how-often-socialdata-measures] An account stays tracked while any watchlist lists it. Its `tier` sets how often socialdata reads it: | Tier | Interval | For an account that posted | |---|---|---| | `hot` | About every 4 hours | In the last 3 days | | `warm` | About every 12 hours | In the last 14 days | | `cold` | About once a day | Less recently | To set a fixed interval for the accounts instead, send `interval_s` to `track`, at least 900 seconds. A post is measured about every 4 hours in its first 3 days, about every 12 hours until it is 14 days old, then about once a day. Its measurements stop 30 days after `posted_at`, which `tracked_until` shows. ## The state of an item [#the-state-of-an-item] `watchlist_items` shows the state of each item: | Item | Status | Meaning | |---|---|---| | Account | `pending` | socialdata has not read the account yet | | Account | `active` | The updates succeed | | Account | `failing` | The recent updates failed. `last_error_code` says why | | Post | `active` | socialdata measures the post on a schedule | | Post | `finished` | The last measurement, 30 days after publishing, is done | | Post | `failed` | Three measurements in a row failed | | Post | `deleted` | The platform says that the post is gone | An account that socialdata has not found yet has `platform_account_id` null and an id of the form `platform:pending:N`, for example `instagram:pending:42`. It is `pending` before its first read, and `failing` with `last_error_code` `not_found`, `private` or `restricted` when that read did not find it. `untrack` takes that id. Once a read finds the account, the item has its account id instead. # Errors (/docs/errors) An error body has these fields: | Field | Meaning | |---|---| | `code` | The error code, from the table below | | `message` | What went wrong, for a person or an agent to read | | `retryable` | `true` when the same call can succeed later | | `trace_id` | The id of the call. Quote it when you report a problem | | `credits_spent` | The credits that the call spent before it failed | Some codes add fields. Over MCP, the tool result has `isError: true`, and its structured content is the same body. ## Codes [#codes] | Code | Status | Extra fields | What to do | |---|---|---|---| | `invalid_ref` | 400 | | Fix the ref. [Name an account or a post](/docs/concepts/refs) gives the forms | | `unsupported_platform` | 400 | | Send a ref of one of the eight platforms | | `unsupported_media_type` | 400 | `media_type` | Do not retry. The post is a long video, and socialdata covers short-form video only | | `invalid_argument` | 400 | `field` | Fix the argument that `field` names. `message` says what is wrong | | `sql_rejected` | 400 | | Send one `SELECT` statement, with no `SETTINGS` clause | | `sql_too_large` | 400 | | Make the query read fewer rows or less data, or use less memory | | `unauthorized` | 401 | | Send the API key of an organization in `x-api-key` | | `forbidden` | 403 | | Use an organization that may track. Over MCP, authorize again and choose an organization | | `not_found` | 404 | `target` | Do not retry. The platform says that the account or the post does not exist | | `not_stored` | 404 | `target` | Call `lookup` first. For a watchlist, check its name | | `private` | 404 | `target` | Do not retry. The account or the post is private | | `restricted` | 404 | `target` | Do not retry. The platform restricts the account or the post | | `sql_timeout` | 408 | | Make the query cheaper, then retry | | `ambiguous_handle` | 409 | `candidates` | Choose one of `candidates` and send its id | | `rate_limited` | 429 | `retry_after_s` | Wait `retry_after_s` seconds, then retry | | `budget_exceeded` | 429 | `limit`, `resets_at` | Wait until `resets_at`. [Credits and limits](/docs/concepts/credits) explains `limit` | | `not_implemented` | 501 | | Do not retry. The operation is not built yet | | `upstream_failed` | 502 | | Retry when `retryable` is `true`. The platform or the data provider failed, or its answer could not be read | | `search_unavailable` | 503 | | Retry later. Only `search_posts` and `search_accounts` use the search index | The reference page of each tool lists the codes that the tool can answer. ## Retry [#retry] Retry only when `retryable` is `true`: - After `rate_limited`, wait `retry_after_s` seconds. - After `budget_exceeded`, wait until `resets_at`. - After `upstream_failed`, `search_unavailable`, or `sql_timeout`, wait a few seconds and retry once or twice. A failed call never costs more than `credits_spent` says. # Introduction (/docs) socialdata reads public accounts and posts on eight platforms and keeps every measurement it takes. You can ask for the current numbers of an account or a post, search what socialdata holds by words and filters, and read how an account or a post grew over time. You call socialdata in two ways, with the same ten tools, the same inputs, and the same answers: - **The HTTP API**, at `https://api.socialdata.product.studio/v1`, with an API key. See the [API reference](/docs/reference). - **The MCP server**, at `https://api.socialdata.product.studio/mcp`, for agents such as Claude Code, Cursor, and Codex. See [Connect an MCP client](/docs/mcp). ## The ten tools [#the-ten-tools] | Tool | Use it to | |---|---| | [`lookup`](/docs/reference/lookup) | Get the current card of one account or post that you can name | | [`search_posts`](/docs/reference/search_posts) | Find posts by words, filters, and sort | | [`search_accounts`](/docs/reference/search_accounts) | Find and rank accounts by words, filters, and sort | | [`account_history`](/docs/reference/account_history) | Read the counts of one account over time | | [`post_history`](/docs/reference/post_history) | Read every measurement of one post | | [`watchlists`](/docs/reference/watchlists) | List the watchlists of your organization | | [`watchlist_items`](/docs/reference/watchlist_items) | List the accounts and posts in one watchlist | | [`track`](/docs/reference/track) | Add accounts or posts to a watchlist, so socialdata updates them on a schedule | | [`untrack`](/docs/reference/untrack) | Remove an account or a post from a watchlist | | [`sql`](/docs/reference/sql) | Run one read-only SQL query for a question that no other tool answers | ## Platforms [#platforms] Instagram, TikTok, YouTube, Threads, Facebook, X, LinkedIn (company pages), and Snapchat. socialdata covers short-form video: a long YouTube video is refused. ## Next steps [#next-steps] - [Quickstart](/docs/quickstart): make your first call. - [Give an agent socialdata](/docs/agents): a rules snippet and the common tasks. - [Read an answer](/docs/concepts/answers): what the fields of every answer mean. # Connect an MCP client (/docs/mcp) > For agents: the socialdata MCP server is `https://api.socialdata.product.studio/mcp` (Streamable HTTP, OAuth). The full docs are at [/llms-full.txt](/llms-full.txt), and an agent skill is at [/skills/socialdata/SKILL.md](/skills/socialdata/SKILL.md). The socialdata MCP server gives an agent the same ten tools as the HTTP API. It uses the Streamable HTTP transport and the MCP protocol versions `2026-07-28` and `2025-11-25`. Your client signs in through OAuth, so it needs no API key. The first time you connect, your browser opens the [sign-in pages](/docs/authentication#mcp-sign-in). ## Claude Code [#claude-code] ```sh claude mcp add --transport http socialdata https://api.socialdata.product.studio/mcp ``` Then run `/mcp` in Claude Code, choose `socialdata`, and sign in. ## Cursor [#cursor] Add the server to `~/.cursor/mcp.json`, or to `.cursor/mcp.json` in a project: ```json { "mcpServers": { "socialdata": { "url": "https://api.socialdata.product.studio/mcp" } } } ``` Cursor shows a **Needs login** button beside the server. Click it to sign in. ## Codex [#codex] ```sh codex mcp add socialdata --url https://api.socialdata.product.studio/mcp codex mcp login socialdata ``` ## Other clients [#other-clients] Most clients take a server entry like this one: ```json { "mcpServers": { "socialdata": { "type": "http", "url": "https://api.socialdata.product.studio/mcp" } } } ``` The client must support remote servers over Streamable HTTP and OAuth with dynamic client registration. ## Check the connection [#check-the-connection] Ask your agent: "Which socialdata tools can you use?" It lists ten tools: `lookup`, `search_posts`, `search_accounts`, `account_history`, `post_history`, `watchlists`, `watchlist_items`, `track`, `untrack`, and `sql`. [Tools](/docs/mcp/tools) says what each one returns. # Tools (/docs/mcp/tools) Each tool takes one object: the path parameters and the query or the body of its HTTP endpoint. It returns the same JSON as the endpoint. When a tool fails, the result has `isError: true`, and its content is the same [error body](/docs/errors) that the endpoint returns. The [API reference](/docs/reference) has one page per tool, with every input, every field, and an example. ## Which tool to call first [#which-tool-to-call-first] - **The task names an account or a post** (a link or a handle): call `lookup`. It returns the current numbers and the id that `account_history`, `post_history`, and `untrack` take. - **The task is about a topic, a ranking, or "the top posts"**: call `search_posts` or `search_accounts`. They cost 0 credits. - **The task is about the user's own watchlists**: call `watchlists`, then `watchlist_items` or the search tools with `watchlist`. - **No other tool answers it**: call `sql`. Only `lookup` and `track` can cost credits. [Give an agent socialdata](/docs/agents) has a ready set of rules. # Quickstart (/docs/quickstart) In this guide, you call the API with `curl` and add the MCP server to an agent. Neither step costs credits. ## Get an API key [#get-an-api-key] For now, the socialdata team issues API keys. Ask the team for a key for your organization. A key starts with `sd_`. Keep it secret: anyone with the key acts for your organization. ```sh export SOCIALDATA_API_KEY=sd_your_key ``` ## Make your first call [#make-your-first-call] Search the posts that socialdata holds for a word: ```sh curl -s https://api.socialdata.product.studio/v1/posts/search \ -H "x-api-key: $SOCIALDATA_API_KEY" \ -H "content-type: application/json" \ -d '{"q": "unboxing", "limit": 3}' ``` You see an answer like this one, shortened: ```json { "meta": { "as_of": "2026-11-28T14:00:00Z", "source": "store", "credits_spent": 0, "credits_left_today": 30, "trace_id": "dd4ea85c713694073f9ab127c28f2318", "warnings": [] }, "posts": [ { "platform": "tiktok", "post_url": "https://www.tiktok.com/@acme_studio/video/7431852096741258240", "caption": "Unboxing the new Acme camera #unboxing #tech", "view_count": 184300, "observed_at": "2026-11-28T13:12:40Z", "matched_in": ["caption"] } ], "total_estimate": 1840, "next_cursor": "eyJvZmZzZXQiOjN9" } ``` Every answer has a `meta` object. `credits_spent` is what the call cost, and a search always costs 0. [Read an answer](/docs/concepts/answers) explains the other fields. ## Connect an agent [#connect-an-agent] Add the MCP server to your agent. For example, in Claude Code: ```sh claude mcp add --transport http socialdata https://api.socialdata.product.studio/mcp ``` Then run `/mcp` in Claude Code and sign in. [Connect an MCP client](/docs/mcp) has the steps for Cursor, Codex, and other clients. ## Next steps [#next-steps] - [Authentication](/docs/authentication): keys, sign-in, and the rate limit. - [Give an agent socialdata](/docs/agents): the rules that make an agent use socialdata well. - [Credits and limits](/docs/concepts/credits): what costs credits. # Overview (/docs/reference) The HTTP API has one endpoint for each of the ten tools. Each endpoint takes JSON and returns JSON. ## Base URL [#base-url] ``` https://api.socialdata.product.studio ``` The tools are under `/v1`. `GET /health` says whether the service is up and needs no key. ## Authentication [#authentication] Send your API key in the `x-api-key` header of each call: ```sh curl -s https://api.socialdata.product.studio/v1/lookup \ -H "x-api-key: $SOCIALDATA_API_KEY" \ -H "content-type: application/json" \ -d '{"ref": "https://www.tiktok.com/@acme_studio"}' ``` [Authentication](/docs/authentication) explains keys and the rate limit. ## Answers [#answers] Every answer has a `meta` object with `as_of`, `source`, `credits_spent`, `credits_left_today`, `trace_id`, and `warnings`. [Read an answer](/docs/concepts/answers) explains them. ## Pages [#pages] A list endpoint returns one page and `next_cursor`. Send `next_cursor` as `cursor` to get the next page. `limit` sets the page size, from 1 to 100. ## Errors [#errors] An error has a status from 400 to 503 and a body with `code`, `message`, `retryable`, `trace_id`, and `credits_spent`. [Errors](/docs/errors) lists each code. ## sql [#sql] `sql` runs one read-only `SELECT` over socialdata's data. Use it only when no other tool answers the question. Its reference page has an example query. ## Endpoints [#endpoints] # Agent skill (/docs/skills) A skill is a `SKILL.md` file that an agent loads when a task needs it. The socialdata skill tells an agent how to connect, the rules for refs, credits, freshness, and errors, the tool sequences for common tasks, and what each tool does. The tool list comes from the [API reference](/docs/reference), so it always matches the API. Download the skill: [SKILL.md](/skills/socialdata/SKILL.md). ## Install the skill [#install-the-skill] **Claude Code.** Save the file as `.claude/skills/socialdata/SKILL.md` in your project, or as `~/.claude/skills/socialdata/SKILL.md` for every project. **Other agents.** Put the file where your agent reads skills, or add its text to the instructions of the agent. The skill does not connect the agent. Add the [MCP server](/docs/mcp) too, or give the agent an API key for the HTTP API. # lookup (/docs/reference/lookup) POST /v1/lookup Returns the current counts, profile or caption, and growth of one account or post that you name by a link, a handle, or an id. Use it when you can name the item, and use search_posts or search_accounts to find items you cannot name. The OpenAPI operation, with its parameters, its request body, and every answer that it declares: ```json {"tags":["v1"],"operationId":"lookup","parameters":[],"security":[{"type":"apiKey","name":"x-api-key","in":"header"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"as_of":{"type":"string","description":"The answer holds no data read after this time.","examples":["2026-11-26T14:00:00Z"]},"source":{"type":"string","enum":["store","live","vendor_cache"],"description":"Where the data came from: data that socialdata held, a live read of the platform, or a recent copy from its data provider.","examples":["store"]},"credits_spent":{"type":"integer","description":"The credits that this call cost.","examples":[0]},"credits_left_today":{"type":"integer","description":"The credits that your organization can still spend on lookups today (UTC).","examples":[30]},"trace_id":{"type":"string","description":"The id of this call, to quote when you report a problem.","examples":["dd4ea85c713694073f9ab127c28f2318"]},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["stale","handle_changed","first_observation","partial_backfill","counter_decreased","mixed_platforms"],"description":"The kind of note.","examples":["first_observation"]},"message":{"type":"string","description":"The warning, for a person or an agent to read.","examples":["The service saw this target for the first time in this call."]}},"required":["code","message"],"additionalProperties":false,"description":"A note about an answer that still succeeded."},"description":"Notes about the answer, usually none."}},"required":["as_of","source","credits_spent","credits_left_today","trace_id","warnings"],"additionalProperties":false,"description":"Facts about this call, in every answer."},"result":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["account"],"description":"This card is an account.","examples":["account"]},"platform":{"type":"string","enum":["instagram","tiktok","youtube","threads","facebook","x","linkedin","snapchat"],"description":"The social platform.","examples":["instagram"]},"platform_account_id":{"type":"string","description":"The platform's own id of the account.","examples":["1789456123"]},"profile_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The link to the profile.","examples":["https://www.instagram.com/acme.co/"]},"avatar":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"A signed link to socialdata's copy of the image, valid until expires_at.","examples":["https://media.socialdata.example/images/7431852096741258240.webp?signature=abc123"]},"expires_at":{"type":"string","description":"When url stops working, 1 hour after the answer.","examples":["2026-11-26T14:00:00Z"]},"width":{"type":"integer","description":"The width in pixels.","examples":[512]},"height":{"type":"integer","description":"The height in pixels.","examples":[512]}},"required":["url","expires_at","width","height"],"additionalProperties":false},{"type":"null"}],"description":"The newest profile picture of the account as WebP within 512 by 512 pixels, or null until socialdata stores one."},"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The handle, without the @.","examples":["acme.co"]},"handle_observed_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"When socialdata last read handle."},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name shown on the profile.","examples":["Acme Studio"]},"display_name_observed_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"When socialdata last read display_name."},"biography":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The biography of the profile.","examples":["Small cameras for long trips."]},"biography_observed_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"When socialdata last read biography."},"external_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The link in the profile.","examples":["https://acme.example/"]},"external_url_observed_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"When socialdata last read external_url."},"is_verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"true when the platform marks the account as verified.","examples":[true]},"is_verified_observed_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"When socialdata last read is_verified."},"is_private":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the platform last showed the account as private.","examples":[false]},"is_private_observed_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"When socialdata last read is_private."},"follower_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Followers.","examples":[98400000]},"follower_count_observed_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"When socialdata last read follower_count."},"follower_count_precision":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The significant digits of follower_count when the platform rounds it, or null when it is exact.","examples":[null]},"following_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Accounts that this account follows.","examples":[82]},"following_count_observed_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"When socialdata last read following_count."},"post_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Posts, as the platform counts them.","examples":[4512]},"post_count_observed_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"When socialdata last read post_count."},"total_like_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Likes over all posts, on platforms that show it.","examples":[null]},"total_like_count_observed_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"When socialdata last read total_like_count."},"total_view_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Views over all posts, on platforms that show it.","examples":[null]},"total_view_count_observed_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"When socialdata last read total_view_count."},"availability":{"type":"object","properties":{"status":{"type":"string","enum":["available","private","restricted","unavailable"],"description":"Whether socialdata can read the item on the platform.","examples":["available"]},"checked_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"The last time a read gave a clear answer about availability."},"last_ok_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"The last time socialdata could read it."}},"required":["status","checked_at","last_ok_at"],"additionalProperties":false,"description":"Whether the account or post can be read on the platform."},"tracking":{"type":"object","properties":{"is_tracked":{"type":"boolean","description":"true when socialdata updates the account on a schedule, because a watchlist of any organization lists it.","examples":[true]},"watchlists":{"type":"array","items":{"type":"string"},"description":"The watchlists of your organization that list the account.","examples":[["competitors"]]},"tracked_since":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"When a watchlist first listed the account."},"status":{"anyOf":[{"type":"string","enum":["pending","active","failing"],"description":"Whether the updates of the account succeed.","examples":["active"]},{"type":"null"}]},"tier":{"anyOf":[{"type":"string","enum":["hot","warm","cold"],"description":"How often socialdata reads the account, set by how recently it posted.","examples":["hot"]},{"type":"null"}]},"next_poll_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"When socialdata plans to read the account next."},"is_backfilled":{"type":"boolean","description":"true when socialdata has read the account's older posts.","examples":[true]}},"required":["is_tracked","watchlists","tracked_since","status","tier","next_poll_at","is_backfilled"],"additionalProperties":false,"description":"How socialdata keeps the account up to date."},"first_observed_at":{"type":"string","description":"When socialdata first read the account.","examples":["2026-11-26T14:00:00Z"]},"last_observed_at":{"type":"string","description":"When socialdata last read the account.","examples":["2026-11-26T14:00:00Z"]},"snapshot_count":{"type":"integer","description":"How many times socialdata has read the account.","examples":[212]},"growth_7d":{"anyOf":[{"type":"object","properties":{"window_start":{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},"window_end":{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},"follower_count_change":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Followers gained in the window.","examples":[1250]},"follower_count_change_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"follower_count_change divided by the followers at the window start: 0.026 means 2.6%.","examples":[0.026]},"view_count_gained":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Views gained in the window, summed over the account's posts that socialdata measured in the window.","examples":[410200]},"posts_measured":{"type":"integer","description":"Posts in the sum that socialdata measured across the whole window.","examples":[18]},"posts_partial":{"type":"integer","description":"Posts in the sum that socialdata measured for part of the window only.","examples":[3]},"posts_unknown":{"type":"integer","description":"Posts with no measurement in the window, which the sum leaves out.","examples":[0]}},"required":["window_start","window_end","follower_count_change","follower_count_change_pct","view_count_gained","posts_measured","posts_partial","posts_unknown"],"additionalProperties":false,"description":"Growth in a window that ends now, or null when a measurement is missing."},{"type":"null"}]},"growth_30d":{"anyOf":[{"type":"object","properties":{"window_start":{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},"window_end":{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},"follower_count_change":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Followers gained in the window.","examples":[1250]},"follower_count_change_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"follower_count_change divided by the followers at the window start: 0.026 means 2.6%.","examples":[0.026]},"view_count_gained":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Views gained in the window, summed over the account's posts that socialdata measured in the window.","examples":[410200]},"posts_measured":{"type":"integer","description":"Posts in the sum that socialdata measured across the whole window.","examples":[18]},"posts_partial":{"type":"integer","description":"Posts in the sum that socialdata measured for part of the window only.","examples":[3]},"posts_unknown":{"type":"integer","description":"Posts with no measurement in the window, which the sum leaves out.","examples":[0]}},"required":["window_start","window_end","follower_count_change","follower_count_change_pct","view_count_gained","posts_measured","posts_partial","posts_unknown"],"additionalProperties":false,"description":"Growth in a window that ends now, or null when a measurement is missing."},{"type":"null"}]},"posts_30d":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Posts published in the last 30 days, or null until socialdata reads the account's posts.","examples":[24]},"posts_per_week_30d":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"posts_30d per week.","examples":[5.6]},"median_view_count_30d":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"The median views of the posts of the last 30 days.","examples":[52000]},"is_partial":{"type":"boolean","description":"true while socialdata is still reading the account's older posts, so the 30-day values can be low.","examples":[false]},"top_posts":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["instagram","tiktok","youtube","threads","facebook","x","linkedin","snapchat"],"description":"The social platform.","examples":["tiktok"]},"platform_post_id":{"type":"string","description":"The platform's own id of the post.","examples":["7431852096741258240"]},"platform_account_id":{"type":"string","description":"The platform's own id of the author.","examples":["6812345098765432101"]},"account_handle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The author's handle, without the @.","examples":["acme_studio"]},"account_avatar":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"A signed link to socialdata's copy of the image, valid until expires_at.","examples":["https://media.socialdata.example/images/7431852096741258240.webp?signature=abc123"]},"expires_at":{"type":"string","description":"When url stops working, 1 hour after the answer.","examples":["2026-11-26T14:00:00Z"]},"width":{"type":"integer","description":"The width in pixels.","examples":[512]},"height":{"type":"integer","description":"The height in pixels.","examples":[512]}},"required":["url","expires_at","width","height"],"additionalProperties":false},{"type":"null"}],"description":"The author's newest profile picture as WebP within 512 by 512 pixels, or null until socialdata stores one."},"post_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The link to the post.","examples":["https://www.tiktok.com/@acme_studio/video/7431852096741258240"]},"media_type":{"anyOf":[{"type":"string","enum":["image","carousel","short_video","long_video","text"],"description":"The kind of post, where short_video is a Short, a Reel, a TikTok video, a Facebook reel, or a Spotlight.","examples":["short_video"]},{"type":"null"}]},"media_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"The number of slides in a carousel.","examples":[1]},"posted_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"When the post was published."},"duration_ms":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"The length of the video in milliseconds.","examples":[31500]},"is_paid_partnership":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"true when the platform labels the post as a paid partnership.","examples":[false]},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The title, on platforms that have one.","examples":[null]},"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The caption, as written.","examples":["Unboxing the new Acme camera #unboxing #tech"]},"hashtags":{"type":"array","items":{"type":"string"},"description":"The hashtags of the caption, in lower case, without the #.","examples":[["unboxing","tech"]]},"view_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Views.","examples":[184300]},"like_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Likes.","examples":[12650]},"comment_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Comments.","examples":[341]},"share_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Shares.","examples":[905]},"save_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Saves.","examples":[1210]},"repost_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Reposts.","examples":[null]},"quote_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Quotes, on X and Threads.","examples":[null]},"observed_at":{"type":"string","description":"When socialdata read these counts.","examples":["2026-11-26T14:00:00Z"]}},"required":["platform","platform_post_id","platform_account_id","account_handle","account_avatar","post_url","media_type","media_count","posted_at","duration_ms","is_paid_partnership","title","caption","hashtags","view_count","like_count","comment_count","share_count","save_count","repost_count","quote_count","observed_at"],"additionalProperties":false},"description":"Up to 5 posts of the last 30 days, most viewed first."},"recent_posts":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["instagram","tiktok","youtube","threads","facebook","x","linkedin","snapchat"],"description":"The social platform.","examples":["tiktok"]},"platform_post_id":{"type":"string","description":"The platform's own id of the post.","examples":["7431852096741258240"]},"platform_account_id":{"type":"string","description":"The platform's own id of the author.","examples":["6812345098765432101"]},"account_handle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The author's handle, without the @.","examples":["acme_studio"]},"account_avatar":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"A signed link to socialdata's copy of the image, valid until expires_at.","examples":["https://media.socialdata.example/images/7431852096741258240.webp?signature=abc123"]},"expires_at":{"type":"string","description":"When url stops working, 1 hour after the answer.","examples":["2026-11-26T14:00:00Z"]},"width":{"type":"integer","description":"The width in pixels.","examples":[512]},"height":{"type":"integer","description":"The height in pixels.","examples":[512]}},"required":["url","expires_at","width","height"],"additionalProperties":false},{"type":"null"}],"description":"The author's newest profile picture as WebP within 512 by 512 pixels, or null until socialdata stores one."},"post_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The link to the post.","examples":["https://www.tiktok.com/@acme_studio/video/7431852096741258240"]},"media_type":{"anyOf":[{"type":"string","enum":["image","carousel","short_video","long_video","text"],"description":"The kind of post, where short_video is a Short, a Reel, a TikTok video, a Facebook reel, or a Spotlight.","examples":["short_video"]},{"type":"null"}]},"media_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"The number of slides in a carousel.","examples":[1]},"posted_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"When the post was published."},"duration_ms":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"The length of the video in milliseconds.","examples":[31500]},"is_paid_partnership":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"true when the platform labels the post as a paid partnership.","examples":[false]},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The title, on platforms that have one.","examples":[null]},"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The caption, as written.","examples":["Unboxing the new Acme camera #unboxing #tech"]},"hashtags":{"type":"array","items":{"type":"string"},"description":"The hashtags of the caption, in lower case, without the #.","examples":[["unboxing","tech"]]},"view_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Views.","examples":[184300]},"like_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Likes.","examples":[12650]},"comment_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Comments.","examples":[341]},"share_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Shares.","examples":[905]},"save_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Saves.","examples":[1210]},"repost_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Reposts.","examples":[null]},"quote_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Quotes, on X and Threads.","examples":[null]},"observed_at":{"type":"string","description":"When socialdata read these counts.","examples":["2026-11-26T14:00:00Z"]}},"required":["platform","platform_post_id","platform_account_id","account_handle","account_avatar","post_url","media_type","media_count","posted_at","duration_ms","is_paid_partnership","title","caption","hashtags","view_count","like_count","comment_count","share_count","save_count","repost_count","quote_count","observed_at"],"additionalProperties":false},"description":"Up to 12 posts, newest first."}},"required":["kind","platform","platform_account_id","profile_url","avatar","handle","handle_observed_at","display_name","display_name_observed_at","biography","biography_observed_at","external_url","external_url_observed_at","is_verified","is_verified_observed_at","is_private","is_private_observed_at","follower_count","follower_count_observed_at","follower_count_precision","following_count","following_count_observed_at","post_count","post_count_observed_at","total_like_count","total_like_count_observed_at","total_view_count","total_view_count_observed_at","availability","tracking","first_observed_at","last_observed_at","snapshot_count","growth_7d","growth_30d","posts_30d","posts_per_week_30d","median_view_count_30d","is_partial","top_posts","recent_posts"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["post"],"description":"This card is a post.","examples":["post"]},"platform":{"type":"string","enum":["instagram","tiktok","youtube","threads","facebook","x","linkedin","snapchat"],"description":"The social platform.","examples":["tiktok"]},"platform_post_id":{"type":"string","description":"The platform's own id of the post.","examples":["7431852096741258240"]},"platform_account_id":{"type":"string","description":"The platform's own id of the author.","examples":["6812345098765432101"]},"account_handle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The author's handle, without the @.","examples":["acme_studio"]},"account_avatar":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"A signed link to socialdata's copy of the image, valid until expires_at.","examples":["https://media.socialdata.example/images/7431852096741258240.webp?signature=abc123"]},"expires_at":{"type":"string","description":"When url stops working, 1 hour after the answer.","examples":["2026-11-26T14:00:00Z"]},"width":{"type":"integer","description":"The width in pixels.","examples":[512]},"height":{"type":"integer","description":"The height in pixels.","examples":[512]}},"required":["url","expires_at","width","height"],"additionalProperties":false},{"type":"null"}],"description":"The author's newest profile picture as WebP within 512 by 512 pixels, or null until socialdata stores one."},"post_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The link to the post.","examples":["https://www.tiktok.com/@acme_studio/video/7431852096741258240"]},"media_type":{"anyOf":[{"type":"string","enum":["image","carousel","short_video","long_video","text"],"description":"The kind of post, where short_video is a Short, a Reel, a TikTok video, a Facebook reel, or a Spotlight.","examples":["short_video"]},{"type":"null"}]},"media_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"The number of slides in a carousel.","examples":[1]},"posted_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"When the post was published."},"duration_ms":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"The length of the video in milliseconds.","examples":[31500]},"is_paid_partnership":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"true when the platform labels the post as a paid partnership.","examples":[false]},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The title, on platforms that have one.","examples":[null]},"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The caption, as written.","examples":["Unboxing the new Acme camera #unboxing #tech"]},"hashtags":{"type":"array","items":{"type":"string"},"description":"The hashtags of the caption, in lower case, without the #.","examples":[["unboxing","tech"]]},"view_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Views.","examples":[184300]},"like_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Likes.","examples":[12650]},"comment_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Comments.","examples":[341]},"share_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Shares.","examples":[905]},"save_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Saves.","examples":[1210]},"repost_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Reposts.","examples":[null]},"quote_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Quotes, on X and Threads.","examples":[null]},"observed_at":{"type":"string","description":"When socialdata read these counts.","examples":["2026-11-26T14:00:00Z"]},"availability":{"type":"object","properties":{"status":{"type":"string","enum":["available","private","restricted","unavailable"],"description":"Whether socialdata can read the item on the platform.","examples":["available"]},"checked_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"The last time a read gave a clear answer about availability."},"last_ok_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"The last time socialdata could read it."}},"required":["status","checked_at","last_ok_at"],"additionalProperties":false,"description":"Whether the account or post can be read on the platform."},"first_observed_at":{"type":"string","description":"When socialdata first read the post.","examples":["2026-11-26T14:00:00Z"]},"snapshot_count":{"type":"integer","description":"How many times socialdata has measured the post.","examples":[14]},"views_first_24h":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Views in the first 24 hours, or null unless socialdata measured the post 18 to 24 hours after it was published.","examples":[96400]},"account_median_view_count_30d":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"The median views of the author's posts of the last 30 days.","examples":[52000]},"outlier_score":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"view_count divided by the author's median views over 30 days, so a score above 1 beats the author's typical post.","examples":[3.5]},"view_gain_7d":{"anyOf":[{"type":"object","properties":{"window_start":{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},"window_end":{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},"view_count_gained":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Views gained in the window.","examples":[1250]},"is_partial":{"type":"boolean","description":"true when socialdata first measured the post inside the window, so the gain covers only part of it.","examples":[false]},"start_observed_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"The measurement used for the start of the window."},"end_observed_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"The measurement used for the end of the window."}},"required":["window_start","window_end","view_count_gained","is_partial","start_observed_at","end_observed_at"],"additionalProperties":false,"description":"Views gained in a window that ends now, or null when a measurement is missing."},{"type":"null"}]},"view_gain_30d":{"anyOf":[{"type":"object","properties":{"window_start":{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},"window_end":{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},"view_count_gained":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Views gained in the window.","examples":[1250]},"is_partial":{"type":"boolean","description":"true when socialdata first measured the post inside the window, so the gain covers only part of it.","examples":[false]},"start_observed_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"The measurement used for the start of the window."},"end_observed_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"The measurement used for the end of the window."}},"required":["window_start","window_end","view_count_gained","is_partial","start_observed_at","end_observed_at"],"additionalProperties":false,"description":"Views gained in a window that ends now, or null when a measurement is missing."},{"type":"null"}]},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"A signed link to socialdata's copy of the image, valid until expires_at.","examples":["https://media.socialdata.example/images/7431852096741258240.webp?signature=abc123"]},"expires_at":{"type":"string","description":"When url stops working, 1 hour after the answer.","examples":["2026-11-26T14:00:00Z"]},"width":{"type":"integer","description":"The width in pixels.","examples":[512]},"height":{"type":"integer","description":"The height in pixels.","examples":[512]}},"required":["url","expires_at","width","height"],"additionalProperties":false},{"type":"null"}],"description":"The preview image of the post as WebP within 512 by 512 pixels, or null until socialdata stores one."},"media_status":{"type":"string","enum":["stored","pending","none","failed","skipped","not_permitted"],"description":"Whether socialdata holds copies of the post's files, which media lists only when this is stored.","examples":["stored"]},"media":{"type":"array","items":{"type":"object","properties":{"item_index":{"type":"integer","description":"The slide number in a carousel, from 1, or 0 for a post with one file.","examples":[0]},"kind":{"type":"string","enum":["video","image"],"description":"The kind of file.","examples":["video"]},"bytes":{"type":"integer","description":"The size of the file in bytes.","examples":[4812044]},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The length of the video in milliseconds, or null for an image.","examples":[31500]},"width":{"type":"integer","description":"The width in pixels.","examples":[1080]},"height":{"type":"integer","description":"The height in pixels.","examples":[1920]},"url":{"type":"string","description":"A signed link to socialdata's copy of the file, valid until expires_at.","examples":["https://media.socialdata.example/tiktok/7431852096741258240/0.mp4?signature=abc123"]},"expires_at":{"type":"string","description":"When url stops working, 1 hour after the answer.","examples":["2026-11-26T14:00:00Z"]}},"required":["item_index","kind","bytes","duration_ms","width","height","url","expires_at"],"additionalProperties":false},"description":"One entry per file, in slide order, when media_status is stored."},"text_spoken":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The words spoken in the video, or null until socialdata transcribes it.","examples":["Today we are unboxing the new Acme camera."]},"text_on_screen":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The words shown on screen or on the images, or null until socialdata reads them.","examples":["Acme camera unboxing"]}},"required":["kind","platform","platform_post_id","platform_account_id","account_handle","account_avatar","post_url","media_type","media_count","posted_at","duration_ms","is_paid_partnership","title","caption","hashtags","view_count","like_count","comment_count","share_count","save_count","repost_count","quote_count","observed_at","availability","first_observed_at","snapshot_count","views_first_24h","account_median_view_count_30d","outlier_score","view_gain_7d","view_gain_30d","thumbnail","media_status","media","text_spoken","text_on_screen"],"additionalProperties":false}],"description":"The account card or the post card, as kind says."}},"required":["meta","result"],"additionalProperties":false}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["invalid_argument"]},"field":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","field","message","retryable","trace_id","credits_spent"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["invalid_ref"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["unsupported_platform"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["unsupported_media_type"]},"media_type":{"type":"string","enum":["long_video"],"description":"The kind of post that v1 does not cover."},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","media_type","message","retryable","trace_id","credits_spent"],"additionalProperties":false}]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["not_found"]},"target":{"type":"string","enum":["account","post"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","target","message","retryable","trace_id","credits_spent"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["private"]},"target":{"type":"string","enum":["account","post"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","target","message","retryable","trace_id","credits_spent"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["restricted"]},"target":{"type":"string","enum":["account","post"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","target","message","retryable","trace_id","credits_spent"],"additionalProperties":false}]}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["ambiguous_handle"]},"candidates":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["instagram","tiktok","youtube","threads","facebook","x","linkedin","snapchat"],"description":"The social platform.","examples":["instagram"]},"platform_account_id":{"type":"string","description":"The platform's own id of the account.","examples":["1789456123"]},"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The handle, without the @.","examples":["acme.co"]},"profile_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The link to the profile.","examples":["https://www.instagram.com/acme.co/"]}},"required":["platform","platform_account_id","handle","profile_url"],"additionalProperties":false}},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","candidates","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["budget_exceeded"]},"limit":{"type":"string","enum":["organization","lookup_share","day"],"description":"The limit that refused the call."},"resets_at":{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","limit","resets_at","message","retryable","trace_id","credits_spent"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"]},"retry_after_s":{"type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","retry_after_s","message","retryable","trace_id","credits_spent"],"additionalProperties":false}]}}}},"501":{"description":"The operation is not built yet. The service answers this only while the build is in progress.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["not_implemented"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false,"description":"The operation is not built yet. The service answers this only while the build is in progress."}}}},"502":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["upstream_failed"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}}},"description":"Returns the current counts, profile or caption, and growth of one account or post that you name by a link, a handle, or an id. Use it when you can name the item, and use search_posts or search_accounts to find items you cannot name.","summary":"lookup","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":2048,"description":"One account or post, as a link, platform:@handle, platform:account:ID, or platform:post:ID.","examples":["https://www.tiktok.com/@acme_studio"]},"max_age_s":{"type":"integer","minimum":0,"description":"The oldest data you accept, in seconds, beyond which lookup reads the platform again and can cost credits.","examples":[86400]}},"required":["ref"],"additionalProperties":false}}},"required":true}} ``` # account_history (/docs/reference/account_history) GET /v1/accounts/{account}/history Returns the followers, posts, likes, and views of one account per hour or per day, and its past handles, names, and biographies. Use it for growth over a date range, and lookup for the current numbers. The OpenAPI operation, with its parameters, its request body, and every answer that it declares: ```json {"tags":["v1"],"operationId":"account_history","parameters":[{"name":"account","in":"path","schema":{"type":"string","description":"The id of a account, from lookup or a search.","examples":["instagram:account:1789456123"]},"required":true},{"name":"from","in":"query","schema":{"type":"string","description":"The start of the range, 30 days before to by default.","examples":["2026-11-26T14:00:00Z"]},"required":false},{"name":"to","in":"query","schema":{"type":"string","description":"The end of the range, now by default.","examples":["2026-11-26T14:00:00Z"]},"required":false},{"name":"grain","in":"query","schema":{"type":"string","enum":["hour","day"],"description":"One point per hour, for a range of at most 14 days, or per UTC day, the default, for at most 3,660 days.","examples":["day"]},"required":false}],"security":[{"type":"apiKey","name":"x-api-key","in":"header"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"as_of":{"type":"string","description":"The answer holds no data read after this time.","examples":["2026-11-26T14:00:00Z"]},"source":{"type":"string","enum":["store","live","vendor_cache"],"description":"Where the data came from: data that socialdata held, a live read of the platform, or a recent copy from its data provider.","examples":["store"]},"credits_spent":{"type":"integer","description":"The credits that this call cost.","examples":[0]},"credits_left_today":{"type":"integer","description":"The credits that your organization can still spend on lookups today (UTC).","examples":[30]},"trace_id":{"type":"string","description":"The id of this call, to quote when you report a problem.","examples":["dd4ea85c713694073f9ab127c28f2318"]},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["stale","handle_changed","first_observation","partial_backfill","counter_decreased","mixed_platforms"],"description":"The kind of note.","examples":["first_observation"]},"message":{"type":"string","description":"The warning, for a person or an agent to read.","examples":["The service saw this target for the first time in this call."]}},"required":["code","message"],"additionalProperties":false,"description":"A note about an answer that still succeeded."},"description":"Notes about the answer, usually none."}},"required":["as_of","source","credits_spent","credits_left_today","trace_id","warnings"],"additionalProperties":false,"description":"Facts about this call, in every answer."},"account":{"type":"object","properties":{"platform":{"type":"string","enum":["instagram","tiktok","youtube","threads","facebook","x","linkedin","snapchat"],"description":"The social platform.","examples":["instagram"]},"platform_account_id":{"type":"string","description":"The platform's own id of the account.","examples":["1789456123"]},"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The handle, without the @.","examples":["acme.co"]},"profile_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The link to the profile.","examples":["https://www.instagram.com/acme.co/"]}},"required":["platform","platform_account_id","handle","profile_url"],"additionalProperties":false},"grain":{"type":"string","enum":["hour","day"],"description":"One point per hour or per UTC day.","examples":["day"]},"points":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","description":"The start of the hour, or of the UTC day.","examples":["2026-11-26T14:00:00Z"]},"observed_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"The last measurement in this hour or day, or null when there is none."},"follower_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"A count that the platform shows, or null when the platform does not show it.","examples":[48210]},"following_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"A count that the platform shows, or null when the platform does not show it.","examples":[48210]},"post_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"A count that the platform shows, or null when the platform does not show it.","examples":[48210]},"total_like_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"A count that the platform shows, or null when the platform does not show it.","examples":[48210]},"total_view_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"A count that the platform shows, or null when the platform does not show it.","examples":[48210]}},"required":["at","observed_at","follower_count","following_count","post_count","total_like_count","total_view_count"],"additionalProperties":false},"description":"One point per hour or day from from to to, oldest first."},"profile_history":{"type":"array","items":{"type":"object","properties":{"profile_version":{"type":"integer","description":"1 for the oldest known profile, then counting up.","examples":[1]},"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The handle in this period.","examples":["acme.co"]},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name in this period.","examples":["Acme Studio"]},"biography":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The biography in this period.","examples":["Small cameras for long trips."]},"external_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The profile link in this period.","examples":["https://acme.example/"]},"first_observed_at":{"type":"string","description":"When socialdata first saw this profile.","examples":["2026-11-26T14:00:00Z"]},"last_observed_at":{"type":"string","description":"When socialdata last saw this profile.","examples":["2026-11-26T14:00:00Z"]}},"required":["profile_version","handle","display_name","biography","external_url","first_observed_at","last_observed_at"],"additionalProperties":false},"description":"Every handle, display name, biography, and link that socialdata has seen, oldest first."}},"required":["meta","account","grain","points","profile_history"],"additionalProperties":false}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_argument"]},"field":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","field","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["not_stored"]},"target":{"type":"string","enum":["account","post","watchlist"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","target","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"]},"retry_after_s":{"type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","retry_after_s","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"501":{"description":"The operation is not built yet. The service answers this only while the build is in progress.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["not_implemented"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false,"description":"The operation is not built yet. The service answers this only while the build is in progress."}}}}},"description":"Returns the followers, posts, likes, and views of one account per hour or per day, and its past handles, names, and biographies. Use it for growth over a date range, and lookup for the current numbers.","summary":"account_history"} ``` # post_history (/docs/reference/post_history) GET /v1/posts/{post}/history Returns the views, likes, comments, shares, and saves of one post at each measurement, every version of its caption, and the post's ids, link, and availability. Use it to see how a post grew, and lookup for its current numbers. The OpenAPI operation, with its parameters, its request body, and every answer that it declares: ```json {"tags":["v1"],"operationId":"post_history","parameters":[{"name":"post","in":"path","schema":{"type":"string","description":"The id of a post, from lookup or a search.","examples":["tiktok:post:7431852096741258240"]},"required":true}],"security":[{"type":"apiKey","name":"x-api-key","in":"header"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"as_of":{"type":"string","description":"The answer holds no data read after this time.","examples":["2026-11-26T14:00:00Z"]},"source":{"type":"string","enum":["store","live","vendor_cache"],"description":"Where the data came from: data that socialdata held, a live read of the platform, or a recent copy from its data provider.","examples":["store"]},"credits_spent":{"type":"integer","description":"The credits that this call cost.","examples":[0]},"credits_left_today":{"type":"integer","description":"The credits that your organization can still spend on lookups today (UTC).","examples":[30]},"trace_id":{"type":"string","description":"The id of this call, to quote when you report a problem.","examples":["dd4ea85c713694073f9ab127c28f2318"]},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["stale","handle_changed","first_observation","partial_backfill","counter_decreased","mixed_platforms"],"description":"The kind of note.","examples":["first_observation"]},"message":{"type":"string","description":"The warning, for a person or an agent to read.","examples":["The service saw this target for the first time in this call."]}},"required":["code","message"],"additionalProperties":false,"description":"A note about an answer that still succeeded."},"description":"Notes about the answer, usually none."}},"required":["as_of","source","credits_spent","credits_left_today","trace_id","warnings"],"additionalProperties":false,"description":"Facts about this call, in every answer."},"post":{"type":"object","properties":{"platform":{"type":"string","enum":["instagram","tiktok","youtube","threads","facebook","x","linkedin","snapchat"],"description":"The social platform.","examples":["tiktok"]},"platform_post_id":{"type":"string","description":"The platform's own id of the post.","examples":["7431852096741258240"]},"platform_account_id":{"type":"string","description":"The platform's own id of the author.","examples":["6812345098765432101"]},"post_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The link to the post.","examples":["https://www.tiktok.com/@acme_studio/video/7431852096741258240"]},"availability":{"type":"object","properties":{"status":{"type":"string","enum":["available","private","restricted","unavailable"],"description":"Whether socialdata can read the item on the platform.","examples":["available"]},"checked_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"The last time a read gave a clear answer about availability."},"last_ok_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"The last time socialdata could read it."}},"required":["status","checked_at","last_ok_at"],"additionalProperties":false,"description":"Whether the account or post can be read on the platform."}},"required":["platform","platform_post_id","platform_account_id","post_url","availability"],"additionalProperties":false,"description":"The post's ids, its link, and whether it can be read. lookup returns its current card."},"points":{"type":"array","items":{"type":"object","properties":{"observed_at":{"type":"string","description":"When socialdata measured the post.","examples":["2026-11-26T14:00:00Z"]},"view_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"A count that the platform shows, or null when the platform does not show it.","examples":[48210]},"like_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"A count that the platform shows, or null when the platform does not show it.","examples":[48210]},"comment_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"A count that the platform shows, or null when the platform does not show it.","examples":[48210]},"share_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"A count that the platform shows, or null when the platform does not show it.","examples":[48210]},"save_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"A count that the platform shows, or null when the platform does not show it.","examples":[48210]},"repost_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"A count that the platform shows, or null when the platform does not show it.","examples":[48210]},"quote_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"A count that the platform shows, or null when the platform does not show it.","examples":[48210]}},"required":["observed_at","view_count","like_count","comment_count","share_count","save_count","repost_count","quote_count"],"additionalProperties":false},"description":"One point per measurement, oldest first, at most the newest 1,000."},"content_history":{"type":"array","items":{"type":"object","properties":{"content_version":{"type":"integer","description":"1 for the oldest known version, then counting up.","examples":[1]},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The title in this version.","examples":[null]},"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The caption in this version.","examples":["Unboxing the new Acme camera #unboxing #tech"]},"first_observed_at":{"type":"string","description":"When socialdata first saw this version.","examples":["2026-11-26T14:00:00Z"]},"last_observed_at":{"type":"string","description":"When socialdata last saw this version.","examples":["2026-11-26T14:00:00Z"]}},"required":["content_version","title","caption","first_observed_at","last_observed_at"],"additionalProperties":false},"description":"Every title and caption that socialdata has seen, oldest first."}},"required":["meta","post","points","content_history"],"additionalProperties":false}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_argument"]},"field":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","field","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["not_stored"]},"target":{"type":"string","enum":["account","post","watchlist"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","target","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"]},"retry_after_s":{"type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","retry_after_s","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"501":{"description":"The operation is not built yet. The service answers this only while the build is in progress.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["not_implemented"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false,"description":"The operation is not built yet. The service answers this only while the build is in progress."}}}}},"description":"Returns the views, likes, comments, shares, and saves of one post at each measurement, every version of its caption, and the post's ids, link, and availability. Use it to see how a post grew, and lookup for its current numbers.","summary":"post_history"} ``` # search_posts (/docs/reference/search_posts) POST /v1/posts/search Returns the posts that socialdata holds whose caption, hashtags, or video match your words, filtered and sorted by any count or gain. Use it to find or rank posts, and lookup for one post you can name. The OpenAPI operation, with its parameters, its request body, and every answer that it declares: ```json {"tags":["v1"],"operationId":"search_posts","parameters":[],"security":[{"type":"apiKey","name":"x-api-key","in":"header"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"as_of":{"type":"string","description":"The answer holds no data read after this time.","examples":["2026-11-26T14:00:00Z"]},"source":{"type":"string","enum":["store","live","vendor_cache"],"description":"Where the data came from: data that socialdata held, a live read of the platform, or a recent copy from its data provider.","examples":["store"]},"credits_spent":{"type":"integer","description":"The credits that this call cost.","examples":[0]},"credits_left_today":{"type":"integer","description":"The credits that your organization can still spend on lookups today (UTC).","examples":[30]},"trace_id":{"type":"string","description":"The id of this call, to quote when you report a problem.","examples":["dd4ea85c713694073f9ab127c28f2318"]},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["stale","handle_changed","first_observation","partial_backfill","counter_decreased","mixed_platforms"],"description":"The kind of note.","examples":["first_observation"]},"message":{"type":"string","description":"The warning, for a person or an agent to read.","examples":["The service saw this target for the first time in this call."]}},"required":["code","message"],"additionalProperties":false,"description":"A note about an answer that still succeeded."},"description":"Notes about the answer, usually none."}},"required":["as_of","source","credits_spent","credits_left_today","trace_id","warnings"],"additionalProperties":false,"description":"Facts about this call, in every answer."},"posts":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["instagram","tiktok","youtube","threads","facebook","x","linkedin","snapchat"],"description":"The social platform.","examples":["tiktok"]},"platform_post_id":{"type":"string","description":"The platform's own id of the post.","examples":["7431852096741258240"]},"platform_account_id":{"type":"string","description":"The platform's own id of the author.","examples":["6812345098765432101"]},"account_handle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The author's handle, without the @.","examples":["acme_studio"]},"account_avatar":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"A signed link to socialdata's copy of the image, valid until expires_at.","examples":["https://media.socialdata.example/images/7431852096741258240.webp?signature=abc123"]},"expires_at":{"type":"string","description":"When url stops working, 1 hour after the answer.","examples":["2026-11-26T14:00:00Z"]},"width":{"type":"integer","description":"The width in pixels.","examples":[512]},"height":{"type":"integer","description":"The height in pixels.","examples":[512]}},"required":["url","expires_at","width","height"],"additionalProperties":false},{"type":"null"}],"description":"The author's newest profile picture as WebP within 512 by 512 pixels, or null until socialdata stores one."},"post_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The link to the post.","examples":["https://www.tiktok.com/@acme_studio/video/7431852096741258240"]},"media_type":{"anyOf":[{"type":"string","enum":["image","carousel","short_video","long_video","text"],"description":"The kind of post, where short_video is a Short, a Reel, a TikTok video, a Facebook reel, or a Spotlight.","examples":["short_video"]},{"type":"null"}]},"media_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"The number of slides in a carousel.","examples":[1]},"posted_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"When the post was published."},"duration_ms":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"The length of the video in milliseconds.","examples":[31500]},"is_paid_partnership":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"true when the platform labels the post as a paid partnership.","examples":[false]},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The title, on platforms that have one.","examples":[null]},"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The caption, as written.","examples":["Unboxing the new Acme camera #unboxing #tech"]},"hashtags":{"type":"array","items":{"type":"string"},"description":"The hashtags of the caption, in lower case, without the #.","examples":[["unboxing","tech"]]},"view_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Views.","examples":[184300]},"like_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Likes.","examples":[12650]},"comment_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Comments.","examples":[341]},"share_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Shares.","examples":[905]},"save_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Saves.","examples":[1210]},"repost_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Reposts.","examples":[null]},"quote_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Quotes, on X and Threads.","examples":[null]},"observed_at":{"type":"string","description":"When socialdata read these counts.","examples":["2026-11-26T14:00:00Z"]},"first_observed_at":{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},"view_count_gained_1d":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The change in the window that ends at windows_synced_at, or null when a measurement is missing.","examples":[1250]},"view_count_gained_7d":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The change in the window that ends at windows_synced_at, or null when a measurement is missing.","examples":[1250]},"view_count_gained_30d":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The change in the window that ends at windows_synced_at, or null when a measurement is missing.","examples":[1250]},"views_first_24h":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"A count that the platform shows, or null when the platform does not show it.","examples":[48210]},"outlier_score":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"null when the base is 0 or unknown.","examples":[2.4]},"text_spoken":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Up to 500 characters of the spoken words around the match, or null until socialdata transcribes the video.","examples":["Today we are unboxing the new Acme camera."]},"text_on_screen":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Up to 500 characters of the on-screen words around the match, or null until socialdata reads them.","examples":["Acme camera unboxing"]},"matched_in":{"type":"array","items":{"type":"string","enum":["title","caption","text_on_screen","text_spoken","hashtags"],"description":"A field that q can match.","examples":["caption"]},"description":"The fields where q matched.","examples":[["caption","text_spoken"]]},"highlights":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["title","caption","text_on_screen","text_spoken"]},"start":{"type":"integer","minimum":0,"description":"Where the match starts, in Unicode code points from the start of the field.","examples":[10]},"length":{"type":"integer","exclusiveMinimum":0,"description":"The length of the match in Unicode code points.","examples":[8]}},"required":["field","start","length"],"additionalProperties":false},"description":"Where q matched, as offsets into the text of each field."},"thumbnail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"A signed link to socialdata's copy of the image, valid until expires_at.","examples":["https://media.socialdata.example/images/7431852096741258240.webp?signature=abc123"]},"expires_at":{"type":"string","description":"When url stops working, 1 hour after the answer.","examples":["2026-11-26T14:00:00Z"]},"width":{"type":"integer","description":"The width in pixels.","examples":[512]},"height":{"type":"integer","description":"The height in pixels.","examples":[512]}},"required":["url","expires_at","width","height"],"additionalProperties":false},{"type":"null"}],"description":"The preview image of the post as WebP within 512 by 512 pixels, or null until socialdata stores one."},"media_status":{"type":"string","enum":["stored","pending","none","failed","skipped","not_permitted"],"description":"Whether socialdata holds copies of the post's files, which media lists only when this is stored.","examples":["stored"]},"media":{"type":"array","items":{"type":"object","properties":{"item_index":{"type":"integer","description":"The slide number in a carousel, from 1, or 0 for a post with one file.","examples":[0]},"kind":{"type":"string","enum":["video","image"],"description":"The kind of file.","examples":["video"]},"bytes":{"type":"integer","description":"The size of the file in bytes.","examples":[4812044]},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The length of the video in milliseconds, or null for an image.","examples":[31500]},"width":{"type":"integer","description":"The width in pixels.","examples":[1080]},"height":{"type":"integer","description":"The height in pixels.","examples":[1920]},"url":{"type":"string","description":"A signed link to socialdata's copy of the file, valid until expires_at.","examples":["https://media.socialdata.example/tiktok/7431852096741258240/0.mp4?signature=abc123"]},"expires_at":{"type":"string","description":"When url stops working, 1 hour after the answer.","examples":["2026-11-26T14:00:00Z"]}},"required":["item_index","kind","bytes","duration_ms","width","height","url","expires_at"],"additionalProperties":false},"description":"One entry per file, only with include media and when media_status is stored."},"synced_at":{"type":"string","description":"When the search results last took the whole row, usually within 5 minutes of a new measurement.","examples":["2026-11-26T14:00:00Z"]},"windows_synced_at":{"type":"string","description":"When socialdata last computed the window values of this row, which end at this time.","examples":["2026-11-26T14:00:00Z"]}},"required":["platform","platform_post_id","platform_account_id","account_handle","account_avatar","post_url","media_type","media_count","posted_at","duration_ms","is_paid_partnership","title","caption","hashtags","view_count","like_count","comment_count","share_count","save_count","repost_count","quote_count","observed_at","first_observed_at","view_count_gained_1d","view_count_gained_7d","view_count_gained_30d","views_first_24h","outlier_score","text_spoken","text_on_screen","matched_in","highlights","thumbnail","media_status","synced_at","windows_synced_at"],"additionalProperties":false},"description":"One page of posts, in sort order."},"total_estimate":{"type":"integer","description":"About how many posts match.","examples":[1840]},"facets":{"type":"object","properties":{"platform":{"type":"object","additionalProperties":{"type":"integer"}},"media_type":{"type":"object","additionalProperties":{"type":"integer"}},"has_speech":{"type":"object","additionalProperties":{"type":"integer"}}},"additionalProperties":false,"description":"The number of matching posts per value of each field in facets. Only when you send facets. A value with no posts is not listed.","examples":[{"platform":{"instagram":31,"tiktok":12}}]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The cursor of the next page, or null on the last page.","examples":[null]}},"required":["meta","posts","total_estimate","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["invalid_argument"]},"field":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","field","message","retryable","trace_id","credits_spent"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["invalid_ref"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["unsupported_platform"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false}]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["not_stored"]},"target":{"type":"string","enum":["account","post","watchlist"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","target","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["ambiguous_handle"]},"candidates":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["instagram","tiktok","youtube","threads","facebook","x","linkedin","snapchat"],"description":"The social platform.","examples":["instagram"]},"platform_account_id":{"type":"string","description":"The platform's own id of the account.","examples":["1789456123"]},"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The handle, without the @.","examples":["acme.co"]},"profile_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The link to the profile.","examples":["https://www.instagram.com/acme.co/"]}},"required":["platform","platform_account_id","handle","profile_url"],"additionalProperties":false}},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","candidates","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"]},"retry_after_s":{"type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","retry_after_s","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"501":{"description":"The operation is not built yet. The service answers this only while the build is in progress.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["not_implemented"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false,"description":"The operation is not built yet. The service answers this only while the build is in progress."}}}},"503":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["search_unavailable"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}}},"description":"Returns the posts that socialdata holds whose caption, hashtags, or video match your words, filtered and sorted by any count or gain. Use it to find or rank posts, and lookup for one post you can name.","summary":"search_posts","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"q":{"type":"string","minLength":1,"maxLength":200,"description":"Words to find in the title, caption, hashtags, spoken words, and on-screen words, up to 200 characters.","examples":["unboxing camera"]},"filters":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"field":{"type":"string","enum":["view_count","like_count","comment_count","share_count","save_count","repost_count","quote_count","duration_ms","media_count","view_count_gained_1d","view_count_gained_7d","view_count_gained_30d","views_first_24h","outlier_score"]},"op":{"type":"string","enum":["eq","gt","gte","lt","lte"]},"value":{"type":"number","description":"The number to compare with.","examples":[100000]}},"required":["field","op","value"],"additionalProperties":false,"description":"Compares a number field, and a row whose value is unknown never passes."},{"type":"object","properties":{"field":{"type":"string","enum":["posted_at","first_observed_at","observed_at"]},"op":{"type":"string","enum":["gte","lt"]},"value":{"type":"string","description":"The time to compare with.","examples":["2026-11-26T14:00:00Z"]}},"required":["field","op","value"],"additionalProperties":false,"description":"Compares a time field: gte for at or after, lt for before."},{"type":"object","properties":{"field":{"type":"string","enum":["platform","media_type","platform_account_id","account_handle","platform_post_id","language"]},"op":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string"},"description":"1 to 100 values.","examples":[["tiktok","instagram"]],"minItems":1,"maxItems":100}},"required":["field","op","value"],"additionalProperties":false,"description":"Keeps the rows whose field is (in) or is not (not_in) one of the values."},{"type":"object","properties":{"field":{"type":"string","enum":["hashtags"]},"op":{"type":"string","enum":["has_any","has_all"],"description":"has_any matches a post with at least one of the hashtags, and has_all a post with every one.","examples":["has_any"]},"value":{"type":"array","items":{"type":"string"},"description":"1 to 100 hashtags, in lower case, without the #.","examples":[["unboxing"]],"minItems":1,"maxItems":100}},"required":["field","op","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["is_paid_partnership","has_speech","has_screen_text"]},"op":{"type":"string","enum":["eq"]},"value":{"type":"boolean","description":"The value to keep.","examples":[true]}},"required":["field","op","value"],"additionalProperties":false,"description":"Keeps the rows where a true or false field has this value."},{"type":"object","properties":{"field":{"type":"string","enum":["view_count","like_count","comment_count","share_count","save_count","repost_count","quote_count","duration_ms","media_count","view_count_gained_1d","view_count_gained_7d","view_count_gained_30d","views_first_24h","outlier_score","posted_at","first_observed_at","observed_at","media_type","is_paid_partnership"]},"op":{"type":"string","enum":["is_null","is_not_null"]}},"required":["field","op"],"additionalProperties":false,"description":"Keeps the rows where the field is unknown (is_null) or known (is_not_null)."}]},"description":"Up to 20 filters that a post must all pass.","examples":[[{"field":"view_count","op":"gte","value":100000}]],"maxItems":20},"account":{"type":"string","minLength":1,"maxLength":2048,"description":"Only the posts of this account, as a ref.","examples":["tiktok:@acme_studio"]},"watchlist":{"type":"string","minLength":1,"maxLength":100,"description":"Only the posts of the accounts in this watchlist.","examples":["competitors"]},"sort":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["view_count","like_count","comment_count","share_count","save_count","repost_count","quote_count","duration_ms","media_count","view_count_gained_1d","view_count_gained_7d","view_count_gained_30d","views_first_24h","outlier_score","posted_at","first_observed_at","observed_at","relevance"]},"dir":{"type":"string","enum":["asc","desc"],"description":"The sort direction, desc by default.","examples":["desc"]}},"required":["field"],"additionalProperties":false},"description":"Up to 3 sort keys in order, by default relevance with q and view_count without.","examples":[[{"field":"view_count_gained_7d","dir":"desc"}]],"minItems":1,"maxItems":3},"include":{"type":"array","items":{"type":"string","enum":["media"]},"description":"Add media to get the media links of each post, when your organization may read media.","examples":[["media"]],"minItems":1,"maxItems":1},"facets":{"type":"array","items":{"type":"string","enum":["platform","media_type","has_speech"]},"description":"Fields to count the matching posts by. Each count ignores the filters on its own field.","examples":[["platform","media_type"]],"minItems":1,"maxItems":3},"limit":{"type":"integer","minimum":1,"maximum":100,"description":"Items per page, from 1 to 100.","default":20,"examples":[20]},"cursor":{"type":"string","description":"next_cursor of the previous page, left out for the first page."}},"additionalProperties":false}}},"required":true}} ``` # search_accounts (/docs/reference/search_accounts) POST /v1/accounts/search Returns the accounts that socialdata holds whose handle, name, or biography match your words, filtered and sorted by any count or growth. Use it to find or rank accounts, and lookup for one account you can name. The OpenAPI operation, with its parameters, its request body, and every answer that it declares: ```json {"tags":["v1"],"operationId":"search_accounts","parameters":[],"security":[{"type":"apiKey","name":"x-api-key","in":"header"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"as_of":{"type":"string","description":"The answer holds no data read after this time.","examples":["2026-11-26T14:00:00Z"]},"source":{"type":"string","enum":["store","live","vendor_cache"],"description":"Where the data came from: data that socialdata held, a live read of the platform, or a recent copy from its data provider.","examples":["store"]},"credits_spent":{"type":"integer","description":"The credits that this call cost.","examples":[0]},"credits_left_today":{"type":"integer","description":"The credits that your organization can still spend on lookups today (UTC).","examples":[30]},"trace_id":{"type":"string","description":"The id of this call, to quote when you report a problem.","examples":["dd4ea85c713694073f9ab127c28f2318"]},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["stale","handle_changed","first_observation","partial_backfill","counter_decreased","mixed_platforms"],"description":"The kind of note.","examples":["first_observation"]},"message":{"type":"string","description":"The warning, for a person or an agent to read.","examples":["The service saw this target for the first time in this call."]}},"required":["code","message"],"additionalProperties":false,"description":"A note about an answer that still succeeded."},"description":"Notes about the answer, usually none."}},"required":["as_of","source","credits_spent","credits_left_today","trace_id","warnings"],"additionalProperties":false,"description":"Facts about this call, in every answer."},"accounts":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["instagram","tiktok","youtube","threads","facebook","x","linkedin","snapchat"],"description":"The social platform.","examples":["tiktok"]},"platform_account_id":{"type":"string","description":"The platform's own id of the account.","examples":["6812345098765432101"]},"profile_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The link to the profile.","examples":["https://www.tiktok.com/@acme_studio"]},"avatar":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"A signed link to socialdata's copy of the image, valid until expires_at.","examples":["https://media.socialdata.example/images/7431852096741258240.webp?signature=abc123"]},"expires_at":{"type":"string","description":"When url stops working, 1 hour after the answer.","examples":["2026-11-26T14:00:00Z"]},"width":{"type":"integer","description":"The width in pixels.","examples":[512]},"height":{"type":"integer","description":"The height in pixels.","examples":[512]}},"required":["url","expires_at","width","height"],"additionalProperties":false},{"type":"null"}],"description":"The newest profile picture of the account as WebP within 512 by 512 pixels, or null until socialdata stores one."},"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The handle, without the @.","examples":["acme_studio"]},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name shown on the profile.","examples":["Acme Cameras"]},"biography":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The biography of the profile.","examples":["Cameras that fit in a pocket."]},"external_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The link in the profile.","examples":["https://cameras.acme.example/"]},"is_verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"true when the platform marks the account as verified.","examples":[false]},"is_private":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"The last value that the platform showed.","examples":[false]},"availability_status":{"type":"string","enum":["available","private","restricted","unavailable"],"description":"Whether socialdata can read the item on the platform.","examples":["available"]},"is_tracked":{"type":"boolean","description":"true when socialdata updates the account on a schedule, because a watchlist of any organization lists it.","examples":[true]},"follower_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Followers.","examples":[1250000]},"follower_count_precision":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The significant digits of follower_count when the platform rounds it, or null when it is exact.","examples":[null]},"following_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Accounts that this account follows.","examples":[310]},"post_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Posts, as the platform counts them.","examples":[486]},"total_like_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Likes over all posts, on platforms that show it.","examples":[18400000]},"total_view_count":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Views over all posts, on platforms that show it.","examples":[null]},"follower_count_change_7d":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Followers gained in the 7 days that end at synced_at.","examples":[1250]},"follower_count_change_30d":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Followers gained in the 30 days that end at synced_at.","examples":[1250]},"follower_count_change_pct_7d":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"follower_count_change_7d divided by the followers at the window start: 0.026 means 2.6%.","examples":[0.026]},"follower_count_change_pct_30d":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"follower_count_change_30d divided by the followers at the window start: 0.026 means 2.6%.","examples":[0.026]},"view_count_gained_7d":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Views gained in the 7 days that end at synced_at, summed over the account's posts that socialdata measured.","examples":[410200]},"view_count_gained_30d":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Views gained in the 30 days that end at synced_at, summed over the account's posts that socialdata measured.","examples":[1620000]},"posts_30d":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Posts published in the 30 days before synced_at.","examples":[24]},"posts_per_week_30d":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"posts_30d per week.","examples":[5.6]},"median_view_count_30d":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"The median views of the posts of the last 30 days.","examples":[52000]},"first_observed_at":{"type":"string","description":"When socialdata first read the account.","examples":["2026-11-26T14:00:00Z"]},"last_observed_at":{"type":"string","description":"When socialdata last read the account.","examples":["2026-11-26T14:00:00Z"]},"highlights":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["handle","display_name","biography"]},"start":{"type":"integer","minimum":0,"description":"Where the match starts, in Unicode code points from the start of the field.","examples":[10]},"length":{"type":"integer","exclusiveMinimum":0,"description":"The length of the match in Unicode code points.","examples":[8]}},"required":["field","start","length"],"additionalProperties":false},"description":"Where q matched, as offsets into the text of each field."},"synced_at":{"type":"string","description":"When the search results last took the whole row, usually within 5 minutes of a new measurement.","examples":["2026-11-26T14:00:00Z"]},"windows_synced_at":{"type":"string","description":"When socialdata last computed the window values of this row, which end at this time.","examples":["2026-11-26T14:00:00Z"]}},"required":["platform","platform_account_id","profile_url","avatar","handle","display_name","biography","external_url","is_verified","is_private","availability_status","is_tracked","follower_count","follower_count_precision","following_count","post_count","total_like_count","total_view_count","follower_count_change_7d","follower_count_change_30d","follower_count_change_pct_7d","follower_count_change_pct_30d","view_count_gained_7d","view_count_gained_30d","posts_30d","posts_per_week_30d","median_view_count_30d","first_observed_at","last_observed_at","highlights","synced_at","windows_synced_at"],"additionalProperties":false},"description":"One page of accounts, in sort order."},"total_estimate":{"type":"integer","description":"About how many accounts match.","examples":[37]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The cursor of the next page, or null on the last page.","examples":[null]}},"required":["meta","accounts","total_estimate","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_argument"]},"field":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","field","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["not_stored"]},"target":{"type":"string","enum":["account","post","watchlist"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","target","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"]},"retry_after_s":{"type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","retry_after_s","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"501":{"description":"The operation is not built yet. The service answers this only while the build is in progress.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["not_implemented"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false,"description":"The operation is not built yet. The service answers this only while the build is in progress."}}}},"503":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["search_unavailable"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}}},"description":"Returns the accounts that socialdata holds whose handle, name, or biography match your words, filtered and sorted by any count or growth. Use it to find or rank accounts, and lookup for one account you can name.","summary":"search_accounts","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"q":{"type":"string","minLength":1,"maxLength":200,"description":"Words to find in the handle, display name, and biography, up to 200 characters.","examples":["camera"]},"filters":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"field":{"type":"string","enum":["follower_count","following_count","post_count","total_like_count","total_view_count","follower_count_change_7d","follower_count_change_30d","follower_count_change_pct_7d","follower_count_change_pct_30d","view_count_gained_7d","view_count_gained_30d","posts_30d","posts_per_week_30d","median_view_count_30d"]},"op":{"type":"string","enum":["eq","gt","gte","lt","lte"]},"value":{"type":"number","description":"The number to compare with.","examples":[100000]}},"required":["field","op","value"],"additionalProperties":false,"description":"Compares a number field, and a row whose value is unknown never passes."},{"type":"object","properties":{"field":{"type":"string","enum":["first_observed_at","last_observed_at"]},"op":{"type":"string","enum":["gte","lt"]},"value":{"type":"string","description":"The time to compare with.","examples":["2026-11-26T14:00:00Z"]}},"required":["field","op","value"],"additionalProperties":false,"description":"Compares a time field: gte for at or after, lt for before."},{"type":"object","properties":{"field":{"type":"string","enum":["platform","platform_account_id","handle","availability_status"]},"op":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string"},"description":"1 to 100 values.","examples":[["tiktok","instagram"]],"minItems":1,"maxItems":100}},"required":["field","op","value"],"additionalProperties":false,"description":"Keeps the rows whose field is (in) or is not (not_in) one of the values."},{"type":"object","properties":{"field":{"type":"string","enum":["is_verified","is_private","is_tracked"]},"op":{"type":"string","enum":["eq"]},"value":{"type":"boolean","description":"The value to keep.","examples":[true]}},"required":["field","op","value"],"additionalProperties":false,"description":"Keeps the rows where a true or false field has this value."},{"type":"object","properties":{"field":{"type":"string","enum":["follower_count","following_count","post_count","total_like_count","total_view_count","follower_count_change_7d","follower_count_change_30d","follower_count_change_pct_7d","follower_count_change_pct_30d","view_count_gained_7d","view_count_gained_30d","posts_30d","posts_per_week_30d","median_view_count_30d","is_verified","is_private"]},"op":{"type":"string","enum":["is_null","is_not_null"]}},"required":["field","op"],"additionalProperties":false,"description":"Keeps the rows where the field is unknown (is_null) or known (is_not_null)."}]},"description":"Up to 20 filters that an account must all pass.","examples":[[{"field":"follower_count","op":"gte","value":10000}]],"maxItems":20},"watchlist":{"type":"string","minLength":1,"maxLength":100,"description":"Only the accounts in this watchlist.","examples":["competitors"]},"sort":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["follower_count","following_count","post_count","total_like_count","total_view_count","follower_count_change_7d","follower_count_change_30d","follower_count_change_pct_7d","follower_count_change_pct_30d","view_count_gained_7d","view_count_gained_30d","posts_30d","posts_per_week_30d","median_view_count_30d","first_observed_at","last_observed_at","relevance"]},"dir":{"type":"string","enum":["asc","desc"],"description":"The sort direction, desc by default.","examples":["desc"]}},"required":["field"],"additionalProperties":false},"description":"Up to 3 sort keys in order, by default relevance with q and follower_count without.","examples":[[{"field":"follower_count_change_30d","dir":"desc"}]],"minItems":1,"maxItems":3},"limit":{"type":"integer","minimum":1,"maximum":100,"description":"Items per page, from 1 to 100.","default":20,"examples":[20]},"cursor":{"type":"string","description":"next_cursor of the previous page, left out for the first page."}},"additionalProperties":false}}},"required":true}} ``` # watchlists (/docs/reference/watchlists) GET /v1/watchlists Returns each watchlist with how many accounts and posts it holds, and whether your organization may track. Use it to find the names that the other watchlist tools take. The OpenAPI operation, with its parameters, its request body, and every answer that it declares: ```json {"tags":["v1"],"operationId":"watchlists","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"description":"Items per page, from 1 to 100.","default":50,"examples":[20]},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","description":"next_cursor of the previous page, left out for the first page."},"required":false}],"security":[{"type":"apiKey","name":"x-api-key","in":"header"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"as_of":{"type":"string","description":"The answer holds no data read after this time.","examples":["2026-11-26T14:00:00Z"]},"source":{"type":"string","enum":["store","live","vendor_cache"],"description":"Where the data came from: data that socialdata held, a live read of the platform, or a recent copy from its data provider.","examples":["store"]},"credits_spent":{"type":"integer","description":"The credits that this call cost.","examples":[0]},"credits_left_today":{"type":"integer","description":"The credits that your organization can still spend on lookups today (UTC).","examples":[30]},"trace_id":{"type":"string","description":"The id of this call, to quote when you report a problem.","examples":["dd4ea85c713694073f9ab127c28f2318"]},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["stale","handle_changed","first_observation","partial_backfill","counter_decreased","mixed_platforms"],"description":"The kind of note.","examples":["first_observation"]},"message":{"type":"string","description":"The warning, for a person or an agent to read.","examples":["The service saw this target for the first time in this call."]}},"required":["code","message"],"additionalProperties":false,"description":"A note about an answer that still succeeded."},"description":"Notes about the answer, usually none."}},"required":["as_of","source","credits_spent","credits_left_today","trace_id","warnings"],"additionalProperties":false,"description":"Facts about this call, in every answer."},"can_track":{"type":"boolean","description":"true when your organization may add items with track.","examples":[true]},"watchlists":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the watchlist.","examples":["competitors"]},"created_at":{"type":"string","description":"When the watchlist was created.","examples":["2026-11-26T14:00:00Z"]},"account_count":{"type":"integer","description":"Accounts in the watchlist.","examples":[12]},"post_count":{"type":"integer","description":"Posts in the watchlist.","examples":[40]}},"required":["name","created_at","account_count","post_count"],"additionalProperties":false},"description":"One page of watchlists."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The cursor of the next page, or null on the last page.","examples":[null]}},"required":["meta","can_track","watchlists","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_argument"]},"field":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","field","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"]},"retry_after_s":{"type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","retry_after_s","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"501":{"description":"The operation is not built yet. The service answers this only while the build is in progress.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["not_implemented"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false,"description":"The operation is not built yet. The service answers this only while the build is in progress."}}}}},"description":"Returns each watchlist with how many accounts and posts it holds, and whether your organization may track. Use it to find the names that the other watchlist tools take.","summary":"watchlists"} ``` # watchlist_items (/docs/reference/watchlist_items) GET /v1/watchlists/{name}/items Returns each item with its id and the state of its updates, newest first. Use it to see what a watchlist holds, and the search tools with watchlist to rank its items. The OpenAPI operation, with its parameters, its request body, and every answer that it declares: ```json {"tags":["v1"],"operationId":"watchlist_items","parameters":[{"name":"name","in":"path","schema":{"type":"string","minLength":1,"maxLength":100,"description":"The name of a watchlist, 1 to 100 characters with no slash, percent-encoded in a path.","examples":["competitors"]},"required":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"description":"Items per page, from 1 to 100.","default":50,"examples":[20]},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","description":"next_cursor of the previous page, left out for the first page."},"required":false}],"security":[{"type":"apiKey","name":"x-api-key","in":"header"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"as_of":{"type":"string","description":"The answer holds no data read after this time.","examples":["2026-11-26T14:00:00Z"]},"source":{"type":"string","enum":["store","live","vendor_cache"],"description":"Where the data came from: data that socialdata held, a live read of the platform, or a recent copy from its data provider.","examples":["store"]},"credits_spent":{"type":"integer","description":"The credits that this call cost.","examples":[0]},"credits_left_today":{"type":"integer","description":"The credits that your organization can still spend on lookups today (UTC).","examples":[30]},"trace_id":{"type":"string","description":"The id of this call, to quote when you report a problem.","examples":["dd4ea85c713694073f9ab127c28f2318"]},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["stale","handle_changed","first_observation","partial_backfill","counter_decreased","mixed_platforms"],"description":"The kind of note.","examples":["first_observation"]},"message":{"type":"string","description":"The warning, for a person or an agent to read.","examples":["The service saw this target for the first time in this call."]}},"required":["code","message"],"additionalProperties":false,"description":"A note about an answer that still succeeded."},"description":"Notes about the answer, usually none."}},"required":["as_of","source","credits_spent","credits_left_today","trace_id","warnings"],"additionalProperties":false,"description":"Facts about this call, in every answer."},"name":{"type":"string","description":"The name of the watchlist.","examples":["competitors"]},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["account"],"description":"This item is an account.","examples":["account"]},"id":{"anyOf":[{"type":"string","description":"The id of a account, from lookup or a search.","examples":["instagram:account:1789456123"]},{"type":"string","description":"The id of a watchlist entry whose account socialdata has not found yet, from watchlist_items. It stops working when a poll finds the account, which then has its account id.","examples":["instagram:pending:42"]}],"description":"The account id, or the pending id while socialdata has not found the account. Use it with untrack.","examples":["instagram:account:67803256863"]},"account":{"type":"object","properties":{"platform":{"type":"string","enum":["instagram","tiktok","youtube","threads","facebook","x","linkedin","snapchat"],"description":"The social platform.","examples":["instagram"]},"platform_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The platform's own id of the account, or null while socialdata has not found it: before its first poll, or when that poll said not found, private or restricted.","examples":["1789456123"]},"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The handle, without the @.","examples":["acme.co"]},"profile_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The link to the profile.","examples":["https://www.instagram.com/acme.co/"]}},"required":["platform","platform_account_id","handle","profile_url"],"additionalProperties":false},"status":{"type":"string","enum":["pending","active","failing"],"description":"Whether the updates of the account succeed.","examples":["active"]},"tier":{"anyOf":[{"type":"string","enum":["hot","warm","cold"],"description":"How often socialdata reads the account, set by how recently it posted.","examples":["hot"]},{"type":"null"}]},"interval_s":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The fixed update interval in seconds, or null when tier decides.","examples":[null]},"added_at":{"type":"string","description":"When the account was added to this watchlist.","examples":["2026-11-26T14:00:00Z"]},"last_succeeded_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"The last update that succeeded."},"next_poll_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"When socialdata plans to read the account next."},"last_error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The error code of the last failed update, or null when it succeeded.","examples":[null]}},"required":["kind","id","account","status","tier","interval_s","added_at","last_succeeded_at","next_poll_at","last_error_code"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["post"],"description":"This item is a post.","examples":["post"]},"id":{"type":"string","description":"The id of a post, from lookup or a search.","examples":["tiktok:post:7431852096741258240"]},"platform":{"type":"string","enum":["instagram","tiktok","youtube","threads","facebook","x","linkedin","snapchat"],"description":"The social platform.","examples":["tiktok"]},"platform_post_id":{"type":"string","description":"The platform's own id of the post.","examples":["7431852096741258240"]},"post_url":{"type":"string","description":"The link to the post.","examples":["https://www.tiktok.com/@acme_studio/video/7431852096741258240"]},"platform_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The platform's own id of the author, or null until socialdata knows the author.","examples":["6812345098765432101"]},"posted_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"When the post was published."},"entered_via":{"type":"string","enum":["feed","link"],"description":"How the post entered the watchlist: from the posts of a tracked account, or by track.","examples":["link"]},"status":{"type":"string","enum":["active","finished","failed","deleted"],"description":"Whether socialdata still measures the post.","examples":["active"]},"added_at":{"type":"string","description":"When the post was added to this watchlist.","examples":["2026-11-26T14:00:00Z"]},"measure_count":{"type":"integer","description":"How many times socialdata has measured the post.","examples":[9]},"last_measured_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"The last measurement."},"next_measure_at":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"When socialdata plans to measure the post next, or null when status is not active."},"tracked_until":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"When the measurements stop: 30 days after posted_at, or 30 days after tracking started while posted_at is not known."}},"required":["kind","id","platform","platform_post_id","post_url","platform_account_id","posted_at","entered_via","status","added_at","measure_count","last_measured_at","next_measure_at","tracked_until"],"additionalProperties":false}],"description":"An account or a post in a watchlist, as kind says."},"description":"One page of the accounts and posts in the watchlist, most recently added first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The cursor of the next page, or null on the last page.","examples":[null]}},"required":["meta","name","items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_argument"]},"field":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","field","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["not_stored"]},"target":{"type":"string","enum":["account","post","watchlist"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","target","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"]},"retry_after_s":{"type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","retry_after_s","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"501":{"description":"The operation is not built yet. The service answers this only while the build is in progress.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["not_implemented"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false,"description":"The operation is not built yet. The service answers this only while the build is in progress."}}}}},"description":"Returns each item with its id and the state of its updates, newest first. Use it to see what a watchlist holds, and the search tools with watchlist to rank its items.","summary":"watchlist_items"} ``` # track (/docs/reference/track) POST /v1/watchlists/{name}/items Adds 1 to 100 accounts or posts to a watchlist, and creates the watchlist when the name is new, so that socialdata measures them on a schedule. Each ref gets its own outcome in results. The OpenAPI operation, with its parameters, its request body, and every answer that it declares: ```json {"tags":["v1"],"operationId":"track","parameters":[{"name":"name","in":"path","schema":{"type":"string","minLength":1,"maxLength":100,"description":"The name of a watchlist, 1 to 100 characters with no slash, percent-encoded in a path.","examples":["competitors"]},"required":true}],"security":[{"type":"apiKey","name":"x-api-key","in":"header"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"as_of":{"type":"string","description":"The answer holds no data read after this time.","examples":["2026-11-26T14:00:00Z"]},"source":{"type":"string","enum":["store","live","vendor_cache"],"description":"Where the data came from: data that socialdata held, a live read of the platform, or a recent copy from its data provider.","examples":["store"]},"credits_spent":{"type":"integer","description":"The credits that this call cost.","examples":[0]},"credits_left_today":{"type":"integer","description":"The credits that your organization can still spend on lookups today (UTC).","examples":[30]},"trace_id":{"type":"string","description":"The id of this call, to quote when you report a problem.","examples":["dd4ea85c713694073f9ab127c28f2318"]},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["stale","handle_changed","first_observation","partial_backfill","counter_decreased","mixed_platforms"],"description":"The kind of note.","examples":["first_observation"]},"message":{"type":"string","description":"The warning, for a person or an agent to read.","examples":["The service saw this target for the first time in this call."]}},"required":["code","message"],"additionalProperties":false,"description":"A note about an answer that still succeeded."},"description":"Notes about the answer, usually none."}},"required":["as_of","source","credits_spent","credits_left_today","trace_id","warnings"],"additionalProperties":false,"description":"Facts about this call, in every answer."},"name":{"type":"string","description":"The name of the watchlist.","examples":["competitors"]},"results":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","description":"The ref as you sent it.","examples":["https://www.tiktok.com/@acme_studio"]},"outcome":{"type":"string","enum":["added","already_in_watchlist","pending","refused"],"description":"What happened to this ref.","examples":["added"]},"kind":{"anyOf":[{"type":"string","enum":["account","post"]},{"type":"null"}],"description":"What was tracked, or null when outcome is refused.","examples":["account"]},"id":{"anyOf":[{"anyOf":[{"type":"string","description":"The id of a account, from lookup or a search.","examples":["instagram:account:1789456123"]},{"type":"string","description":"The id of a post, from lookup or a search.","examples":["tiktok:post:7431852096741258240"]},{"type":"string","description":"The id of a watchlist entry whose account socialdata has not found yet, from watchlist_items. It stops working when a poll finds the account, which then has its account id.","examples":["instagram:pending:42"]}],"description":"The id of an account or a post, from lookup, a search, or watchlist_items, or the pending id of an account that socialdata has not found yet.","examples":["instagram:account:1789456123"]},{"type":"null"}],"description":"The id to use with untrack and the history tools, or null until it is known.","examples":["tiktok:account:6812345098765432101"]},"account":{"anyOf":[{"type":"object","properties":{"platform":{"type":"string","enum":["instagram","tiktok","youtube","threads","facebook","x","linkedin","snapchat"],"description":"The social platform.","examples":["instagram"]},"platform_account_id":{"type":"string","description":"The platform's own id of the account.","examples":["1789456123"]},"handle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The handle, without the @.","examples":["acme.co"]},"profile_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The link to the profile.","examples":["https://www.instagram.com/acme.co/"]}},"required":["platform","platform_account_id","handle","profile_url"],"additionalProperties":false},{"type":"null"}],"description":"The account, or the author of the post, or null until it is known."},"tracked_until":{"anyOf":[{"type":"string","description":"A UTC time in ISO 8601.","examples":["2026-11-26T14:00:00Z"]},{"type":"null"}],"description":"When the measurements of a post stop, or null for an account.","examples":[null]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why the ref was refused, or null unless outcome is refused.","examples":[null]}},"required":["ref","outcome","kind","id","account","tracked_until","error_code"],"additionalProperties":false},"description":"One result per ref, in the order sent."}},"required":["meta","name","results"],"additionalProperties":false}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_argument"]},"field":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","field","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"]},"retry_after_s":{"type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","retry_after_s","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"501":{"description":"The operation is not built yet. The service answers this only while the build is in progress.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["not_implemented"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false,"description":"The operation is not built yet. The service answers this only while the build is in progress."}}}}},"description":"Adds 1 to 100 accounts or posts to a watchlist, and creates the watchlist when the name is new, so that socialdata measures them on a schedule. Each ref gets its own outcome in results.","summary":"track","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"refs":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2048,"description":"One account or post, as a link, platform:@handle, platform:account:ID, or platform:post:ID.","examples":["https://www.tiktok.com/@acme_studio"]},"description":"1 to 100 accounts and posts to track, each a ref.","examples":[["https://www.tiktok.com/@acme_studio","instagram:@acme.co"]],"minItems":1,"maxItems":100},"interval_s":{"type":"integer","minimum":900,"description":"A fixed update interval in seconds for the accounts, at least 900.","examples":[3600]}},"required":["refs"],"additionalProperties":false}}},"required":true}} ``` # untrack (/docs/reference/untrack) DELETE /v1/watchlists/{name}/items/{item} Removes one item by its id, and its history stays readable. Use watchlist_items to find the id. The OpenAPI operation, with its parameters, its request body, and every answer that it declares: ```json {"tags":["v1"],"operationId":"untrack","parameters":[{"name":"name","in":"path","schema":{"type":"string","minLength":1,"maxLength":100,"description":"The name of a watchlist, 1 to 100 characters with no slash, percent-encoded in a path.","examples":["competitors"]},"required":true},{"name":"item","in":"path","schema":{"anyOf":[{"type":"string","description":"The id of a account, from lookup or a search.","examples":["instagram:account:1789456123"]},{"type":"string","description":"The id of a post, from lookup or a search.","examples":["tiktok:post:7431852096741258240"]},{"type":"string","description":"The id of a watchlist entry whose account socialdata has not found yet, from watchlist_items. It stops working when a poll finds the account, which then has its account id.","examples":["instagram:pending:42"]}],"description":"The id of an account or a post, from lookup, a search, or watchlist_items, or the pending id of an account that socialdata has not found yet.","examples":["instagram:account:1789456123"]},"required":true}],"security":[{"type":"apiKey","name":"x-api-key","in":"header"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"as_of":{"type":"string","description":"The answer holds no data read after this time.","examples":["2026-11-26T14:00:00Z"]},"source":{"type":"string","enum":["store","live","vendor_cache"],"description":"Where the data came from: data that socialdata held, a live read of the platform, or a recent copy from its data provider.","examples":["store"]},"credits_spent":{"type":"integer","description":"The credits that this call cost.","examples":[0]},"credits_left_today":{"type":"integer","description":"The credits that your organization can still spend on lookups today (UTC).","examples":[30]},"trace_id":{"type":"string","description":"The id of this call, to quote when you report a problem.","examples":["dd4ea85c713694073f9ab127c28f2318"]},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["stale","handle_changed","first_observation","partial_backfill","counter_decreased","mixed_platforms"],"description":"The kind of note.","examples":["first_observation"]},"message":{"type":"string","description":"The warning, for a person or an agent to read.","examples":["The service saw this target for the first time in this call."]}},"required":["code","message"],"additionalProperties":false,"description":"A note about an answer that still succeeded."},"description":"Notes about the answer, usually none."}},"required":["as_of","source","credits_spent","credits_left_today","trace_id","warnings"],"additionalProperties":false,"description":"Facts about this call, in every answer."},"was_in_watchlist":{"type":"boolean","description":"true when the item was in the watchlist before this call.","examples":[true]},"is_still_polled":{"type":"boolean","description":"true when socialdata still updates the item, because another watchlist lists it, or, for a post, because a watchlist lists its author.","examples":[false]}},"required":["meta","was_in_watchlist","is_still_polled"],"additionalProperties":false}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_argument"]},"field":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","field","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["not_stored"]},"target":{"type":"string","enum":["account","post","watchlist"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","target","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"]},"retry_after_s":{"type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","retry_after_s","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"501":{"description":"The operation is not built yet. The service answers this only while the build is in progress.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["not_implemented"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false,"description":"The operation is not built yet. The service answers this only while the build is in progress."}}}}},"description":"Removes one item by its id, and its history stays readable. Use watchlist_items to find the id.","summary":"untrack"} ``` # sql (/docs/reference/sql) POST /v1/sql Runs one SELECT over socialdata's data and returns up to 1,000 rows. Use it only when no other tool answers the question, such as an aggregate over many accounts. The OpenAPI operation, with its parameters, its request body, and every answer that it declares: ```json {"tags":["v1"],"operationId":"sql","parameters":[],"security":[{"type":"apiKey","name":"x-api-key","in":"header"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"as_of":{"type":"string","description":"The answer holds no data read after this time.","examples":["2026-11-26T14:00:00Z"]},"source":{"type":"string","enum":["store","live","vendor_cache"],"description":"Where the data came from: data that socialdata held, a live read of the platform, or a recent copy from its data provider.","examples":["store"]},"credits_spent":{"type":"integer","description":"The credits that this call cost.","examples":[0]},"credits_left_today":{"type":"integer","description":"The credits that your organization can still spend on lookups today (UTC).","examples":[30]},"trace_id":{"type":"string","description":"The id of this call, to quote when you report a problem.","examples":["dd4ea85c713694073f9ab127c28f2318"]},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["stale","handle_changed","first_observation","partial_backfill","counter_decreased","mixed_platforms"],"description":"The kind of note.","examples":["first_observation"]},"message":{"type":"string","description":"The warning, for a person or an agent to read.","examples":["The service saw this target for the first time in this call."]}},"required":["code","message"],"additionalProperties":false,"description":"A note about an answer that still succeeded."},"description":"Notes about the answer, usually none."}},"required":["as_of","source","credits_spent","credits_left_today","trace_id","warnings"],"additionalProperties":false,"description":"Facts about this call, in every answer."},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The column name.","examples":["handle"]},"type":{"type":"string","description":"The SQL type of the column.","examples":["String"]}},"required":["name","type"],"additionalProperties":false},"description":"The columns of rows, in order."},"rows":{"type":"array","items":{"type":"array"},"description":"At most 1,000 rows, each an array in the order of columns, with 64-bit integers as strings.","examples":[[["tiktok","acme_studio","1250000"]]]},"is_truncated":{"type":"boolean","description":"true when the query returned more rows than the answer holds.","examples":[false]}},"required":["meta","columns","rows","is_truncated"],"additionalProperties":false}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["invalid_argument"]},"field":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","field","message","retryable","trace_id","credits_spent"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["sql_rejected"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["sql_too_large"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false}]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"408":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["sql_timeout"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"]},"retry_after_s":{"type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","retry_after_s","message","retryable","trace_id","credits_spent"],"additionalProperties":false}}}},"501":{"description":"The operation is not built yet. The service answers this only while the build is in progress.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","enum":["not_implemented"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"trace_id":{"type":"string"},"credits_spent":{"type":"integer"}},"required":["code","message","retryable","trace_id","credits_spent"],"additionalProperties":false,"description":"The operation is not built yet. The service answers this only while the build is in progress."}}}}},"description":"Runs one SELECT over socialdata's data and returns up to 1,000 rows. Use it only when no other tool answers the question, such as an aggregate over many accounts.","summary":"sql","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":20000,"description":"One read-only SELECT statement, up to 20,000 characters.","examples":["SELECT platform, handle, follower_count FROM accounts WHERE platform = 'tiktok' ORDER BY follower_count DESC LIMIT 10"]}},"required":["query"],"additionalProperties":false}}},"required":true}} ``` # health (/docs/reference/health) GET /health Answers 200 when the service can serve, needs no key, and reads no data. The OpenAPI operation, with its parameters, its request body, and every answer that it declares: ```json {"tags":["ops"],"operationId":"health","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]}},"required":["status"],"additionalProperties":false}}}}},"description":"Answers 200 when the service can serve, needs no key, and reads no data.","summary":"health"} ```