twitter

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Twitter / X Data

Twitter / X 数据

Read-only access to Twitter/X via twitterapi.io. Use these tools to look up tweets, users, followers, and social activity.
通过twitterapi.io实现对Twitter/X的只读访问。使用这些工具可以查询推文、用户、关注者以及社交动态。

Tool Decision Tree

工具决策树

"Search for tweets about a topic"
twitter_search_tweets
Advanced query with operators: keywords, from:user, #hashtag, $cashtag, min_faves, date ranges.
"Look up a specific tweet or set of tweets"
twitter_get_tweets
Pass one or more tweet IDs directly.
"Who is this Twitter account?"
twitter_user_info
Profile data: bio, follower count, tweet count, verification.
"What has this account been posting?"
twitter_user_tweets
Recent tweets from a specific user.
"Who follows this account?"
twitter_user_followers
List of followers for a user.
"Who does this account follow?"
twitter_user_followings
List of accounts a user follows.
"What are people saying in reply to this tweet?"
twitter_tweet_replies
Replies to a specific tweet by ID.
"Who retweeted this?"
twitter_tweet_retweeters
Users who retweeted a specific tweet.
"Find accounts related to a topic"
twitter_search_users
Search users by name or keyword.
"搜索关于某个主题的推文"
twitter_search_tweets
支持运算符的高级查询:关键词、from:用户、#话题标签、$行情标签、min_faves(最低点赞数)、日期范围。
"查询特定推文或一组推文"
twitter_get_tweets
直接传入一个或多个推文ID。
"这个Twitter账户是谁的?"
twitter_user_info
资料数据:个人简介、关注者数量、推文数量、认证状态。
"该账户发布过哪些内容?"
twitter_user_tweets
特定用户的近期推文。
"谁关注了这个账户?"
twitter_user_followers
该用户的关注者列表。
"这个账户关注了谁?"
twitter_user_followings
该用户关注的账户列表。
"这条推文的回复内容有哪些?"
twitter_tweet_replies
通过推文ID查询特定推文的回复内容。
"谁转发了这条推文?"
twitter_tweet_retweeters
转发了特定推文的用户列表。
"查找与某个主题相关的账户"
twitter_search_users
通过名称或关键词搜索用户。

Available Tools

可用工具

ToolDescriptionKey Params
twitter_search_tweets
Advanced tweet search
query
(required),
cursor
twitter_get_tweets
Get tweets by ID
tweet_ids
(array, required)
twitter_user_info
User profile lookup
username
(required)
twitter_user_tweets
User's recent tweets
username
(required),
cursor
twitter_user_followers
User's followers
username
(required),
cursor
twitter_user_followings
User's followings
username
(required),
cursor
twitter_tweet_replies
Replies to a tweet
tweet_id
(required),
cursor
twitter_tweet_retweeters
Who retweeted
tweet_id
(required),
cursor
twitter_search_users
Search for users
query
(required),
cursor
工具描述关键参数
twitter_search_tweets
高级推文搜索
query
(必填),
cursor
twitter_get_tweets
通过ID查询推文
tweet_ids
(数组,必填)
twitter_user_info
用户资料查询
username
(必填)
twitter_user_tweets
用户近期推文
username
(必填),
cursor
twitter_user_followers
用户关注者
username
(必填),
cursor
twitter_user_followings
用户关注的账户
username
(必填),
cursor
twitter_tweet_replies
推文回复查询
tweet_id
(必填),
cursor
twitter_tweet_retweeters
转发者查询
tweet_id
(必填),
cursor
twitter_search_users
用户搜索
query
(必填),
cursor

Usage Patterns

使用场景

Research an account

账户调研

  1. twitter_user_info
    — get profile, follower count, bio
  2. twitter_user_tweets
    — see what they've been posting
  3. twitter_user_followings
    — who they follow (reveals interests)
  1. twitter_user_info
    — 获取资料、关注者数量、个人简介
  2. twitter_user_tweets
    — 查看该账户发布的内容
  3. twitter_user_followings
    — 查看其关注的账户(可了解兴趣偏好)

Track a topic or token

追踪主题或代币

  1. twitter_search_tweets
    with query like
    "$SOL min_faves:50"
    — find popular tweets
  2. twitter_search_users
    with the topic — find relevant accounts
  3. Follow up with
    twitter_user_info
    on interesting accounts
  1. 使用
    twitter_search_tweets
    ,查询语句例如
    "$SOL min_faves:50"
    — 查找热门推文
  2. 使用
    twitter_search_users
    搜索相关主题 — 查找相关账户
  3. 对感兴趣的账户使用
    twitter_user_info
    进一步了解

