X (Twitter)X(Twitter)Social

Recent tweets of a user by user id — engagement metrics

x.x.user.posts

List the recent posts of an X user (your own or any public account)

价格
$0.005/result按供应商原价
成功率
95.4%近 30 天 · 564 次
延迟 p50
197 毫秒p95 1.6 秒
最后验证
2026年7月28日实测可用
GEThttps://toolswitch.dev/v1/tools/x.x.user.posts?max_results=5&tweet.fields=id%2Ctext%2Ccreated_at%2Cpublic_metrics预览
在线试用即将上线供应商文档 ↗
  • 可用平台额度调用
  • 同步返回
  • 读取公开数据

参数

each post returned is billed to the app owner at $0.005 — size max_results to what you actually need

参数类型必填说明示例
路径参数
id字符串必填numeric user id — from x.user.profile (data.id), NOT the @handle44196397
查询参数
exclude字符串可选comma-separated: retweets, repliesretweets,replies
start_time字符串可选RFC 3339; the timeline reaches back at most 3,200 posts regardless2026-07-01T00:00:00Z
max_results整数可选5–100, default 1010
tweet.fields字符串可选public_metrics carries likes/reposts/replies/impressionsid,text,created_at,public_metrics,referenced_tweets
pagination_token字符串可选meta.next_token from the previous response
  • 路径参数
  • id字符串必填

    numeric user id — from x.user.profile (data.id), NOT the @handle

    示例:44196397

  • 查询参数
  • exclude字符串可选

    comma-separated: retweets, replies

    示例:retweets,replies

  • start_time字符串可选

    RFC 3339; the timeline reaches back at most 3,200 posts regardless

    示例:2026-07-01T00:00:00Z

  • max_results整数可选

    5–100, default 10

    示例:10

  • tweet.fields字符串可选

    public_metrics carries likes/reposts/replies/impressions

    示例:id,text,created_at,public_metrics,referenced_tweets

  • pagination_token字符串可选

    meta.next_token from the previous response

代码示例

将 $TOOLSWITCH_KEY 替换为你在控制台创建的密钥。

预览
curl -X GET 'https://toolswitch.dev/v1/tools/x.x.user.posts?max_results=5&tweet.fields=id%2Ctext%2Ccreated_at%2Cpublic_metrics' \
  -H "X-Toolswitch-Key: $TOOLSWITCH_KEY"

网关接口为预览版,地址与鉴权方式可能调整。 示例参数仅为样例数据。 调用按 $0.005/result 计费,已含服务费。