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

Scrape accessible public Truth Social profiles and posts with text, engagement metrics, media links, and bounded pagination using ScrapeCreators.

- **URL**: https://apify.com/muhammadafzal/truth-social-scraper.md
- **Developed by:** [Muhammad Afzal](https://apify.com/muhammadafzal) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.00 / 1,000 public truth social records

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 Scraper

Collect accessible public Truth Social posts and profiles using ScrapeCreators. Supports user timelines with pagination, profile details, and individual post URLs. No user login or cookies are required. Coverage mainly includes prominent public accounts; most ordinary accounts require authentication and cannot be collected. There is no keyword search, private content, follower graph, or media download mode.

### Input

```json
{"mode":"posts","handles":["realDonaldTrump"],"maxItems":5,"maxPages":1}
```

Use `profiles` for account statistics and bios, or `post` with `postUrls`, for example `https://truthsocial.com/@realDonaldTrump/posts/114315219437063160`. Handles accept usernames, @usernames, and public profile URLs. Up to 10 targets; 1–100 total results; 1–10 timeline pages per account. Verified Apify free-plan runs are capped at five records, before further provider calls and each write. Missing local plan information does not impose that cap.

### Output

The default dataset contains homogeneous records with a `type` of `post` or `profile`, stable string `id`, source `url`, username/display name, text, creation date, available account and engagement counts, media links, reblog identity, collection timestamp, and `source: scrapecreators`. Missing fields are null; source HTML is converted to plain text. Provider credit balance and authentication values are excluded.

`OUTPUT` contains the run outcome, delivered count, request count, warnings, stop reason, charged result count, and free-plan ceiling. Empty timelines, unavailable posts, restricted accounts, input rejection, configuration errors, and unexpected provider failures remain distinguishable. Valid partial records are preserved. Do not interpret a zero-result access block as a successful scrape.

### Pricing

All-in pay per event. Platform usage is not passed through. One synthetic start fee per run; one synthetic dataset event per delivered record. No manual or duplicate charges.

| Event | FREE | BRONZE (2.5%) | SILVER (5%) | GOLD (20%) |
|---|---:|---:|---:|---:|
| Start | $0.005 | $0.005 | $0.005 | $0.005 |
| Public record | $0.010 | $0.00975 | $0.00950 | $0.00800 |

Start fees retain the $0.005 floor. FREE-tier totals: one result $0.015; five $0.055; 100 $1.005. Minimum supported charge budget $0.015. PLATINUM and DIAMOND retain GOLD prices. Private live tier pricing has been applied; the final QA report records billing evidence.

### Runtime and setup

Node.js 22, Apify SDK, Cheerio for HTML text normalization. Configure owner secret `SCRAPECREATORS_API_KEY`; credentials never belong in input. `npm ci`, `npm test`, then bounded `apify run`. Public API calls are sequential, limited to 30 page requests plus at most one retry each. Each request has a 30-second timeout; new work stops after 180 seconds. Cloud timeout is 240 seconds with 256 MB memory; the initial one-result cloud canary peaked at 55.3 MiB. No proxies or browser sessions are used. Media URLs may expire.

The Actor uses the user's configured provider account; provider credits are charged separately to the owner. Cost calculations must include these invoices, not only Apify usage. Apify charge caps do not cap owner provider or compute spend. Abort/migration stops new work and saves stable result identities; dataset identities are recovered on restart to prevent duplicate writes.

Public data only; collect only data you are permitted to use. This is an independent tool, not affiliated with Truth Social. ScrapeCreators endpoint and access limitations: https://scrapecreators.com/truthsocial-api/ and https://docs.scrapecreators.com/openapi.json.

# Actor input Schema

## `mode` (type: `string`):

Choose user timelines, public profiles, or individual post URLs.

## `handles` (type: `array`):

Up to 10 accessible public accounts. Mainly prominent public figures are available.

## `postUrls` (type: `array`):

Up to 10 https://truthsocial.com/@username/posts/id URLs; used only in individual post mode.

## `maxItems` (type: `integer`):

Global result limit across all targets. Free-plan limit is five.

## `maxPages` (type: `integer`):

Timeline pagination only; provider requests are additionally capped at 30 per run.

## Actor input object example

```json
{
  "mode": "posts",
  "handles": [
    "realDonaldTrump"
  ],
  "maxItems": 5,
  "maxPages": 1
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `summary` (type: `string`):

No description

# 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 = {
    "handles": [
        "realDonaldTrump"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammadafzal/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 = { "handles": ["realDonaldTrump"] }

# Run the Actor and wait for it to finish
run = client.actor("muhammadafzal/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 '{
  "handles": [
    "realDonaldTrump"
  ]
}' |
apify call muhammadafzal/truth-social-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,muhammadafzal/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/AvOObYg7N8VO401Eo/builds/ZeQnFd3IzoJfNHDyZ/openapi.json
