# Truth Social API: Get Posts as JSON

**Use case:** 

Use Truth Social as an API: send a username and get that account's latest posts back as structured JSON with text, time, URL, media, mentions, link cards and reply, reblog and like counts. Call it from Python, JavaScript or any HTTP client through the Apify API.

## Input

```json
{
  "username": "realDonaldTrump",
  "maxPosts": 50,
  "useLastPostId": false,
  "onlyReplies": false,
  "onlyMedia": false,
  "cleanContent": true
}
```

## Output

```json
{
  "id": {
    "label": "Post ID",
    "format": "text"
  },
  "created_at": {
    "label": "Created At",
    "format": "date"
  },
  "in_reply_to_id": {
    "label": "Reply To ID",
    "format": "text"
  },
  "quote_id": {
    "label": "Quote ID",
    "format": "text"
  },
  "in_reply_to_account_id": {
    "label": "Reply To Account ID",
    "format": "text"
  },
  "sensitive": {
    "label": "Sensitive Content",
    "format": "boolean"
  },
  "spoiler_text": {
    "label": "Spoiler Text",
    "format": "text"
  },
  "visibility": {
    "label": "Visibility",
    "format": "text"
  },
  "language": {
    "label": "Language",
    "format": "text"
  },
  "uri": {
    "label": "URI",
    "format": "link"
  },
  "url": {
    "label": "URL",
    "format": "link"
  },
  "content": {
    "label": "Content",
    "format": "text"
  },
  "account.id": {
    "label": "Account ID",
    "format": "text"
  },
  "account.username": {
    "label": "Username",
    "format": "text"
  },
  "account.acct": {
    "label": "Account",
    "format": "text"
  },
  "account.display_name": {
    "label": "Display Name",
    "format": "text"
  },
  "account.locked": {
    "label": "Account Locked",
    "format": "boolean"
  },
  "account.bot": {
    "label": "Bot Account",
    "format": "boolean"
  },
  "account.discoverable": {
    "label": "Discoverable",
    "format": "boolean"
  },
  "account.group": {
    "label": "Group Account",
    "format": "boolean"
  },
  "account.created_at": {
    "label": "Account Created At",
    "format": "date"
  },
  "account.note": {
    "label": "Bio",
    "format": "text"
  },
  "account.url": {
    "label": "Profile URL",
    "format": "link"
  },
  "account.avatar": {
    "label": "Avatar",
    "format": "image"
  },
  "account.avatar_static": {
    "label": "Static Avatar",
    "format": "image"
  },
  "account.header": {
    "label": "Header Image",
    "format": "image"
  },
  "account.header_static": {
    "label": "Static Header Image",
    "format": "image"
  },
  "account.followers_count": {
    "label": "Followers Count",
    "format": "number"
  },
  "account.following_count": {
    "label": "Following Count",
    "format": "number"
  },
  "account.statuses_count": {
    "label": "Posts Count",
    "format": "number"
  },
  "account.last_status_at": {
    "label": "Last Post At",
    "format": "date"
  },
  "account.verified": {
    "label": "Verified",
    "format": "boolean"
  },
  "account.location": {
    "label": "Location",
    "format": "text"
  },
  "account.website": {
    "label": "Website",
    "format": "link"
  },
  "account.unauth_visibility": {
    "label": "Unauthenticated Visibility",
    "format": "text"
  },
  "account.chats_onboarded": {
    "label": "Chats Onboarded",
    "format": "boolean"
  },
  "account.feeds_onboarded": {
    "label": "Feeds Onboarded",
    "format": "boolean"
  },
  "account.accepting_messages": {
    "label": "Accepts Messages",
    "format": "boolean"
  },
  "account.show_nonmember_group_statuses": {
    "label": "Show Non-member Group Posts",
    "format": "boolean"
  },
  "account.emojis": {
    "label": "Custom Emojis",
    "format": "array"
  },
  "account.fields": {
    "label": "Profile Fields",
    "format": "array"
  },
  "account.tv_onboarded": {
    "label": "TV Onboarded",
    "format": "boolean"
  },
  "account.tv_account": {
    "label": "TV Account",
    "format": "boolean"
  },
  "media_attachments": {
    "label": "Media Attachments",
    "format": "array"
  },
  "mentions": {
    "label": "Mentions",
    "format": "array"
  },
  "tags": {
    "label": "Tags",
    "format": "array"
  },
  "card": {
    "label": "Card",
    "format": "object"
  },
  "group": {
    "label": "Group",
    "format": "object"
  },
  "quote": {
    "label": "Quote",
    "format": "object"
  },
  "in_reply_to": {
    "label": "Reply To",
    "format": "object"
  },
  "reblog": {
    "label": "Reblog",
    "format": "object"
  },
  "sponsored": {
    "label": "Sponsored",
    "format": "boolean"
  },
  "replies_count": {
    "label": "Replies Count",
    "format": "number"
  },
  "reblogs_count": {
    "label": "Reblogs Count",
    "format": "number"
  },
  "favourites_count": {
    "label": "Favourites Count",
    "format": "number"
  },
  "favourited": {
    "label": "Favorited",
    "format": "boolean"
  },
  "reblogged": {
    "label": "Reblogged",
    "format": "boolean"
  },
  "muted": {
    "label": "Muted",
    "format": "boolean"
  },
  "pinned": {
    "label": "Pinned",
    "format": "boolean"
  },
  "bookmarked": {
    "label": "Bookmarked",
    "format": "boolean"
  },
  "poll": {
    "label": "Poll",
    "format": "object"
  },
  "emojis": {
    "label": "Emojis",
    "format": "array"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Truth Social Scraper Actor is ready to run with the inputs already set for "Truth Social API: Get Posts as JSON". [Sign up or log in](https://console.apify.com/create-task-from-example/JV22vSWNmXKPWC9nf) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Truth Social API: Get Posts as JSON" task

The Truth Social Scraper Actor will start running based on the input automatically. You can also change all the input fields, like truth social username, maximum number of posts, and more, to match your specific use case.

### 3. Receive the "Truth Social API: Get Posts as JSON" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as post id, created at, reply to id, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Truth Social API: Get Posts as JSON" task via API](https://apify.com/muhammetakkurtt/truth-social-scraper.md).

## FAQ

### Does Truth Social have a public API?

Truth Social does not offer an open developer API. This task works as a Truth Social API: send a username and get that account's posts back as structured JSON.

### How do I call the Truth Social API from Python?

Use the apify-client library: call this task with a username and max posts, then read the run's dataset. Each post comes back as JSON with text, time, URL, media and counts.

### What JSON fields does each Truth Social post have?

id, created_at, url, content, account details, media_attachments, mentions, tags, the link card and quote, plus replies_count, reblogs_count and favourites_count.

### Can I get only new posts with each API call?

Yes. Turn on Use last post ID and each call returns only posts newer than the last one seen for that username, which is ideal for polling.

### Do I need a Truth Social account or API key?

No. You don't need a Truth Social account, login or API key; only an Apify account to run the task or call it through the Apify API.

## About this Actor

This example demonstrates how to use [Truth Social Scraper](https://apify.com/muhammetakkurtt/truth-social-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/muhammetakkurtt/truth-social-scraper.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/muhammetakkurtt/truth-social-scraper.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
