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/resultAu prix du fournisseur
Success rate
95,4 %Last 30 days · 564 calls
Latency p50
197 msp95 1.6 s
Last verified
28 juil. 2026Verified working
GEThttps://toolswitch.dev/v1/tools/x.x.user.posts?max_results=5&tweet.fields=id%2Ctext%2Ccreated_at%2Cpublic_metricsPreview
Try onlineBientôtProvider docs ↗
  • Uses platform quota
  • Synchronous response
  • Reads public data

Paramètres

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

ParamètreTypeObligatoireDescriptionExemple
Paramètres de chemin
idchaîneObligatoirenumeric user id — from x.user.profile (data.id), NOT the @handle44196397
Paramètres de requête
excludechaîneFacultatifcomma-separated: retweets, repliesretweets,replies
start_timechaîneFacultatifRFC 3339; the timeline reaches back at most 3,200 posts regardless2026-07-01T00:00:00Z
max_resultsentierFacultatif5–100, default 1010
tweet.fieldschaîneFacultatifpublic_metrics carries likes/reposts/replies/impressionsid,text,created_at,public_metrics,referenced_tweets
pagination_tokenchaîneFacultatifmeta.next_token from the previous response
  • Paramètres de chemin
  • idchaîneObligatoire

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

    Exemple : 44196397

  • Paramètres de requête
  • excludechaîneFacultatif

    comma-separated: retweets, replies

    Exemple : retweets,replies

  • start_timechaîneFacultatif

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

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

  • max_resultsentierFacultatif

    5–100, default 10

    Exemple : 10

  • tweet.fieldschaîneFacultatif

    public_metrics carries likes/reposts/replies/impressions

    Exemple : id,text,created_at,public_metrics,referenced_tweets

  • pagination_tokenchaîneFacultatif

    meta.next_token from the previous response

Exemples de code

Remplacez $TOOLSWITCH_KEY par la clé créée dans la 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"

Cette API de passerelle est en préversion ; son URL et son authentification peuvent changer. Les paramètres de l’exemple sont des données fictives. Les appels sont facturés à $0.005/result, frais de service inclus.