{
  "openapi": "3.0.1",
  "info": {
    "title": "Truth Social Posts Scraper",
    "description": "Truth Social Posts Scraper SD - Truth Social Posts Scraper is a logged-out tool that extracts posts (Truths), replies and ReTruths from public Truth Social profiles: text, date, likes, ReTruths, replies, media, links, hashtags, mentions, quotes and author profile data, with full-history paging.",
    "version": "1.0",
    "x-build-id": "OKbbNEAP15257bhs8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neuro-scraper~truth-social-posts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neuro-scraper-truth-social-posts-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/neuro-scraper~truth-social-posts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-neuro-scraper-truth-social-posts-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/neuro-scraper~truth-social-posts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-neuro-scraper-truth-social-posts-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": {
          "usernames": {
            "title": "Usernames or profile URLs",
            "type": "array",
            "description": "Truth Social profiles, one per line: a username (realDonaldTrump), @handle (@JackPosobiec) or profile URL (https://truthsocial.com/@realDonaldTrump). Only profiles Truth Social shows to logged-out visitors return posts; the log names any profile that shows none.",
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "Post URLs or IDs",
            "type": "array",
            "description": "Optional. Specific posts to fetch, one per line: a post URL (https://truthsocial.com/@realDonaldTrump/posts/117408959105269388) or a bare post ID. One row per post.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "What to scrape for each profile",
            "enum": [
              "posts",
              "posts_and_replies",
              "replies",
              "profile"
            ],
            "type": "string",
            "description": "posts = the profile's posts and ReTruths (replies left out by the server); posts_and_replies = everything the profile wrote; replies = only its replies; profile = one profile-details row per profile (followers, posts count, bio, avatar ...), no posts. Trending content needs a logged-in account on Truth Social and is not offered.",
            "default": "posts"
          },
          "maxPosts": {
            "title": "Max posts per profile",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "How many posts to save for each profile. Pages of 20 (the server's fixed page size) are followed with Truth Social's own max_id cursor until this number, the date limit or the profile's first post. 0 = the whole history.",
            "default": 20
          },
          "onlyMedia": {
            "title": "Only posts with media",
            "type": "boolean",
            "description": "Keep only posts with images or videos (Truth Social's own only_media filter).",
            "default": false
          },
          "includeReblogs": {
            "title": "Include ReTruths (reposts)",
            "type": "boolean",
            "description": "Keep ReTruths of other people's posts. Turned off, they are dropped as pages are read (the server ignores its exclude_reblogs parameter - measured), so Max posts counts own posts only.",
            "default": true
          },
          "postsNewerThan": {
            "title": "Only posts newer than",
            "type": "string",
            "description": "Optional. Keep only posts published on or after this date (YYYY-MM-DD or ISO date-time), or a relative age such as '7 days' / '12 hours'. Posts come newest first, so paging stops at the first older post."
          },
          "startFromId": {
            "title": "Start from post ID",
            "type": "string",
            "description": "Optional. Start below this post ID (or post URL): only posts older than it are returned. Useful to continue a long history in several runs."
          },
          "continueFromLastPostId": {
            "title": "Only new posts since the last run",
            "type": "boolean",
            "description": "Monitoring mode: remember the newest post ID per profile in the named key-value store 'truth-social-posts-state' and, on the next run, stop at that post - only new posts are saved.",
            "default": false
          },
          "peek": {
            "title": "Peek (do not move the saved post ID)",
            "type": "boolean",
            "description": "With 'Only new posts since the last run': return the new posts but leave the saved post ID where it is, so the next normal run still returns them (a quick 'anything new?' check).",
            "default": false
          },
          "cleanContent": {
            "title": "Clean content (strip HTML)",
            "type": "boolean",
            "description": "content as plain text (paragraphs kept as line breaks). Turned off, content keeps Truth Social's HTML. contentHtml always has the HTML.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify residential proxies in the United States are the default and recommended (the API sits behind Cloudflare).",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}