Docs menu

Quickstart

You need an API key. Sign up at socialscrape.io and open the dashboard: new accounts get 100 free credits, once, with no card. Create a key there and keep it somewhere safe; it is shown once.

Put the key in an environment variable so the examples below run as written:

export SOCIALSCRAPE_API_KEY="your key here"

1. Make a request#

This calls TikTok profile. It costs 1 credit.

curl
curl -G "https://api.socialscrape.io/v1/tiktok/profile" \
  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \
  --data-urlencode "handle=khaby.lame"
Python
import os
import requests

params = {
    "handle": "khaby.lame",
}
res = requests.get(
    "https://api.socialscrape.io/v1/tiktok/profile",
    headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
    params=params,
)
body = res.json()

if body["ok"]:
    print(body["data"])
else:
    print(body["error"]["code"], body["error"]["message"])
TypeScript
const url = new URL("https://api.socialscrape.io/v1/tiktok/profile");
url.search = new URLSearchParams({
  "handle": "khaby.lame"
}).toString();
const res = await fetch(url, {
  headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();

if (body.ok) {
  console.log(body.data);
} else {
  console.error(body.error.code, body.error.message);
}

2. Read the answer#

{
  "ok": true,
  "credits_charged": 1,
  "credits_remaining": 4999,
  "cached": false,
  "cached_at": null,
  "request_id": "req_7115b8735eb56e7912694547",
  "data": {
    "object": "profile",
    "platform": "tiktok",
    "id": "127905465618821121",
    "handle": "khaby.lame",
    "name": "Khabane lame",
    "headline": null,
    "url": "https://www.tiktok.com/@khaby.lame",
    "kind": "creator",
    "bio": "Se vuoi ridere sei nel posto giusto😎 If u wanna laugh u r in the right place😎",
    "avatar_url": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-avt-0068-tx2/08987e23b94057953fd4f1738694bf5f~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=9640&refresh_token=09620b70&x-expires=1793498400&x-signature=hw%2FPqIqA%2BljrQyBvlTT4x5JfKuQ%3D&t=4...",
    "banner_url": null,
    "verified": true,
    "is_private": false,
    "external_url": null,
    "links": null,
    "location": null,
    "category": null,
    "created_at": null,
    "stats": {
      "followers": 162967647,
      "following": 82,
      "posts": 1359,
      "likes": 2691641827,
      "views": null
    },
    "extra": {
      "comment_setting": 0,
      "download_setting": 0,
      "duet_setting": 0,
      "following_visible": true,
      "friends": 77,
      "is_commerce_user": false,
      "is_organization": false,
      "is_tiktok_seller": false,
      "language": "en",
      "sec_uid": "MS4wLjABAAAAwAg0rSzO65WQfz4RzQgGv2Xdv108BgPXhRrrmNVIHQZ9PO8-flwwRtEppYTS0OjA",
      "stitch_setting": 0
    }
  },
  "cursor": null,
  "has_more": null
}

This response is a sample. Your own will carry live values.

  • ok is true. A failure has ok: false and an error object instead of data; see Errors.
  • credits_charged is what this request cost, and credits_remaining what is left. A failed request charges 0.
  • cached is false because this was fetched fresh. See Caching to reuse results for free.
  • request_id identifies the request. Quote it when you write to support.
  • data is the result, in a shape shared across platforms. See Data models.

3. Go further#

  • Lists return a cursor. Pass it back to get the next page: Pagination.
  • Pass trim=true for a smaller response, or raw=true to also get the platform's original object.
  • Look up many things at once with batch, or watch a profile with monitors.
  • Browse the API reference for every endpoint and its parameters.
  • Using an AI agent? See MCP.