Skip to main content

@idiomark/adapter-threads

Threads.net adapter for the Idiomark - extracts personality signals from Threads posts, replies, and media.

Features​

  • Post Extraction: Fetch user's threads with text content
  • Reply Analysis: Extract replies and thread conversations
  • Quote Posts: Track quoted/reposted content
  • Media Detection: Identify image, video, and carousel posts
  • Rate Limiting: Built-in rate limiter for API compliance
  • Personality Signals: Extract voice, communication patterns, interests, and values

Installation​

pnpm add @idiomark/adapter-threads

Authentication​

Threads uses OAuth 2.0. You'll need:

  1. Register an app on Meta for Developers
  2. Enable Threads API
  3. Get your access token
import { createThreadsAdapter } from '@idiomark/adapter-threads'

const adapter = createThreadsAdapter('your-access-token')

Usage​

// Fetch user threads
const result = await adapter.getStructuredOutput({
limit: 100,
includeReplies: true,
includeQuotes: true,
includeMedia: true
})

console.log(result.personalitySignals)

Data Types​

  • ThreadsPost - Main thread posts
  • ThreadsReply - Replies to posts
  • ThreadsUser - User profile information
  • ThreadsMedia - Media attachments (images, videos, carousels)

Rate Limits​

Threads API has rate limits:

  • Default: 200 requests per hour
  • Requires proper authentication

License​

MIT