TwiFlux

Twitter Thread to JSON

Export full multi-tweet threads into structured, sequential JSON. Built for developers with strict topological ordering, 64-bit Snowflake string typing, and transparent completeness metadata.

Public posts only. The JSON export preserves normalized posts, string IDs, media arrays, and completeness state.

Try a public post:

How to convert a Twitter thread to JSON

  1. Paste a public thread post

    Paste any available post from a public Twitter or X thread. The Twitter thread to JSON converter uses it as the starting point for the lookup.

  2. Review the ordered posts

    Check the author, post count, media, order, and completeness note. The result uses the same sequence shown in the Twitter thread reader.

  3. Download structured JSON

    Choose Download JSON to save normalized post objects for scripts, local archives, research notes, or downstream LLM pipelines.

Thread JSON data structure & schema design

Unlike single-tweet exports, a Twitter thread represents a directed chronological tree. The TwiFlux thread JSON schema wraps the collection into an authoritative envelope:

  • conversation_id (string): The Snowflake ID of the initiating root post of the thread.
  • author (object): Canonical creator metadata (name, screen_name, verified status, high-res avatar).
  • completeness (object): Contains is_complete (boolean), fetched_count (integer), and status (e.g., verified_complete, bounded_partial).
  • posts (array): Ordered list of post items, each containing position (integer), id_str, created_at, uncollapsed full_text, expanded entities, and attached media.

Downstream thread processing: LLM context & data science

Twitter threads frequently contain long-form essays and tutorials. Thread JSON provides clean data for Large Language Model (LLM) fine-tuning or Retrieval-Augmented Generation (RAG):

# Concatenate thread text into a single prompt input using jq:

cat thread.json | jq -r '[.posts[].full_text] | join("\n\n")'

# Inspect post positions and IDs:

cat thread.json | jq '.posts[] | {pos: .position, id: .id_str, text: (.full_text | slice(0; 60))}'

Twitter thread to JSON questions

How does the thread JSON structure preserve conversation order?

The thread JSON document structures individual posts inside an ordered posts array. Each item includes a 0-indexed position integer corresponding directly to chronological narrative order, alongside parent references (in_reply_to_status_id_str) so you can reconstruct exact parent-child dependency trees.

How does TwiFlux verify thread completeness in the JSON envelope?

Public Twitter discovery can encounter obstacles like deleted intermediate posts or accounts with protected replies. The top-level JSON metadata includes fetched_count, is_complete (boolean), and a completeness_note string explaining whether the thread is full, partial, or terminated early.

Are Snowflake IDs stored safely across all thread posts?

Yes. Every post object in the posts array declares id_str as a 64-bit string literal rather than an integer, preventing JavaScript 53-bit float precision truncation when imported into web dashboards or Node.js workers.

Can thread JSON exports be parsed with jq or Python dataframes?

Yes. The predictable schema (.conversation_id, .author, and .posts[]) allows one-line flattening in pandas (pd.json_normalize(data['posts'])) and clean stream querying in jq.

Explore more thread formats

Part of our Twitter Data & Export Suite. Looking for readable document formats? Try Twitter Thread to TXT, Twitter Thread to Markdown, or Twitter Thread Downloader. TwiFlux is independent of Twitter and X.