Recent tweets of a user by user id — engagement metrics
x.x.user.postsList 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- 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
| Parameter | Typ | Erforderlich | Beschreibung | Beispiel |
|---|---|---|---|---|
| Pfadparameter | ||||
id | Zeichenkette | Erforderlich | numeric user id — from x.user.profile (data.id), NOT the @handle | 44196397 |
| Abfrageparameter | ||||
exclude | Zeichenkette | Optional | comma-separated: retweets, replies | retweets,replies |
start_time | Zeichenkette | Optional | RFC 3339; the timeline reaches back at most 3,200 posts regardless | 2026-07-01T00:00:00Z |
max_results | Ganzzahl | Optional | 5–100, default 10 | 10 |
tweet.fields | Zeichenkette | Optional | public_metrics carries likes/reposts/replies/impressions | id,text,created_at,public_metrics,referenced_tweets |
pagination_token | Zeichenkette | Optional | meta.next_token from the previous response | |
- Pfadparameter
idZeichenketteErforderlichnumeric user id — from x.user.profile (data.id), NOT the @handle
Beispiel:
44196397- Abfrageparameter
excludeZeichenketteOptionalcomma-separated: retweets, replies
Beispiel:
retweets,repliesstart_timeZeichenketteOptionalRFC 3339; the timeline reaches back at most 3,200 posts regardless
Beispiel:
2026-07-01T00:00:00Zmax_resultsGanzzahlOptional5–100, default 10
Beispiel:
10tweet.fieldsZeichenketteOptionalpublic_metrics carries likes/reposts/replies/impressions
Beispiel:
id,text,created_at,public_metrics,referenced_tweetspagination_tokenZeichenketteOptionalmeta.next_token from the previous response
Codebeispiele
Ersetze $TOOLSWITCH_KEY durch den in der Konsole erstellten Schlüssel.
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"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/x.x.user.posts?max_results=5&tweet.fields=id%2Ctext%2Ccreated_at%2Cpublic_metrics",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/x.x.user.posts?max_results=5&tweet.fields=id%2Ctext%2Ccreated_at%2Cpublic_metrics", {
method: "GET",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());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.