{
  "openapi": "3.0.1",
  "info": {
    "title": "Truth Social Scraper",
    "description": "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.",
    "version": "0.0",
    "x-build-id": "TUhAJB7WpNO6P1MIF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/muhammetakkurtt~truth-social-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-muhammetakkurtt-truth-social-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/muhammetakkurtt~truth-social-scraper/runs": {
      "post": {
        "operationId": "runs-sync-muhammetakkurtt-truth-social-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/muhammetakkurtt~truth-social-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-muhammetakkurtt-truth-social-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",
        "required": [
          "username"
        ],
        "properties": {
          "username": {
            "title": "Truth Social Username",
            "type": "string",
            "description": "The Truth Social username of the account you want to scrape posts from. This field identifies which user's timeline will be fetched.\n\n**Accepted formats:**\n- Just the username: `realDonaldTrump`\n- With @ prefix: `@realDonaldTrump`\n- Full profile URL: `https://truthsocial.com/@realDonaldTrump`\n\nThe scraper will automatically normalize any of these formats to extract the username.",
            "default": "realDonaldTrump"
          },
          "maxPosts": {
            "title": "Maximum Number of Posts",
            "minimum": 5,
            "type": "integer",
            "description": "The maximum number of posts to scrape from the user's timeline. Use this to control the volume of data collected and manage costs.\n\n**Guidelines:**\n- Minimum value: 5 posts\n- For getting a quick sample, use 10-20 posts\n- For comprehensive data collection, increase as needed\n- The actual number of posts returned may be less if the user has fewer posts available",
            "default": 20
          },
          "useLastPostId": {
            "title": "Continue from Last Post ID",
            "type": "boolean",
            "description": "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.\n\n**How it works:**\n- Each username has its own stored 'last post ID' in persistent storage\n- On the first run, all posts are fetched normally\n- On subsequent runs, only new posts are fetched\n\n**Important:** Cannot be used together with 'Start from Post ID' option.",
            "default": false
          },
          "onlyReplies": {
            "title": "Only Fetch Replies",
            "type": "boolean",
            "description": "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.\n\n**Use cases:**\n- Analyze user's engagement patterns\n- Study conversation threads\n- Track responses to specific topics\n\n**Note:** When disabled (default), only main posts (not replies) are fetched.",
            "default": false
          },
          "onlyMedia": {
            "title": "Only Fetch Posts with Media",
            "type": "boolean",
            "description": "Filter the scraper to collect only posts that contain media attachments such as photos, videos, or other visual content.\n\n**Use cases:**\n- Collect visual content from a user\n- Analyze media sharing patterns\n- Download images or video content\n\n**Note:** Posts without any media attachments will be skipped when this option is enabled.",
            "default": false
          },
          "cleanContent": {
            "title": "Clean Content",
            "type": "boolean",
            "description": "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.\n\n**When enabled (recommended):**\n- HTML tags are stripped\n- Extra whitespace is normalized\n- URLs are extracted from link elements\n- Content is ready for text analysis\n\n**When disabled:**\n- Original HTML content is preserved\n- Useful if you need raw markup for further processing",
            "default": true
          },
          "startFromId": {
            "title": "Start from Post ID",
            "pattern": "^[0-9]{18}$",
            "minLength": 18,
            "maxLength": 18,
            "type": "string",
            "description": "Fetch posts older than a specific post ID. This allows pagination from a known point in the user's timeline.\n\n**Format:** 18-digit numeric post ID (e.g., `113847449027767807`)\n\n**How it works:**\n- The scraper will fetch posts with IDs less than (older than) the specified ID\n- The specified post ID itself will NOT be included in results\n- Useful for resuming interrupted scrapes or fetching historical data\n\n**Important:** Cannot be used together with 'Continue from Last Post ID' option."
          },
          "singlePostId": {
            "title": "Fetch Single Post by ID or URL",
            "type": "array",
            "description": "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.\n\n**Accepted formats per item:**\n- Numeric ID: `114784862292392723`\n- Post URL (format 1): `https://truthsocial.com/@username/posts/114784862292392723`\n- Post URL (format 2): `https://truthsocial.com/@username/114784862292392723`\n\n**Important notes:**\n- When this field is used, all other timeline fetching options are ignored\n- Each post ID is charged separately even if the post is not found\n- You can mix different formats in the same list",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}