Skip to main content
TutorialsAugust 26, 20265 min readUpdated August 26, 2026

How to Export Twitter/X Data to CSV with an AI Agent

Export Twitter/X posts to CSV with an AI agent skill: boolean search, author archives, up to 500K rows per file, and a pandas handoff, no X developer account.

TL;DR

Getting tweets into a spreadsheet used to mean a developer account, an approved app, paginated API calls, and glue code. With an agent skill it is one request: "export all tweets mentioning [topic] from the last two weeks to CSV" returns a download link to a complete dataset, up to about 500,000 rows per file, with the columns you asked

How to Export Twitter/X Data to CSV with an AI Agent

How to Export Twitter/X Data to CSV with an AI Agent

Getting tweets into a spreadsheet used to mean a developer account, an approved app, paginated API calls, and glue code. With an agent skill it is one request: "export all tweets mentioning [topic] from the last two weeks to CSV" returns a download link to a complete dataset, up to about 500,000 rows per file, with the columns you asked for.

The skill is twitter-data-export, from our open-source agent skills collection at Xpoz. Exports run against the Xpoz index of public Twitter/X posts (part of a four-platform index covering billions of posts), which is why no X developer credentials appear in this tutorial; a free Xpoz sign-in replaces them.

Two Ways to Slice: Keywords or Author

Keyword exports use boolean queries, and precision here decides dataset quality:

PatternExample
Exact phrase"machine learning"
Any of"AI" OR "artificial intelligence"
All of"Tesla" AND "earnings"
Exclude"crypto" NOT "scam"
Combined("deep learning" OR "neural network") AND python

Operators must be explicit (a bare space between terms behaves like OR), and filters like author, language, and date range are parameters rather than query syntax, so the query string stays purely about content.

Author exports pull one account's public posting history over a window: "download @NASA's tweets from June" is a complete request. Both slices accept a field list, and choosing fields deliberately keeps files lean: a sentiment project wants text, createdAtDate, and engagement counts, while a network project wants IDs, reply and quote relations, and usernames.

What Comes Back

Each export returns the download link plus a quick-look summary: row count, date range covered, top authors, average engagement, and a sample of rows as a table. That summary is worth reading before the download, because it catches query problems (a stray meaning of your keyword, one bot account dominating the set) while fixing them costs one sentence: "rerun that excluding retweets and the word 'giveaway'".

Engagement fields (likes, retweets, quotes, replies, impressions where available) come included when requested, which is what makes the CSV immediately analyzable rather than a bare text dump.

Setup and First Export

Install the skill (Claude Code shown; the folder works in any SKILL.md-compatible agent):

git clone https://github.com/XPOZpublic/xpoz-agent-skills.git
cp -r xpoz-agent-skills/skills/twitter-data-export ~/.claude/skills/

Connect data access via the remote MCP server (OAuth, no keys) or a free SDK key from xpoz.ai/get-token:

claude mcp add --transport http --scope user xpoz https://mcp.xpoz.ai/mcp

Then ask:

"Export all tweets mentioning 'agent skills' from the last
2 weeks to CSV"

"Download @OpenAI's tweets from January"

"Get a dataset of tweets about 'MCP server' OR 'model context
protocol', English only"

"Export tweets about the product launch with over 100 likes"

Try this with Xpoz

No API keys needed. Query Twitter, Reddit, Instagram & TikTok with natural language.

Get Started Free

From CSV to Analysis

The skill hands off cleanly to pandas or a spreadsheet. A typical first pass:

import pandas as pd

df = pd.read_csv("tweets.csv")
print(len(df), "tweets")
print(df["created_at_date"].min(), "to", df["created_at_date"].max())
print(df["author_username"].value_counts().head(10))
print(df.sort_values("like_count", ascending=False)[["text", "like_count"]].head())

Since the agent that exported the file can also write analysis code, the natural follow-up is asking it to continue: "load the CSV and plot daily volume", "which authors drove the spike on the 14th?" The export step and the analysis step live in the same conversation.

What It Costs

The skill is free and MIT-licensed. Xpoz's free tier covers up to 75,000 results with no credit card; Pro is $20/month with up to 1,000,000 results per month; Max is $200/month with up to 18,000,000. For how that compares with building on the official X API's paid tiers, the numbers are laid out in our X API pricing guide.

FAQ

Can I download Twitter/X data without a developer account?

Yes. Exports run against an indexed copy of public posts rather than the official X API, so one free sign-in replaces the developer account, app approval, and per-tier API pricing.

How many tweets can one export contain?

Up to roughly 500,000 rows per CSV. Exports generate server-side in about 30-60 seconds and return a download URL. Larger projects split by date range or query.

The index provides a rolling 60-day window, with tracked keywords and users accumulating deeper coverage over time. Multi-year archives are a different problem; see the data-access comparison linked below.

Can I export Reddit, Instagram, or TikTok data the same way?

Yes. The same CSV mechanism and field selection work across all four platforms in the index; sibling skills in the collection cover them.

Next Steps

Share this article

Ready to Get Started?

Start building AI-powered social intelligence workflows today. No API keys required.