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

Parameter

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

ParameterTypErforderlichBeschreibungBeispiel
Pfadparameter
idZeichenketteErforderlichnumeric user id — from x.user.profile (data.id), NOT the @handle44196397
Abfrageparameter
excludeZeichenketteOptionalcomma-separated: retweets, repliesretweets,replies
start_timeZeichenketteOptionalRFC 3339; the timeline reaches back at most 3,200 posts regardless2026-07-01T00:00:00Z
max_resultsGanzzahlOptional5–100, default 1010
tweet.fieldsZeichenketteOptionalpublic_metrics carries likes/reposts/replies/impressionsid,text,created_at,public_metrics,referenced_tweets
pagination_tokenZeichenketteOptionalmeta.next_token from the previous response
  • Pfadparameter
  • idZeichenketteErforderlich

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

    Beispiel: 44196397

  • Abfrageparameter
  • excludeZeichenketteOptional

    comma-separated: retweets, replies

    Beispiel: retweets,replies

  • start_timeZeichenketteOptional

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

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

  • max_resultsGanzzahlOptional

    5–100, default 10

    Beispiel: 10

  • tweet.fieldsZeichenketteOptional

    public_metrics carries likes/reposts/replies/impressions

    Beispiel: id,text,created_at,public_metrics,referenced_tweets

  • pagination_tokenZeichenketteOptional

    meta.next_token from the previous response

Codebeispiele

Ersetze $TOOLSWITCH_KEY durch den in der Konsole erstellten Schlüssel.

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"

Diese Gateway-API ist eine Vorschauversion; URL und Authentifizierung können sich ändern. Die Beispielparameter sind Musterdaten. Aufrufe werden mit $0.005/result einschließlich Servicegebühr abgerechnet.