SocialCrawl

Docs for agents

cURL source of truth

The calls to copy when an agent uses SocialCrawl from cURL, with a simple and a complex example for each

This page is for an agent that writes SocialCrawl calls in cURL. Copy an example, change the values, and run it. Each family below shows one simple and one complex call.

Install

cURL ships with macOS, Linux and current Windows. There is nothing to install. The paging example reads the cursor with sed, which macOS and Linux have.

Authenticate

Send your key in the x-api-key header on every call. Keep it in SOCIALCRAWL_API_KEY, out of your code.

Terminal
export SOCIALCRAWL_API_KEY=sc_your_key_here

Check the key with the balance call. It is free.

Terminal
curl -s "https://www.socialcrawl.dev/v1/credits/balance" \
  -H "x-api-key: $SOCIALCRAWL_API_KEY"

When to use what

Pick the call by the job. Every row links its section. The price of each call is on Endpoint pricing, and the other calls are in the API reference.

JobCallSection
Read one account: name, followers, bioGET /v1/tiktok/profileGet a profile
Read an account's recent posts, page by pageGET /v1/tiktok/profile/videosGet posts one page at a time
Ask one question of many platforms at onceGET /v1/search/everywhereSearch many platforms
Price any call before you send itGET /v1/utility/estimatePrice a call before you send it

Get a profile

Why use it

Use it to read one account. You send a handle and get the name, the follower count and the bio. Other platforms answer in the same shape, so you change the platform in the path and nothing else.

Preferred call

GET /v1/tiktok/profile. Pass handle. Add counts=web for the counts the website shows.

Simple example

One call, no error handling.

Terminal
curl -s -G "https://www.socialcrawl.dev/v1/tiktok/profile" \
  -H "x-api-key: $SOCIALCRAWL_API_KEY" \
  --data-urlencode "handle=charlidamelio"

Complex example

Adds more params. With --fail-with-body curl exits with an error code on a failed call and still prints the answer, which names its error.type.

Terminal
curl -sS --fail-with-body -G "https://www.socialcrawl.dev/v1/tiktok/profile" \
  -H "x-api-key: $SOCIALCRAWL_API_KEY" \
  --data-urlencode "handle=charlidamelio" \
  --data-urlencode "counts=web"

Parameters

NameWhat it does
handleTikTok username without the @ symbol.
user_idTikTok numeric user ID.
countsapp (default) or web.

Get posts one page at a time

Why use it

Use it to read an account's recent videos. Each answer holds one page. To read the next page, send pagination.next_cursor back as cursor. Stop when pagination.has_more is false.

Preferred call

GET /v1/tiktok/profile/videos. Pass handle. Add since to stop at a date.

Simple example

One call, no error handling.

Terminal
curl -s -G "https://www.socialcrawl.dev/v1/tiktok/profile/videos" \
  -H "x-api-key: $SOCIALCRAWL_API_KEY" \
  --data-urlencode "since=2026-09-01" \
  --data-urlencode "handle=charlidamelio"

Complex example

Reads the first page, keeps its pagination.next_cursor, and sends it back as cursor for the second page.

Terminal
CURSOR=$(curl -s -G "https://www.socialcrawl.dev/v1/tiktok/profile/videos" \
    -H "x-api-key: $SOCIALCRAWL_API_KEY" \
    --data-urlencode "handle=charlidamelio" \
  | sed -n 's/.*"next_cursor":"\([^"]*\)".*/\1/p')
curl -s -G "https://www.socialcrawl.dev/v1/tiktok/profile/videos" \
  -H "x-api-key: $SOCIALCRAWL_API_KEY" \
  --data-urlencode "handle=charlidamelio" \
  --data-urlencode "cursor=$CURSOR"

Parameters

NameWhat it does
handleTikTok username without the @ symbol
user_idTikTok user id.
sinceOnly videos published on or after this date: YYYY-MM-DD (midnight UTC) or an ISO 8601 timestamp.
cursorThe pagination.next_cursor of the page before. Leave it out for the first page.

Search many platforms

Why use it

Use it to ask one question of many platforms in one call. Send it with dry_run=1 first. A dry run creates nothing, costs nothing and returns the estimate.

Preferred call

GET /v1/search/everywhere. Pass query. Narrow it with period and sources.

Simple example

One call, no error handling.

Terminal
curl -s -G "https://www.socialcrawl.dev/v1/search/everywhere" \
  -H "x-api-key: $SOCIALCRAWL_API_KEY" \
  --data-urlencode "query=kanye west" \
  --data-urlencode "dry_run=1"

Complex example

Adds more params. With --fail-with-body curl exits with an error code on a failed call and still prints the answer, which names its error.type.

Terminal
curl -sS --fail-with-body -G "https://www.socialcrawl.dev/v1/search/everywhere" \
  -H "x-api-key: $SOCIALCRAWL_API_KEY" \
  --data-urlencode "query=kanye west" \
  --data-urlencode "period=last_month" \
  --data-urlencode "sources=reddit,youtube" \
  --data-urlencode "dry_run=1"

Parameters

NameWhat it does
queryThe phrase to search on every platform, 1 to 512 characters.
periodA window by name: Nd for the last N days, yesterday, last_week, last_month, this_year and more.
sourcesOptional CSV allowlist of sources (mutually exclusive with exclude).
dry_runSend 1 to price the search without running it. Free.

Price a call before you send it

Why use it

Use it to learn what a call costs before you make it. You name the endpoint and its params. The answer is the price. The call is free.

Preferred call

GET /v1/utility/estimate. Pass id as platform/resource, and params as a query string.

Simple example

One call, no error handling.

Terminal
curl -s -G "https://www.socialcrawl.dev/v1/utility/estimate" \
  -H "x-api-key: $SOCIALCRAWL_API_KEY" \
  --data-urlencode "id=tiktok/post/comments" \
  --data-urlencode "params=url=https://www.tiktok.com/@stoolpresidente/video/7623818255903329566&label=spam"

Complex example

Adds more params. With --fail-with-body curl exits with an error code on a failed call and still prints the answer, which names its error.type.

Terminal
curl -sS --fail-with-body -G "https://www.socialcrawl.dev/v1/utility/estimate" \
  -H "x-api-key: $SOCIALCRAWL_API_KEY" \
  --data-urlencode "id=tiktok/profile/videos" \
  --data-urlencode "params=handle=charlidamelio" \
  --data-urlencode "items=100"

Parameters

NameWhat it does
idThe endpoint to price, as platform/resource (tiktok/post/comments) or its /v1 path, optionally with its query string.
paramsThe endpoint's own params, as a URL-encoded query string (url=...&label=spam) or a JSON object.
itemsRows you want.