# Truth Social Scraper (`muhammetakkurtt/truth-social-scraper`) Actor

Extract Truth Social profile posts with this professional Apify actor tool. Collect content from Donald Trump and key profiles. Analyze interactions, media and replies with real-time data. Ideal for political monitoring, market research and trend analysis.  API integration for real-time data flow.

- **URL**: https://apify.com/muhammetakkurtt/truth-social-scraper.md
- **Developed by:** [Muhammet Akkurt](https://apify.com/muhammetakkurtt) (community)
- **Categories:** Social media, Developer tools, Other
- **Stats:** 1,943 total users, 151 monthly users, 100.0% runs succeeded, 45 bookmarks
- **User rating**: 4.42 out of 5 stars

## Pricing

from $2.00 / 1,000 each post scrapes

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

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 examples already wired to this Actor's own input schema, see the [API](#api) section below.

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`).

# README

![Truth Social API: The Most Comprehensive Data Extraction Tool](https://i.postimg.cc/9fv4szLG/Truth-Social-logo.png)

## Truth Social Scraper

Take your social media analytics to the next level with the most advanced [Truth Social](https://truthsocial.com/) data collection tool! A professional Apify actor designed to quickly and efficiently extract profile posts (truths) from the [Truth Social](https://truthsocial.com/) platform. This advanced web scraper provides an excellent solution for social media analytics, content monitoring, market research, and data mining! Easily collect posts, interactions, and media content from Donald Trump and other prominent profiles. Optimize your workflows with API integration and automated data flow.

### 🌐 Real-Time Stream Service (WebSocket)

Track Donald J. Trump’s Truth Social posts in real-time using a blazing fast WebSocket-based stream service — built for developers, analysts, and automation systems.

#### 🚀 Ideal for real-time monitoring, political alerts, media workflows, and more.

#### ⚡ What It Does

- Establishes a persistent WebSocket connection
- Instantly delivers the latest Donald J. Trump’s Truth Social posts
- No need to poll or schedule scraping jobs
- Works perfectly with alert systems, live feeds, and real-time analytics dashboards

#### 🛠️ Setup & Access

To start using the service or get pricing details, feel free to reach out:
📩 Contact me on Discord: @muhammetakkurtt

### 🚀 Why You Should Use Truth Social Scraper?

- **Comprehensive Data Collection**: Collect all truths, interactions, and media content with a single tool
- **Real-Time Monitoring**: Track important profiles instantly and capture changes
- **Easy Integration**: Seamlessly integrate with your existing systems using API-based architecture
- **Flexible Fetching Options**: Get entire timelines or target specific posts by ID or URL
- **Data-Driven Decisions**: Strengthen your strategies with social media analytics
- **Time Saving**: Automate manual data collection processes
- **Per-User History Tracking**: Each username has its own post tracking history for efficient incremental updates

### 📊 Use Cases

#### 1. Political Analysis and Campaign Monitoring

Truth Social is an important platform, especially in US politics. With this tool:

- Automatically monitor posts from political figures
- Instantly record the latest posts from US President Donald Trump
- Track campaign announcements and announcements in real-time
- Analyze candidate posts during election periods
- Compare social media strategies of political rivals

#### 2. Market Research and Trend Analysis

- Discover current discussions about specific industries or topics
- Detect rising trends and discussion topics early
- Analyze user reactions and interactions
- Conduct topic-based content analysis through hashtags

#### 3. Academic Research and Data Science

- Create datasets for social media content analysis
- Provide resources for sentiment analysis and natural language processing studies
- Collect large datasets to analyze social trends
- Make cross-platform social media comparisons

#### 4. Content and Media Monitoring

- Capture statements from important figures at the first moment
- Detect viral content early to avoid missing newsworthy developments
- Automatically archive media content (visual, video) on specific topics
- Track platform trends with regular reports

### 🔍 Features

- Scrape posts from a specific Truth Social profile
- Collect the following information:
  - Post ID and content
  - Creation date
  - Account details (username, display name, profile picture, etc.)
  - Interaction counts (replies, retruth, likes)
  - Media attachments (images, videos)
  - Reply and quote information
  - Tags and mentions
  - Visibility and language settings
- Clean and format HTML content
- Persistent user-specific tracking of last scraped post ID
- Ability to scrape only replies or media posts
- Ability to scrape backwards from a specific post ID
- Ability to fetch a single post by its ID or URL

### ⚡ Ready-to-Run Examples

Get started in seconds — open any example in the Apify Console and click **Run**:

- **[Trump Latest Posts Monitor](https://apify.com/muhammetakkurtt/truth-social-scraper/examples/monitor-latest-trump-truth-social-posts)** — fetch the latest posts from a Truth Social account.
- **[Track New Trump Posts Without Duplicates](https://apify.com/muhammetakkurtt/truth-social-scraper/examples/track-new-trump-posts-without-duplicates)** — monitor an account and collect only new posts on each run.
- **[Scrape Posts by Username](https://apify.com/muhammetakkurtt/truth-social-scraper/examples/scrape-truth-social-posts-by-username)** — scrape any Truth Social account's posts with text, media, and engagement metrics.
- **[Scrape Posts with Media](https://apify.com/muhammetakkurtt/truth-social-scraper/examples/scrape-truth-social-media-posts)** — collect only posts that contain images or videos.
- **[Scrape Replies](https://apify.com/muhammetakkurtt/truth-social-scraper/examples/scrape-truth-social-replies)** — fetch only the replies an account posts.
- **[Fetch a Single Post](https://apify.com/muhammetakkurtt/truth-social-scraper/examples/fetch-single-truth-social-post)** — get one specific post by its ID or URL.

### 🔗 Related Actors

- [Truth Social Comment Scraper](https://apify.com/muhammetakkurtt/truthsocial-comment-scraper): Collect comments from Truth Social posts
  - Extract all comments from specific posts
  - Sort by trending, newest, or controversial comments
  - Perform interaction and sentiment analysis

- [Truth Social Trends Scraper](https://apify.com/muhammetakkurtt/truthsocial-trends-scraper): Collects trending posts from Truth Social
  - Automatically collects popular posts
  - Provides data for interaction and content analysis
  - Tracks trending topics and hashtags

- [Truth Social Hashtag Scraper](https://apify.com/muhammetakkurtt/truthsocial-hashtag-scraper): Extract hashtag-based content from Truth Social
  - Capture all posts containing specific hashtags
  - Track hashtag trends and interaction patterns
  - Discover influential voices within hashtag communities

### 📝 Usage

#### Basic Settings

- **username**: Truth Social username (example: realDonaldTrump)
  - Plain username
  - Username starting with @
  - Profile URL format
- **maxPosts**: Maximum number of posts to scrape (default: 20)
- **useLastPostId**: Continue from the last saved post ID for this specific user (default: false)
  - Each username has its own dedicated storage for tracking the last post ID
  - Enables efficient incremental scraping for all monitored users
  - Perfect for regularly monitoring multiple accounts without duplication
- **onlyReplies**: Scrape only replies (default: false)
- **onlyMedia**: Scrape only posts containing media (default: false)
- **cleanContent**: Clean and format content (default: true)

#### Advanced Settings

- **startFromId**: Fetches posts older than the specified post ID.
  - The specified post ID itself will not be included in the results.
  - Example: `113847449027767807`
  - Cannot be used with `useLastPostId`.
- **singlePostId**: Fetch one or more posts by their IDs or URLs
  - Example ID: 114784862292392723
  - Example URL formats:
    - https://truthsocial.com/@username/posts/114784862292392723
    - https://truthsocial.com/@username/114784862292392723
  - When used, other timeline fetching options are ignored
  - You can provide multiple IDs/URLs to fetch multiple specific posts at once
  - Note: If the post cannot be found despite having a valid ID format, you will be charged for the post ID.

#### Example Input

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

#### Example Single Post Input

```json
{
  "singlePostId": [
    "https://truthsocial.com/@realDonaldTrump/114784862292392723",
    "114784862292392724",
    "https://truthsocial.com/@realDonaldTrump/posts/114784862292392725"
  ],
  "cleanContent": true
}
```

### 📊 Output Format

The scraped posts are saved to the Apify dataset. Each post contains the following data:

#### Post Information

- **id**: Unique identifier of the post
- **created_at**: Creation timestamp of the post
- **content**: Main text content of the post
- **visibility**: Privacy setting of the post (public, private, etc.)
- **language**: Language code of the post content
- **uri**: Internal reference URI
- **url**: Public URL of the post
- **sensitive**: Flag indicating sensitive content
- **spoiler_text**: Warning text for sensitive content

#### Account Details

- **account.id**: Unique identifier of the account
- **account.username**: Username without @ symbol
- **account.acct**: Full account identifier
- **account.display_name**: Display name of the account
- **account.locked**: Whether the account is locked
- **account.bot**: Whether the account is a bot
- **account.discoverable**: Whether the account is discoverable
- **account.group**: Whether the account is a group account
- **account.created_at**: Account creation date
- **account.note**: Account biography/description
- **account.url**: Profile URL
- **account.avatar**: URL to profile picture
- **account.avatar_static**: Static version of avatar
- **account.header**: Header/banner image URL
- **account.header_static**: Static version of header image
- **account.followers_count**: Number of followers
- **account.following_count**: Number of accounts being followed
- **account.statuses_count**: Total number of posts
- **account.last_status_at**: Date of last post
- **account.verified**: Verification status of the account
- **account.location**: Account location
- **account.website**: Account website URL
- **account.unauth_visibility**: Visibility without authentication
- **account.chats_onboarded**: Whether chats feature is enabled
- **account.feeds_onboarded**: Whether feeds feature is enabled
- **account.accepting_messages**: Whether account accepts messages
- **account.show_nonmember_group_statuses**: Group post visibility setting
- **account.emojis**: Custom emojis used by account
- **account.fields**: Additional profile fields
- **account.tv_onboarded**: Whether TV feature is enabled
- **account.tv_account**: Whether account is a TV account

#### Interaction Data

- **replies_count**: Number of replies to the post
- **reblogs_count**: Number of retruths
- **favourites_count**: Number of likes
- **favourited**: Whether the post is liked by the authenticated user
- **reblogged**: Whether the post is retruthed by the authenticated user
- **bookmarked**: Whether the post is bookmarked
- **pinned**: Whether the post is pinned to profile

#### Related Content

- **in_reply_to_id**: ID of the post being replied to
- **in_reply_to_account_id**: ID of the account being replied to
- **quote_id**: ID of the quoted post
- **media_attachments**: Array of media files (images, videos)
- **mentions**: Array of mentioned accounts
- **tags**: Array of hashtags used
- **emojis**: Array of custom emojis used
- **card**: Preview card for links
- **poll**: Poll information if present

#### Retruth & Quote Information

- **reblog**: Full data of retruthed content
- **quote**: Full data of quoted content
- **in_reply_to**: Full data of parent post if reply

#### Additional Flags

- **sponsored**: Whether the post is sponsored content
- **muted**: Whether the post's notifications are muted
- **group**: Group information if posted in a group

### Example Output

```json
{
        "id": "113847449027767807",
        "created_at": "2025-01-18T04:23:30.018Z",
        "in_reply_to_id": null,
        "quote_id": null,
        "in_reply_to_account_id": null,
        "sensitive": false,
        "spoiler_text": "",
        "visibility": "public",
        "language": "en",
        "uri": "https://truthsocial.com/@realDonaldTrump/113847449027767807",
        "url": "https://truthsocial.com/@realDonaldTrump/113847449027767807",
        "content": "Coming up, THE MOST IMPORTANT WEEKEND, PLUS, IN AMERICAN HISTORY. ENJOY! DJT",
        "account": {
            "id": "107780257626128497",
            "username": "realDonaldTrump",
            "acct": "realDonaldTrump",
            "display_name": "Donald J. Trump",
            "locked": false,
            "bot": false,
            "discoverable": false,
            "group": false,
            "created_at": "2022-02-11T16:16:57.705Z",
            "note": "<p></p>",
            "url": "https://truthsocial.com/@realDonaldTrump",
            "avatar": "https://static-assets-1.truthsocial.com/tmtg:prime-ts-assets/accounts/avatars/107/780/257/626/128/497/original/454286ac07a6f6e6.jpeg",
            "avatar_static": "https://static-assets-1.truthsocial.com/tmtg:prime-ts-assets/accounts/avatars/107/780/257/626/128/497/original/454286ac07a6f6e6.jpeg",
            "header": "https://static-assets-1.truthsocial.com/tmtg:prime-ts-assets/accounts/headers/107/780/257/626/128/497/original/ba3b910ba387bf4e.jpeg",
            "header_static": "https://static-assets-1.truthsocial.com/tmtg:prime-ts-assets/accounts/headers/107/780/257/626/128/497/original/ba3b910ba387bf4e.jpeg",
            "followers_count": 8541456,
            "following_count": 71,
            "statuses_count": 24750,
            "last_status_at": "2025-01-18",
            "verified": true,
            "location": "",
            "website": "www.DonaldJTrump.com",
            "unauth_visibility": true,
            "chats_onboarded": true,
            "feeds_onboarded": true,
            "accepting_messages": false,
            "show_nonmember_group_statuses": null,
            "emojis": [],
            "fields": [],
            "tv_onboarded": false,
            "tv_account": false
        },
        "media_attachments": [],
        "mentions": [],
        "tags": [],
        "card": null,
        "group": null,
        "quote": null,
        "in_reply_to": null,
        "reblog": null,
        "sponsored": false,
        "replies_count": 2435,
        "reblogs_count": 5407,
        "favourites_count": 22713,
        "favourited": false,
        "reblogged": false,
        "muted": false,
        "pinned": false,
        "bookmarked": false,
        "poll": null,
        "emojis": []
}
```

This example output shows the structure of a single truth. The actual output will be a list of similar objects for all scraped truths.

### 💡 Recommended Strategies

#### Regular Data Collection

For best results, plan to collect data at regular intervals:

- Daily monitoring for important profiles
- Keep useLastPostId enabled to ensure you only get new content without duplication
- Create automated flows with webhooks

#### Data Analysis Tips

- Export output data in CSV or Excel format
- Compare post interactions over time
- Perform performance analysis by content type (media, text, quotes)

#### API Integration

Integrate Truth Social Scraper with your existing systems:

- Provide automatic data flow to CRM systems
- Use webhook triggers for marketing automation
- Create customized reports and dashboards

#### Multi-User Monitoring

The scraper is optimized for monitoring multiple users efficiently:

- Each username has its own dedicated storage for last post ID
- No cross-contamination between different monitored accounts
- Perfect for tracking multiple political figures, brands, or topics

### Notes

- The collected data is stored in Apify's default data store.
- Last post IDs are stored in user-specific key-value stores for reliable incremental updates.

# Actor input Schema

## `username` (type: `string`):

The Truth Social username of the account you want to scrape posts from. This field identifies which user's timeline will be fetched.

**Accepted formats:**

- Just the username: `realDonaldTrump`
- With @ prefix: `@realDonaldTrump`
- Full profile URL: `https://truthsocial.com/@realDonaldTrump`

The scraper will automatically normalize any of these formats to extract the username.

## `maxPosts` (type: `integer`):

The maximum number of posts to scrape from the user's timeline. Use this to control the volume of data collected and manage costs.

**Guidelines:**

- Minimum value: 5 posts
- For getting a quick sample, use 10-20 posts
- For comprehensive data collection, increase as needed
- The actual number of posts returned may be less if the user has fewer posts available

## `useLastPostId` (type: `boolean`):

Enable incremental scraping to fetch only new posts since the last run. When enabled, the scraper stores the most recent post ID for each username and only collects posts newer than that.

**How it works:**

- Each username has its own stored 'last post ID' in persistent storage
- On the first run, all posts are fetched normally
- On subsequent runs, only new posts are fetched

**Important:** Cannot be used together with 'Start from Post ID' option.

## `onlyReplies` (type: `boolean`):

Filter the scraper to collect only reply posts from the user's timeline. Replies are posts that the user made in response to other posts.

**Use cases:**

- Analyze user's engagement patterns
- Study conversation threads
- Track responses to specific topics

**Note:** When disabled (default), only main posts (not replies) are fetched.

## `onlyMedia` (type: `boolean`):

Filter the scraper to collect only posts that contain media attachments such as photos, videos, or other visual content.

**Use cases:**

- Collect visual content from a user
- Analyze media sharing patterns
- Download images or video content

**Note:** Posts without any media attachments will be skipped when this option is enabled.

## `cleanContent` (type: `boolean`):

Automatically clean and format post content for better readability. When enabled, the scraper removes HTML tags, normalizes whitespace, and preserves mentions and hashtags as plain text.

**When enabled (recommended):**

- HTML tags are stripped
- Extra whitespace is normalized
- URLs are extracted from link elements
- Content is ready for text analysis

**When disabled:**

- Original HTML content is preserved
- Useful if you need raw markup for further processing

## `startFromId` (type: `string`):

Fetch posts older than a specific post ID. This allows pagination from a known point in the user's timeline.

**Format:** 18-digit numeric post ID (e.g., `113847449027767807`)

**How it works:**

- The scraper will fetch posts with IDs less than (older than) the specified ID
- The specified post ID itself will NOT be included in results
- Useful for resuming interrupted scrapes or fetching historical data

**Important:** Cannot be used together with 'Continue from Last Post ID' option.

## `singlePostId` (type: `array`):

Fetch one or more specific posts by their IDs or URLs instead of scraping the user's timeline. Useful when you need to collect specific posts rather than browsing through a timeline.

**Accepted formats per item:**

- Numeric ID: `114784862292392723`
- Post URL (format 1): `https://truthsocial.com/@username/posts/114784862292392723`
- Post URL (format 2): `https://truthsocial.com/@username/114784862292392723`

**Important notes:**

- When this field is used, all other timeline fetching options are ignored
- Each post ID is charged separately even if the post is not found
- You can mix different formats in the same list

## Actor input object example

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

# Actor output Schema

## `posts` (type: `string`):

All scraped Truth Social posts in JSON format. Each post includes: content, creation date, author details (username, display name, followers), engagement metrics (replies, reblogs, favourites), media attachments, and URL.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammetakkurtt/truth-social-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("muhammetakkurtt/truth-social-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call muhammetakkurtt/truth-social-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,muhammetakkurtt/truth-social-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/sTDLfdZAmte0aYlxg/builds/Oe2984AWcfgzhhgzv/openapi.json
