Overview
The base URL, authentication, pages, and errors of the HTTP API.
The HTTP API has one endpoint for each of the ten tools. Each endpoint takes JSON and returns JSON.
Base URL
https://api.socialdata.product.studioThe tools are under /v1. GET /health says whether the service is up and needs no key.
Authentication
Send your API key in the x-api-key header of each call:
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 explains keys and the rate limit.
Answers
Every answer has a meta object with as_of, source, credits_spent, credits_left_today, trace_id, and warnings. Read an answer explains them.
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
An error has a status from 400 to 503 and a body with code, message, retryable, trace_id, and credits_spent. Errors lists each code.
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
| Tool | What it does |
|---|---|
lookup | Get the current card of one account or post. |
account_history | Get the counts of one account over time. |
post_history | Get every measurement of one post over time. |
search_posts | Find posts by words, filters, and sort. |
search_accounts | Find and rank accounts by words, filters, and sort. |
watchlists | List the watchlists of your organization. |
watchlist_items | List the accounts and posts in one watchlist. |
track | Add accounts or posts to a watchlist. |
untrack | Remove an account or a post from a watchlist. |
sql | Run one read-only SQL query. |
Agent skill
Download the socialdata skill, so an agent knows when and how to use socialdata.
account_history GET
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.