Analyze engagement on a tweet

分析推文互动情况

  1. twitter_get_tweets
    — get the tweet and its metrics
  2. twitter_tweet_replies
    — see the conversation
  3. twitter_tweet_retweeters
    — see who amplified it
  1. twitter_get_tweets
    — 获取推文及其数据指标
  2. twitter_tweet_replies
    — 查看相关对话内容
  3. twitter_tweet_retweeters
    — 查看哪些用户进行了转发推广

Find influencers in a space

寻找领域内的意见领袖

  1. twitter_search_users
    with keyword (e.g. "DeFi analyst")
  2. twitter_user_info
    on top results to compare follower counts
  3. twitter_user_tweets
    to check content quality
  1. 使用
    twitter_search_users
    搜索关键词(例如"DeFi分析师")
  2. 对排名靠前的结果使用
    twitter_user_info
    比较关注者数量
  3. 使用
    twitter_user_tweets
    检查内容质量

Search Query Operators

搜索查询运算符

The
twitter_search_tweets
tool supports advanced operators:
OperatorExampleDescription
keyword
bitcoin
Tweets containing the word
exact phrase
"ethereum merge"
Exact phrase match
from:
from:elonmusk
Tweets by a specific user
to:
to:elonmusk
Tweets replying to a user
#hashtag
#crypto
Tweets with hashtag
$cashtag
$BTC
Tweets with cashtag
lang:
lang:en
Filter by language
has:media
has:media
Tweets with images/video
has:links
has:links
Tweets with URLs
is:reply
is:reply
Only replies
min_faves:
min_faves:100
Minimum likes
min_retweets:
min_retweets:50
Minimum retweets
since:
since:2024-01-01
Tweets after date
until:
until:2024-12-31
Tweets before date
Combine operators:
from:VitalikButerin $ETH min_faves:100 since:2024-01-01
twitter_search_tweets
工具支持以下高级运算符:
运算符示例描述
关键词
bitcoin
包含该关键词的推文
精确短语
"ethereum merge"
精确匹配该短语的推文
from:
from:elonmusk
特定用户发布的推文
to:
to:elonmusk
回复特定用户的推文
#hashtag
#crypto
包含该话题标签的推文
$cashtag
$BTC
包含该行情标签的推文
lang:
lang:en
按语言筛选推文
has:media
has:media
包含图片/视频的推文
has:links
has:links
包含链接的推文
is:reply
is:reply
仅显示回复内容
min_faves:
min_faves:100
最低点赞数筛选
min_retweets:
min_retweets:50
最低转发数筛选
since:
since:2024-01-01
筛选指定日期之后的推文
until:
until:2024-12-31
筛选指定日期之前的推文
组合运算符示例:
from:VitalikButerin $ETH min_faves:100 since:2024-01-01

Pagination

分页

Most endpoints support cursor-based pagination. When a response includes a cursor value, pass it as the
cursor
parameter to get the next page. If no cursor is returned, you've reached the end.
大多数接口支持基于游标(cursor)的分页。当响应中包含游标值时,将其作为
cursor
参数传入即可获取下一页数据。如果没有返回游标,则表示已到达最后一页。

Notes

注意事项

  • API key required: Set
    TWITTER_API_KEY
    environment variable. Tools will error without it.
  • Read-only: These tools only retrieve data. No posting, liking, or following.
  • Usernames: Always pass without the
    @
    prefix (e.g.
    "elonmusk"
    not
    "@elonmusk"
    ).
  • Tweet IDs: Use string format for tweet IDs to avoid integer overflow issues.
  • Rate limits: The API has rate limits. If you get rate-limited, wait before retrying.
  • 需要API密钥:设置
    TWITTER_API_KEY
    环境变量。如果没有该密钥,工具将报错。
  • 只读权限:这些工具仅用于获取数据,不支持发布、点赞或关注操作。
  • 用户名:传入时请勿添加
    @
    前缀(例如:
    "elonmusk"
    而非
    "@elonmusk"
    )。
  • 推文ID:请使用字符串格式传入推文ID,以避免整数溢出问题。
  • 速率限制:该API存在速率限制。如果被限制,请等待后再重试。