Base URL
Every endpoint is served over HTTPS from one base URL:
https://staging-fly.socialtap.devAuthentication
Send your API key in the x-api-key header with every request; keys starting with st_test_ are test keys that answer recorded responses for free. Authentication
x-api-key: <your key>Endpoints
Data endpoints are GET requests with query parameters. Each returns {data, meta}, or {data, page, meta} for lists, where data follows one of 5 schemas, the same on every platform: ads, comments, posts, profiles, transcripts.
Rumble
TikTok
Conventions
data follows the resource's shared schema; null means unknown, never 0 or "". Errors are non-2xx responses with this body: branch on error.code, never on the message (error codes).
{
"error": {
"code": "<code>",
"message": "…",
"request_id": "…",
"status": "…",
"retryable": "…",
"param": "…",
"remediation": "…",
"doc_url": "…",
"details": "…",
"charged": "…"
}
}The meta object
| Field | Type | Description |
|---|---|---|
meta.request_id | string | Unique request ID; include it when contacting support. |
meta.platform | string | Platform ID of the endpoint (youtube, tiktok, …). |
meta.source | string | Which upstream strategy produced the data. |
meta.is_cached | boolean | True when served from the cache (free); see max_age. |
meta.credits_charged | integer | Credits charged for this request (0 for errors and cache hits). |
meta.latency_ms | integer | Time SocialTap spent on the request, in milliseconds. |
meta.fetched_at | string (date-time) | When the data was fetched from the platform, RFC 3339 UTC (older than the request for cache hits). |
meta.input | object or null | What the request's url or handle resolved to: kind, platform ID and canonical URL, so you can confirm what was fetched; null for searches. |
meta.input.kind | string | What the input points to (profile, video, post, …). New values may be added; treat unknown values as other. |
meta.input.id | string or null | Platform-native ID of the item; null when it is only known after the fetch and the request failed. |
meta.input.url | string or null | Canonical URL of the item; null when unknown. |
meta.credits_remaining | integer or null | Account balance after this request (the x-credits-remaining header); for a busy account an estimate that may not yet subtract concurrent requests (about a second of usage), never below the real balance; null when SocialTap could not read it. |
meta.client_request_id | string or null | Your x-client-request-id, echoed; null when you sent none. |
meta.warnings | object[] | Things to act on that did not fail the request: a deprecated endpoint, partial data. [] when none. |
meta.warnings[].code | string | Machine-readable warning code (see the warnings list). New codes may be added. |
meta.warnings[].message | string | What to do about it. |
meta.warnings[].doc_url | string | Where to read more (the changelog entry, the endpoint's docs). |
meta.warnings[].fields | string[] | partial_data: the output fields (catalog paths such as metrics.view_count) that are null or [] because part of the data could not be fetched; absent for other codes. |
meta.mode | string or null | live, or test for a test key's answer: a recorded response (fixture), free and deterministic; null when SocialTap could not tell. New values may be added. One of live, test |
request_idstringUnique request ID; include it when contacting support.
platformstringPlatform ID of the endpoint (youtube, tiktok, …).
sourcestringWhich upstream strategy produced the data.
is_cachedbooleanTrue when served from the cache (free); see max_age.
credits_chargedintegerCredits charged for this request (0 for errors and cache hits).
latency_msintegerTime SocialTap spent on the request, in milliseconds.
fetched_atstring date-timeWhen the data was fetched from the platform, RFC 3339 UTC (older than the request for cache hits).
inputobjectnullableWhat the request's url or handle resolved to: kind, platform ID and canonical URL, so you can confirm what was fetched; null for searches.
ShowHide 3 child fields
kindstringWhat the input points to (profile, video, post, …). New values may be added; treat unknown values as other.
idstringnullablePlatform-native ID of the item; null when it is only known after the fetch and the request failed.
urlstringnullableCanonical URL of the item; null when unknown.
credits_remainingintegernullableAccount balance after this request (the x-credits-remaining header); for a busy account an estimate that may not yet subtract concurrent requests (about a second of usage), never below the real balance; null when SocialTap could not read it.
client_request_idstringnullableYour x-client-request-id, echoed; null when you sent none.
warningsobject[]Things to act on that did not fail the request: a deprecated endpoint, partial data. [] when none.
ShowHide 4 child fields
codestringMachine-readable warning code (see the warnings list). New codes may be added.
messagestringWhat to do about it.
doc_urlstringWhere to read more (the changelog entry, the endpoint's docs).
fieldsstring[]partial_data: the output fields (catalog paths such as metrics.view_count) that are null or [] because part of the data could not be fetched; absent for other codes.
modestringnullablelive, or test for a test key's answer: a recorded response (fixture), free and deterministic; null when SocialTap could not tell. New values may be added.
One oflivetest
List endpoints
Repeat the same request with cursor set to page.next_cursor while page.has_more is true (pagination guide).
| Name | Type | Description | Example |
|---|---|---|---|
limit optional | integermin 1 | Items per page, 1 to the endpoint's page size (its default and maximum; larger values are reduced to it). Omit it: every page costs the same, so a smaller limit means more pages to pay for. | — |
cursor optional | string | page.next_cursor from the previous response. Send the same other parameters; omit to start from the first page. | — |
Items per page, 1 to the endpoint's page size (its default and maximum; larger values are reduced to it). Omit it: every page costs the same, so a smaller limit means more pages to pay for.
cursorstringpage.next_cursor from the previous response. Send the same other parameters; omit to start from the first page.
| Field | Type | Description |
|---|---|---|
page.has_more | boolean | True when another page exists; then next_cursor is set. An empty page with has_more true is not the end. |
page.next_cursor | string or null | Pass as cursor, with the same other parameters, to get the next page; null at the end. |
page.next_cursor_expires_at | string (date-time) or null | When next_cursor stops working, RFC 3339 UTC; null at the end. Don't store cursors. |
page.end_reason | string or null | Why there are no more pages; null while has_more is true. end: the list ended, or reached since/until. platform_limit: the platform stops serving further pages although the list goes on. max_pages: SocialTap's cap on pages in one walk. New values may be added. A short or empty page is not the end: only has_more false is. One of end, platform_limit, max_pages |
has_morebooleanTrue when another page exists; then next_cursor is set. An empty page with has_more true is not the end.
next_cursorstringnullablePass as cursor, with the same other parameters, to get the next page; null at the end.
next_cursor_expires_atstring date-timenullableWhen next_cursor stops working, RFC 3339 UTC; null at the end. Don't store cursors.
end_reasonstringnullableWhy there are no more pages; null while has_more is true. end: the list ended, or reached since/until. platform_limit: the platform stops serving further pages although the list goes on. max_pages: SocialTap's cap on pages in one walk. New values may be added. A short or empty page is not the end: only has_more false is.
One ofendplatform_limitmax_pages
Parameters every endpoint accepts
| Name | Type | Description | Example |
|---|---|---|---|
max_age optional | integermin 0 | Accept a cached response up to this many seconds old. Cache hits cost 0 credits. Omit to always fetch fresh. The Cache-Control: max-age=N request header is equivalent; max_age wins when both are sent. | — |
fields optional | string | Return only these fields of each item: comma-separated paths in the schema's notation (id,text,metrics.view_count,segments[].text; a parent path keeps the whole object). Unknown paths are rejected. Applied after the cache, so it changes neither the price nor cache hits; page and meta are always returned whole. | — |
Accept a cached response up to this many seconds old. Cache hits cost 0 credits. Omit to always fetch fresh. The Cache-Control: max-age=N request header is equivalent; max_age wins when both are sent.
fieldsstringReturn only these fields of each item: comma-separated paths in the schema's notation (id,text,metrics.view_count,segments[].text; a parent path keeps the whole object). Unknown paths are rejected. Applied after the cache, so it changes neither the price nor cache hits; page and meta are always returned whole.
Request headers
| Header | Type | Description |
|---|---|---|
x-api-key | string | Your API key. |
authorization | string | Bearer <your API key>: the same key as x-api-key, in the form most HTTP and MCP clients send (x-api-key wins when both are sent). |
x-client-request-id | string | Your own ID for the request (1–128 printable ASCII characters): echoed back and logged with ours, so support can find a request whose response never reached you. |
traceparent | string | W3C Trace Context of your trace: recorded with the request (its trace ID) so a trace can be matched to ours; SocialTap starts its own trace. |
idempotency-key | string | On any POST: your unique key for the request (1–255 printable ASCII characters; a UUID is ideal), kept 24 hours. Retrying with the same key and body never repeats the work: the answer is the first request's result, in its current state. |
prefer | string | RFC 7240. respond-async on any endpoint request runs it as a one-request job: the answer is 202 with the job (Location: its URL) instead of the result. |
cache-control | string | max-age=N accepts a cached response up to N seconds old, like the max_age parameter (max_age wins when both are sent). Other directives are ignored. |
Response headers
| Header | Type | Description |
|---|---|---|
x-request-id | string | Unique request ID; include it when contacting support. |
x-credits-charged | int | Credits charged for this request (0 for errors and cache hits). |
x-credits-remaining | int | Account balance after this request; for a busy account an estimate that may not yet subtract concurrent requests (about a second of usage), never below the real balance. |
retry-after | int | Seconds to wait before retrying; sent only with the codes whose retry_after is set in the error codes list (never on credit errors). |
allow | string | Methods the endpoint accepts (method_not_allowed only). |
age | int | Seconds since the data was fetched (cache hits only). |
x-client-request-id | string | Your x-client-request-id, echoed (also meta.client_request_id). |
ratelimit-policy | string | The account's runaway-protection ceiling as an IETF RateLimit-Policy field, as enforced: a token bucket of q requests (twice the ceiling in requests per second, at least 10) that refills in w seconds: "account";q=<requests>;w=<seconds>. Not a plan limit. |
ratelimit | string | What is left of the ceiling (IETF RateLimit field): "account";r=<requests that may be sent at once now>;t=<seconds until the bucket is full again>. |
deprecation | string | RFC 9745: the endpoint is deprecated, as of this date (@<unix seconds>; may be in the future). Also in meta.warnings. |
sunset | string | RFC 8594: when a deprecated endpoint stops answering (HTTP-date); from then on it answers endpoint_retired. |
link | string | RFC 8288 links: rel="next" is the next page of a list (while page.has_more), the same request with cursor set; rel="deprecation" is a deprecated endpoint's notice. |
location | string | On 202 answers: the job's URL (GET it, free, for its status). |
preference-applied | string | RFC 7240: respond-async when Prefer: respond-async turned the request into a job (202). |
idempotent-replayed | bool | true when the answer replays an earlier request with the same Idempotency-Key (it shows the resource's current state). |
Account, billing, jobs and webhooks
The operations SocialTap serves itself. Their JSON answers are {data, meta} (plus page on cursor-paged lists); every one is free unless it says otherwise.
Account
Signup
API keys
Events
Jobs
- GETList jobs, newest first
/v1/jobs - POSTRun many requests (or one long one) as a job
/v1/jobs - GETGet a job (free to poll)
/v1/jobs/{id} - POSTCancel a job
/v1/jobs/{id}/cancel - GETList a job's results as they complete
/v1/jobs/{id}/results - GETDownload every result of a job (JSON Lines)
/v1/jobs/{id}/results.jsonl
Webhooks
- GETList webhook endpoints
/v1/webhook_endpoints - POSTRegister a webhook endpoint
/v1/webhook_endpoints - DELETEDelete a webhook endpoint
/v1/webhook_endpoints/{id} - GETGet a webhook endpoint
/v1/webhook_endpoints/{id} - PATCHUpdate a webhook endpoint
/v1/webhook_endpoints/{id} - GETList an endpoint's delivery attempts
/v1/webhook_endpoints/{id}/deliveries - POSTRotate a webhook endpoint's signing secret
/v1/webhook_endpoints/{id}/rotate_secret - POSTSend a webhook.test event to an endpoint
/v1/webhook_endpoints/{id}/test
Their meta
| Field | Type | Description |
|---|---|---|
meta.client_request_id | string or null | Your x-client-request-id, echoed; null when you sent none. |
meta.credits_charged | integer | Always 0: the gateway's own routes are free (a job's items are charged as they end, at their endpoints' prices). |
meta.credits_remaining | integer or null | Account balance (the test balance for a test key); null without an account (signup) or when SocialTap could not read it. |
meta.mode | string or null | Mode of the credential that made the request: live, or test for a test key; null without one (signup). One of live, test |
meta.request_id | string | Unique request ID; include it when contacting support. |
meta.warnings | object[] | Things to act on that did not fail the request. [] when none. |
meta.warnings[].code | string | Machine-readable warning code (see the warnings list). New codes may be added. |
meta.warnings[].doc_url | string | Where to read more (the changelog entry, the endpoint's docs). |
meta.warnings[].fields? | string[] | partial_data: the output fields (catalog paths such as metrics.view_count) that are null or [] because part of the data could not be fetched; absent for other codes. |
meta.warnings[].message | string | What to do about it. |
metaShowHide 6 child fields
client_request_idstringnullableYour x-client-request-id, echoed; null when you sent none.
credits_chargedintegerAlways 0: the gateway's own routes are free (a job's items are charged as they end, at their endpoints' prices).
credits_remainingintegernullableAccount balance (the test balance for a test key); null without an account (signup) or when SocialTap could not read it.
modestringnullableMode of the credential that made the request: live, or test for a test key; null without one (signup).
One oflivetest
request_idstringUnique request ID; include it when contacting support.
warningsobject[]Things to act on that did not fail the request. [] when none.
ShowHide 4 child fields
codestringMachine-readable warning code (see the warnings list). New codes may be added.
doc_urlstringWhere to read more (the changelog entry, the endpoint's docs).
fields?string[]partial_data: the output fields (catalog paths such as metrics.view_count) that are null or [] because part of the data could not be fetched; absent for other codes.
messagestringWhat to do about it.