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)

Price
$0.005/resultPelo preço do provedor
Success rate
95,4%Last 30 days · 564 calls
Latency p50
197 msp95 1.6 s
Last verified
28 de jul. de 2026Verified working
GEThttps://toolswitch.dev/v1/tools/x.x.user.posts?max_results=5&tweet.fields=id%2Ctext%2Ccreated_at%2Cpublic_metricsPreview
Try onlineEm breveProvider docs ↗
  • Uses platform quota
  • Synchronous response
  • Reads public data

Parâmetros

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

ParâmetroTipoObrigatórioDescriçãoExemplo
Parâmetros de caminho
idstringObrigatórionumeric user id — from x.user.profile (data.id), NOT the @handle44196397
Parâmetros de consulta
excludestringOpcionalcomma-separated: retweets, repliesretweets,replies
start_timestringOpcionalRFC 3339; the timeline reaches back at most 3,200 posts regardless2026-07-01T00:00:00Z
max_resultsinteiroOpcional5–100, default 1010
tweet.fieldsstringOpcionalpublic_metrics carries likes/reposts/replies/impressionsid,text,created_at,public_metrics,referenced_tweets
pagination_tokenstringOpcionalmeta.next_token from the previous response
  • Parâmetros de caminho
  • idstringObrigatório

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

    Exemplo: 44196397

  • Parâmetros de consulta
  • excludestringOpcional

    comma-separated: retweets, replies

    Exemplo: retweets,replies

  • start_timestringOpcional

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

    Exemplo: 2026-07-01T00:00:00Z

  • max_resultsinteiroOpcional

    5–100, default 10

    Exemplo: 10

  • tweet.fieldsstringOpcional

    public_metrics carries likes/reposts/replies/impressions

    Exemplo: id,text,created_at,public_metrics,referenced_tweets

  • pagination_tokenstringOpcional

    meta.next_token from the previous response

Exemplos de código

Substitua $TOOLSWITCH_KEY pela chave criada no console.

Preview
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"

Esta API de gateway está em prévia; a URL e a autenticação podem mudar. Os parâmetros do exemplo são dados de amostra. As chamadas são cobradas a $0.005/result, incluindo a taxa de serviço.