home / skills / daymade / claude-code-skills / twitter-reader

twitter-reader skill

/twitter-reader

This skill fetches Twitter/X post content via the Jina API, returning author, time, text, media, and thread data for quick insights.

npx playbooks add skill daymade/claude-code-skills --skill twitter-reader

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
1.7 KB
---
name: twitter-reader
description: Fetch Twitter/X post content by URL using jina.ai API to bypass JavaScript restrictions. Use when Claude needs to retrieve tweet content including author, timestamp, post text, images, and thread replies. Supports individual posts or batch fetching from x.com or twitter.com URLs.
---

# Twitter Reader

Fetch Twitter/X post content without needing JavaScript or authentication.

## Prerequisites

You need a Jina API key to use this skill:

1. Visit https://jina.ai/ to sign up (free tier available)
2. Get your API key from the dashboard
3. Set the environment variable:

```bash
export JINA_API_KEY="your_api_key_here"
```

## Quick Start

For a single tweet, use curl directly:

```bash
curl "https://r.jina.ai/https://x.com/USER/status/TWEET_ID" \
  -H "Authorization: Bearer ${JINA_API_KEY}"
```

For multiple tweets, use the bundled script:

```bash
scripts/fetch_tweets.sh url1 url2 url3
```

## What Gets Returned

- **Title**: Post author and content preview
- **URL Source**: Original tweet link
- **Published Time**: GMT timestamp
- **Markdown Content**: Full post text with media descriptions

## Bundled Scripts

### fetch_tweet.py

Python script for fetching individual tweets.

```bash
python scripts/fetch_tweet.py https://x.com/user/status/123 output.md
```

### fetch_tweets.sh

Bash script for batch fetching multiple tweets.

```bash
scripts/fetch_tweets.sh \
  "https://x.com/user/status/123" \
  "https://x.com/user/status/456"
```

## URL Formats Supported

- `https://x.com/USER/status/ID`
- `https://twitter.com/USER/status/ID`
- `https://x.com/...` (redirects work automatically)

## Environment Variables

- `JINA_API_KEY`: Required. Your Jina.ai API key for accessing the reader API

Overview

This skill fetches Twitter/X post content by URL using the jina.ai reader API to bypass JavaScript and authentication limitations. It returns author, timestamp, full post text, media descriptions, and threaded replies for single or batch URLs. Use it to reliably extract tweet content into markdown or programmatic outputs.

How this skill works

Provide one or multiple x.com or twitter.com status URLs and the skill calls the jina.ai HTTP proxy to retrieve rendered content without running JavaScript. The response includes a title (author + preview), original URL, GMT publish time, markdown-ready post text, media info, and thread replies. Scripts for single-file and batch fetching simplify integration and output to files.

When to use it

  • Extract tweet content for analysis, summarization, or archiving without a browser.
  • Ingest tweets into pipelines that require text, media metadata, and timestamps.
  • Batch-download multiple tweet threads for research or evidence collection.
  • Convert tweets to markdown for publishing or documentation.
  • Bypass JavaScript rendering or login walls when scraping public posts.

Best practices

  • Set JINA_API_KEY as an environment variable before running scripts.
  • Validate URLs to ensure they match supported formats (x.com or twitter.com status links).
  • Use the bundled batch script for multiple URLs to avoid repetitive calls.
  • Respect rate limits and terms of service for both Twitter/X and jina.ai.
  • Store timestamps and source URLs alongside content for provenance.

Example use cases

  • Download a single tweet to output.md: python scripts/fetch_tweet.py https://x.com/user/status/123 output.md
  • Batch fetch a list of tweets for sentiment analysis using scripts/fetch_tweets.sh url1 url2 url3
  • Populate a search index with author, published time, and markdown content for each tweet.
  • Extract threaded replies and include them in a conversation summary workflow.
  • Produce archived markdown records of posts with embedded media descriptions.

FAQ

Do I need a Twitter/X account or API credentials?

No. The skill uses jina.ai to fetch rendered content and does not require Twitter credentials, but you do need a JINA_API_KEY.

What URL formats are supported?

Supported formats include https://x.com/USER/status/ID and https://twitter.com/USER/status/ID; redirects are handled automatically.