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/result제공업체 원가
- Success rate
- 95.4%Last 30 days · 564 calls
- Latency p50
- 197 msp95 1.6 s
- Last verified
- 2026. 7. 28.Verified working
GEThttps://toolswitch.dev/v1/tools/x.x.user.posts?max_results=5&tweet.fields=id%2Ctext%2Ccreated_at%2Cpublic_metricsPreviewTry online출시 예정Provider docs ↗
- Uses platform quota
- Synchronous response
- Reads public data
파라미터
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 @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 | |
- 경로 파라미터
id문자열필수numeric user id — from x.user.profile (data.id), NOT the @handle
예시:
44196397- 쿼리 파라미터
exclude문자열선택comma-separated: retweets, replies
예시:
retweets,repliesstart_time문자열선택RFC 3339; the timeline reaches back at most 3,200 posts regardless
예시:
2026-07-01T00:00:00Zmax_results정수선택5–100, default 10
예시:
10tweet.fields문자열선택public_metrics carries likes/reposts/replies/impressions
예시:
id,text,created_at,public_metrics,referenced_tweetspagination_token문자열선택meta.next_token from the previous response
코드 예제
$TOOLSWITCH_KEY를 콘솔에서 생성한 키로 바꾸세요.
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"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());게이트웨이 API는 미리보기 버전이며 URL과 인증 방식이 변경될 수 있습니다. 예제 매개변수는 샘플 데이터입니다. 호출 요금은 $0.005/result이며 서비스 수수료가 포함되어 있습니다.