# Read Tweet

> Read the contents of a public X/Twitter post from a URL using the X_API_KEY environment variable. Use when the user provides an x.com or twitter.com post URL and wants the post text, author, timestamp, or related metadata fetched via the X API.

- Skill: `warpdotdev/read-tweet` (Agent Skill)
- Install (CLI): `npx skillmds@latest add warpdotdev/read-tweet`
- Raw SKILL.md: https://api.skillmd.com/api/skills/warpdotdev/read-tweet/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: warpdotdev (https://skillmd.com/u/warpdotdev)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/warpdotdev/read-tweet

---


# read-tweet

## Purpose
Fetch a public X post by URL with the app-only bearer token stored in `X_API_KEY`.

## Inputs
- An `x.com` or `twitter.com` post URL

## Workflow
1. Extract the post ID from the `/status/` segment.
2. Use `xurl read <id>` to fetch the post. `xurl` handles authentication automatically.
3. Prefer `note_tweet` text over truncated `text`. If the text ends with `...`, re-fetch with the raw API path and `note_tweet` field to get the full long-form text.
4. Fetch **1 post only** — do not walk reply chains or make additional API calls.

## Example request
```bash
# Preferred: shortcut command
xurl read 2033746732996313488

# Fallback: raw API path (use when you need note_tweet or specific fields)
xurl "/2/tweets/2033746732996313488?tweet.fields=created_at,text,note_tweet,author_id,public_metrics,referenced_tweets,conversation_id&expansions=author_id,referenced_tweets.id,referenced_tweets.id.author_id&user.fields=username,name"
```

## Return
- `Author:`
- `URL:`
- `Posted:`
- `Text:`

- Include public metrics only if they matter to the task.
- If the user asks only for the contents, return just the text unless metadata is helpful.

## Failure handling
- Missing `X_API_KEY` → stop and report that it is not set.
- `CreditsDepleted` → report that the credential is valid but has no remaining read credits.
- `404`, protected, or otherwise inaccessible → report that the post is unavailable instead of guessing.

