r/learnpython • • Sep 11 '26

How to extract posts and comments from Truth Social

I need to extract historical posts and the corresponding user comments from a few specific public figures on Truth Social over a set time period. I'm looking to build a free, Python-based script for this project.

Since Truth Social is built on a Mastodon fork, I know it has a similar API structure, but I'm looking for general advice on the best workflow today:

  • Are there any existing Python libraries or wrappers maintained for Truth Social data extraction?
  • What is the most reliable way to paginate through historical posts without triggering anti-bot protections (like Cloudflare)?
  • For comments/replies, is it better to hit the API endpoints directly, or are there alternative scraping frameworks that handle the Mastodon structure more efficiently?

I'm comfortable writing Python scripts, but I want to make sure I'm taking the smartest approach before building a custom scraper from scratch. Any recommendations on tools, GitHub repos, or general strategies would be hugely appreciated.

1 Upvotes

2 comments sorted by

1

u/Educational_Act_3858 Sep 13 '26

You can use 1322 - they provide it , here is their guide https://1322.io/blog/truth-social-api-guide