CatVader

Python Package

Classify and Analyze Social Media Posts: CatVader is a fork of CatLLM adapted for social media data. It connects directly to the Threads API to pull your post history, classify posts into custom categories using large language models, and return an enriched dataset with engagement metrics — in a few lines of code. [GitHub]

Downloads per month Total Downloads

What You Can Do With It

  • Pull your Threads history — authenticate once and retrieve your full post archive with engagement metrics (likes, views, replies, reposts, shares)
  • Discover categories automatically — use explore() to let the LLM extract recurring themes from your posts before you define any labels
  • Classify at scale — run classify() to assign multi-label categories to every post using any supported LLM provider
  • Extract structured fields — use extract() to pull named entities, claims, or any custom field out of free text
  • Analyze engagement — the output dataset is ready for downstream analysis: topic distributions, regression models, timing patterns

Example

import catvader as cv

# Pull and classify the last 12 months of your Threads history
results = cv.classify(
    sm_source="threads",
    sm_months=12,
    categories=[
        "Politics: Posts about political parties, elections, or political figures",
        "Technology: Posts about software, hardware, or the tech industry",
        "Personal: Opinions, reflections, or experiences about everyday life",
    ],
    api_key="your-openai-api-key",
)

Blog Post

For a full end-to-end walkthrough — pulling 850 posts, discovering categories with explore(), classifying with Llama 3.3 70B, and running regression models on engagement — see: Analyzing My Threads Feed with cat-vader