---
name: threads-reader
description: Read your Threads feed, top posts, and trending topics using unofficial API. Perfect for morning briefings!
metadata: {"clawdbot":{"emoji":"🧵","requires":{"bins":["python3"],"env":["INSTAGRAM_USERNAME","INSTAGRAM_PASSWORD"]}}}
---

# Threads Reader 🧵

Unofficial Threads API integration to read your feed and trending posts.

## Setup

Set your Instagram credentials (used for Threads login):

```bash
export INSTAGRAM_USERNAME="your_instagram_username"
export INSTAGRAM_PASSWORD="your_instagram_password"
```

Or create config file at `~/.config/threads/config.json`:

```json
{
  "username": "your_instagram_username",
  "password": "your_instagram_password"
}
```

## Installation

Install required Python library:

```bash
pip3 install threads-api
```

## Usage

### Get For You feed (personalized):

```bash
{baseDir}/scripts/threads.py feed --limit 10
```

### Get trending posts:

```bash
{baseDir}/scripts/threads.py trending --limit 5
```

### Get specific user's posts:

```bash
{baseDir}/scripts/threads.py user @zuck --limit 5
```

## Output

Returns JSON array with posts:
- `author` - Username
- `text` - Post content
- `likes` - Like count
- `replies` - Reply count
- `created_at` - Timestamp
- `url` - Link to post

## Notes

- Uses unofficial API (may break if Meta changes Threads)
- Caches login token to avoid repeated logins
- Rate-limited to avoid detection
