SuperAPI AI Directory

fetch-tweet

Writing & research

View repository

Updated 10-16 08:26

About this skill

Fetch Tweet

A skill that fetches the tweet original text, author information, and engagement data from an X/Twitter URL. Using the API of the FxEmbed open-source project (api.fxtwitter.com) to extract tweet data without JavaScript.

How It Works

Convert the domain of the X/Twitter URL to api.fxtwitter.comand it returns the full tweet data as JSON.

https://x.com/user/status/123456
  → https://api.fxtwitter.com/user/status/123456

Script

scripts/fetch_tweet.py - Uses only the standard library, no external dependencies.

# 기본 사용 (포맷팅된 출력)
python scripts/fetch_tweet.py https://x.com/garrytan/status/2020072098635665909

# JSON 출력 (프로그래밍 활용)
python scripts/fetch_tweet.py https://x.com/garrytan/status/2020072098635665909 --json

Supported URL formats: x.com, twitter.com, fxtwitter.com, fixupx.com

API Response Fields

Field Description
tweet.text Tweet body (URLs expanded)
tweet.author Author (name, screen_name, bio, followers)
tweet.likes/retweets/replies/bookmarks/views Engagement
tweet.created_at Posted date/time
tweet.media Attached media (photos, videos)
tweet.quote Quoted tweet (same structure)
tweet.lang Language code

Workflow

Fetch a single tweet

  1. Extract screen_name and status_id from the URL
  2. scripts/fetch_tweet.py <url> Run
  3. Display the result to the user or translate it

When translation is requested

  1. Fetch the original text with the script
  2. Translate the fetched text into Korean and provide it
  3. Also display the engagement metrics

Integration with other skills

When batch-processing a list of X URLs collected from Contents Hub, etc.:

# JSON 출력으로 파이프라인 연동
python scripts/fetch_tweet.py <url> --json | python3 -c "import sys,json; print(json.load(sys.stdin)['tweet']['text'])"

WebFetch Fallback

If running the script is difficult, you can call the API directly with the WebFetch tool:

URL: https://api.fxtwitter.com/{screen_name}/status/{status_id}
Prompt: "Extract the full tweet text and author name"

Limitations

  • Tweets from private accounts cannot be viewed
  • Deleted tweets cannot be viewed
  • The API rate limit follows the FxEmbed server policy (no issue at normal usage levels)