Get Truth Social profiles and posts

A handle returns the public profile, then the account's own posts, newest first.

Search interest in a Truth Social API is a request for public profiles and posts as JSON. SocialScrape serves that with two GET routes, both in beta. This is not an official Truth Social developer product. You send a SocialScrape key in the x-api-key header. Keys are described in authentication.

Profile#

GET /v1/truthsocial/profile requires handle, with or without @. username is an alias. Accounts that do not exist answer not_found. A bad parameter is invalid_params. Neither is retryable.

The recorded request uses a handle.

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

params = {
    "handle": "realDonaldTrump",
}
res = requests.get(
    "https://api.socialscrape.io/v1/truthsocial/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/truthsocial/profile");
url.search = new URLSearchParams({
  "handle": "realDonaldTrump"
}).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);
}

data is a profile. platform is truthsocial. The shared fields are id, handle, name, headline, url, bio, avatar_url, banner_url, verified, is_private, external_url, links, location, category and created_at. Null means the page did not include that value.

stats.followers, stats.following and stats.posts are the public counts. stats.likes and stats.views are null when the profile has no such numbers. Do not store null as zero.

extra on the recorded profile includes accepting_messages, acct, is_bot, is_group, is_premium, is_tv_account and last_status_at. id on the profile is the numeric user id. Keep it. The posts endpoint can take that id and skip a second lookup.

Sample. The recorded response is shortened. Counts in it are the sample.

Posts#

GET /v1/truthsocial/profile/posts lists the account's own posts, newest first. ReTruths are left out. Send handle or id. One of them is required. id is the numeric user id from the profile. user_id aliases id. cursor pages.

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

params = {
    "handle": "realDonaldTrump",
}
res = requests.get(
    "https://api.socialscrape.io/v1/truthsocial/profile/posts",
    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/truthsocial/profile/posts");
url.search = new URLSearchParams({
  "handle": "realDonaldTrump"
}).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);
}

Each item is a post: id, url, text, published_at, author, media, stats. stats.likes, stats.comments and stats.shares are filled when the post has them. stats.views and stats.saves are null when absent. Truth Social's own votes are not squeezed into likes. They are extra.upvotes and extra.downvotes. extra also has card, links and visibility.

data.cursor and data.has_more, and the same fields on the envelope, control paging. Pass cursor back unchanged until has_more is false. Each page is 1 credit. The loop is in pagination. parent is the account.

One post by URL is GET /v1/truthsocial/post. The parameter is url, shaped like truthsocial.com/@user/<id>. That response is a single post with the same stat and extra fields. Use it when you already have a link and do not need the feed.

Cost#

Profile: 1 credit. Each page of posts: 1 credit. A single post: 1 credit. All three are cacheable for 30 days. Send max_age_days (0 to 30) to take a cached copy for 0 credits. Failures cost 0. New accounts get 100 credits once, no card. Pack and plan prices are on pricing. How plan credits and pack credits are spent is in credits.

Limits#

You get public posts the account published, without ReTruths. You do not get a private account, a follower list, or a full-text search of the network from these two routes. If the profile is not_found, stop. Paging stops when has_more is false. That means this feed ended, not that every historical post on the internet was collected.

visibility in extra is the value the payload carries. Do not infer a second privacy model on top of it.

The team rate limit still applies: 30 requests a minute on free credits, 300 with a paid pack, 120 to 1,200 on monthly plans. 429 rate_limited is free and retryable. See rate limits and errors.

The API is in early access. These endpoints are beta, so the shape may gain fields. Missing fields stay null.

Next#

Profile: Truth Social profile API, tutorial, reference. Posts: profile posts API, tutorial, reference. The hub is the Truth Social API.

The same profile-then-feed pattern on Bluesky is Get a Bluesky profile and its posts. On Threads it is Get Threads profiles, posts and search.

Questions

Is this Truth Social's own API?

No. It is a SocialScrape GET that returns the public profile and posts. You authenticate with your SocialScrape key, not a Truth Social token.

Are ReTruths included?

No. The profile posts endpoint returns the account's own posts and leaves ReTruths out.

Why pass the numeric id on the second call?

handle works. A numeric id, the profile's id, skips a lookup. user_id is an alias of id.

What do upvotes mean?

extra.upvotes and extra.downvotes are Truth Social's own counters. stats.likes, stats.comments and stats.shares are the shared post fields. views is null when it is not provided.

Build on social data early.

Developers and agent builders get the first keys.

Get early access