{
  "openapi": "3.0.1",
  "info": {
    "title": "Truth Social Scraper",
    "description": "Scrape Truth Social profiles, posts, replies, comments, search, hashtags and trending truths. MCP-ready, auto-detects mode from input.",
    "version": "1.0",
    "x-build-id": "1nIpoC8z3uLkPp0HA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~truth-social-all-in-one-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-truth-social-all-in-one-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/khadinakbar~truth-social-all-in-one-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-truth-social-all-in-one-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/khadinakbar~truth-social-all-in-one-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-truth-social-all-in-one-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "title": "Query (username, URL, post ID, #hashtag, or 'trending')",
            "type": "string",
            "description": "The main input, auto-detected. Accepts a username ('realDonaldTrump' or '@realDonaldTrump'), a profile URL ('https://truthsocial.com/@realDonaldTrump'), a post URL or 18-digit post ID, a '#hashtag', or the word 'trending'. Defaults to 'realDonaldTrump'. NOT for keyword search — use the Search Terms field for that. Ignored when Start URLs or Search Terms are provided.",
            "default": "realDonaldTrump"
          },
          "searchTerms": {
            "title": "Search Terms",
            "type": "array",
            "description": "Keywords or hashtags to search Truth Social for (e.g. 'tariffs', '#MAGA'). Each term runs a search and returns matching posts, accounts, or hashtags depending on Search Type. Requires authentication (Access Token or username/password) — Truth Social gates search behind login. This is keyword search, NOT a username lookup.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "A batch of Truth Social URLs to scrape — profile URLs, post URLs, or hashtag URLs (https://truthsocial.com/tags/MAGA). Each URL's mode is auto-detected. Use this for bulk runs across many profiles or posts. Takes priority over Query when both are set.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "mode": {
            "title": "Mode (override auto-detect)",
            "enum": [
              "auto",
              "profile",
              "post",
              "comments",
              "search",
              "hashtag",
              "trending",
              "profileMetadata"
            ],
            "type": "string",
            "description": "Force a specific scrape mode instead of auto-detecting from the input. 'auto' (default) infers the mode from Query/Start URLs. In public mode only profile, post, and profileMetadata work; comments, search, hashtag, and trending need an Access Token. 'profileMetadata' returns just bio + follower counts without posts.",
            "default": "auto"
          },
          "maxResults": {
            "title": "Maximum Results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The total maximum number of records (posts, profiles, comments, etc.) to return across the whole run. Controls cost: each result is billed once. Set higher for full timelines, lower for a quick sample. Minimum 1.",
            "default": 50
          },
          "includeReplies": {
            "title": "Include Replies",
            "type": "boolean",
            "description": "In profile mode, include the user's reply posts in addition to their main posts. When false (default), only top-level posts are returned. Has no effect in other modes.",
            "default": false
          },
          "onlyMedia": {
            "title": "Only Posts With Media",
            "type": "boolean",
            "description": "In profile/hashtag mode, return only posts that contain media (images or video). When false (default), all posts are returned. Useful for collecting visual content only.",
            "default": false
          },
          "includeComments": {
            "title": "Include Comment Thread (post mode)",
            "type": "boolean",
            "description": "When scraping a single post, also fetch its full comment/reply thread. Each comment counts as one result toward Maximum Results. When false (default), only the post itself is returned. Equivalent to selecting the 'comments' mode.",
            "default": false
          },
          "maxComments": {
            "title": "Maximum Comments Per Post",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Cap on the number of comments fetched per post when Include Comment Thread is on. Defaults to 40. Counts toward the overall Maximum Results limit.",
            "default": 40
          },
          "searchType": {
            "title": "Search Type",
            "enum": [
              "statuses",
              "accounts",
              "hashtags"
            ],
            "type": "string",
            "description": "What kind of results keyword search returns: 'statuses' (posts, default), 'accounts' (user profiles), or 'hashtags' (tag suggestions). Only applies when Search Terms are used.",
            "default": "statuses"
          },
          "includeProfileInfo": {
            "title": "Include Profile Info Record",
            "type": "boolean",
            "description": "In profile mode, emit one profile-metadata record (bio, follower counts, avatar) before the posts. When false (default), only posts are returned. The profile record counts as one result.",
            "default": false
          },
          "cleanContent": {
            "title": "Clean Post Content",
            "type": "boolean",
            "description": "Strip HTML tags from post content and return readable plain text (default). When false, the original HTML markup is preserved in the 'contentHtml' field. Mentions and hashtags are always also returned as structured arrays.",
            "default": true
          },
          "sinceLastRun": {
            "title": "Only New Since Last Run",
            "type": "boolean",
            "description": "Incremental mode: for profile/hashtag scrapes, return only posts newer than the most recent post seen on the previous run (tracked per target in the key-value store). Ideal for scheduled monitoring. When false (default), a normal full scrape runs.",
            "default": false
          },
          "accessToken": {
            "title": "Truth Social Access Token (optional)",
            "type": "string",
            "description": "Optional OAuth bearer token from a logged-in Truth Social web session. Truth Social now requires authentication to view non-prominent profiles; supply a token to unlock them. Leave empty for public mode (prominent accounts like realDonaldTrump work without it). Stored encrypted and never logged."
          },
          "username": {
            "title": "Truth Social Username (optional)",
            "type": "string",
            "description": "Optional Truth Social account username for password login, used to auto-fetch an access token when no Access Token is given. Pair with Password. Leave empty for public mode. Use a throwaway/research account, not a primary one."
          },
          "password": {
            "title": "Truth Social Password (optional)",
            "type": "string",
            "description": "Password for the Truth Social Username above, used only to obtain an OAuth token at runtime. Stored encrypted and never logged. Leave empty for public mode."
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings. RESIDENTIAL Apify Proxy is strongly recommended and on by default — Truth Social is behind Cloudflare and blocks datacenter IPs. Leave the default unless you have a specific reason to change it.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}