TwitterViewer AI
For AI agents

TwitterViewer API

Your program sends a link and receives posts, threads, profiles or replies in JSON or Markdown. Nothing to request from X, and billing follows the post count.

API, MCP and CLI come with Plus, from $5 a month billed yearly · 1 credit = 1 post

curl https://twitterviewer.ai/api/v1/convert \
  -H "Authorization: Bearer $TWITTERVIEWER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://x.com/username/status/1234567890123456789",
    "scope": "thread",
    "format": "markdown"
  }'
claude mcp add --transport http twitterviewer https://twitterviewer.ai/mcp

# then ask your agent:
# "Read https://x.com/username/status/1234567890123456789 as Markdown"
npx twitterviewer https://x.com/username/status/1234567890123456789 -o thread.md

# sign in once, check your balance
npx twitterviewer login
npx twitterviewer credits
const res = await fetch("https://twitterviewer.ai/api/v1/convert", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TWITTERVIEWER_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://x.com/username/status/1234567890123456789",
    scope: "thread",
    format: "markdown",
  }),
})

const { markdown, postsReturned } = await res.json()
console.log(res.headers.get("x-credits-remaining"), postsReturned)
console.log(markdown)
200 OKx-credits-charged: 31
{
  "kind": "thread",
  "title": "How we shipped the new release:",
  "postsReturned": 31,
  "wordCount": 2214,
  "markdown": "# How we shipped…"
}

What can you build with the TwitterViewer API?

The TwitterViewer API lets programs and AI agents read public X content over HTTPS with a single Bearer key. Send it an address to convert, or request the answers to one post. Output arrives as JSON or Markdown. A Plus subscription here is the only requirement; X asks nothing of you.

TwitterViewer AI runs it independently of X Corp. It is a reading layer beside X's own products, so anything that writes to an account happens there.

How to send your first request

  1. Subscribe

    Get Plus and make a key beginning tv_live_ on the account page. Copy it right away because it is displayed once.

  2. Convert a link

    Call /api/v1/convert with a url parameter, by GET or by POST with a JSON body.

  3. Choose the body

    Responses are JSON unless you set format. Send Accept: text/markdown to receive the document alone.

  4. Watch the meter

    Read x-credits-charged, x-credits-remaining and x-ratelimit-remaining from the response headers.

Endpoints

/api/v1/convert
A thread, one post, a conversation or up to 200 profile posts
/api/v1/replies
Replies under one post, 20 by default and 100 at most
/api/v1/credits
Total balance and its sources, at no cost
Domain swap
A post or profile path on twitterviewer.ai, returned as Markdown

How it works

  • Billing follows results

    A returned post costs one credit and a quoted post one more. Repeating a convert or reply call with unchanged parameters inside 10 minutes returns the same result for free. See Pricing for plan allowances.

  • Limits belong to accounts

    Plus gives each account 30 requests a minute and two keys. Excess calls receive status 429 with retryAfterSec. An empty balance returns status 402 before anything is requested from X.

  • Formats cover common needs

    Convert supports json, markdown, obsidian, text and pdf. Profile exports skip replies and reposts until you enable them. Browser printing is covered by Twitter Thread to PDF.

FAQs

Tap any question to see its reply.

Does X Corp run this API?

No, this API belongs to TwitterViewer AI, an independent service that is not affiliated with X Corp. Its calls never change anything and reach public material only.

Which links can the TwitterViewer API read?

The TwitterViewer API accepts the address of a post or an account on either X domain, or a plain @handle. A post link can return that post alone, the author's thread or the thread with its first page of replies. Reply lists take a post link and stop at 100 entries.

How does the domain swap work?

Keep the path, change the host to this site, and sign the request with your key. The Accept header must not ask for HTML. A browser opening that address sees an ordinary web page. The Twitter Thread Reader is the comfortable choice for people.

What if my balance cannot cover a result?

A reply list is shortened to what your credits can pay for. A thread that costs more than the balance is refused with 402, and nothing is deducted.

Can agents use it without writing HTTP code?

Yes, connect the TwitterViewer MCP Server or run the command-line tool for conversions. For a manual look at the same output, try X to Markdown. Full parameters are in the API Docs.