Skip to content

Platform Constraints — Twitter/X

Twitter’s shifting APIs and export formats require extra care.

  • The v2 API enforces tight rate limits; use cursor‑based pagination and retry with backoff.
  • OAuth tokens expire—store refresh tokens securely.
  • Exports arrive as a ZIP containing a data/ directory with tweet JSON.
  • Media files may need to be fetched separately; URLs can expire.
  • Prefer the official archive when available; it’s more complete than scraping.
  • Cache responses locally to avoid hitting limits.
  • Map retweets and quoted tweets to repost and mention kinds respectively.