Call it
curl https://api.peume.com/v1/call/x-recent-tweets-of-a-user-by-user-id \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"max_results": 10,
"exclude": "retweets,replies",
"tweet.fields": "id,text,created_at,public_metrics,referenced_tweets",
"start_time": "2026-07-01T00:00:00Z",
"id": "44196397"
}
}'const res = await fetch("https://api.peume.com/v1/call/x-recent-tweets-of-a-user-by-user-id", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"max_results": 10,
"exclude": "retweets,replies",
"tweet.fields": "id,text,created_at,public_metrics,referenced_tweets",
"start_time": "2026-07-01T00:00:00Z",
"id": "44196397"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/x-recent-tweets-of-a-user-by-user-id",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"max_results": 10,
"exclude": "retweets,replies",
"tweet.fields": "id,text,created_at,public_metrics,referenced_tweets",
"start_time": "2026-07-01T00:00:00Z",
"id": "44196397"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: x-recent-tweets-of-a-user-by-user-id.
Parameters
max_resultsinteger5–100, default 10
Example: 10
pagination_tokenstringmeta.next_token from the previous response
excludestringcomma-separated: retweets, replies
Example: retweets,replies
tweet.fieldsstringpublic_metrics carries likes/reposts/replies/impressions
Example: id,text,created_at,public_metrics,referenced_tweets
start_timestringRFC 3339; the timeline reaches back at most 3,200 posts regardless
Example: 2026-07-01T00:00:00Z
idRequiredstringnumeric user id — from x.user.profile (data.id), NOT the @handle
Example: 44196397
Other ways to do it
Same job, other sources, cheapest first.
