Call it
curl https://api.peume.com/v1/call/x-twitter-community-tweets-2 \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"sort": "top",
"url": "your url"
}
}'const res = await fetch("https://api.peume.com/v1/call/x-twitter-community-tweets-2", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"sort": "top",
"url": "your url"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/x-twitter-community-tweets-2",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"sort": "top",
"url": "your url"
}
},
)
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-twitter-community-tweets-2.
Parameters
routestringUpstream source to run on; omit for "lynx". lynx ($0.00045 per call, 100% uptime); jackal ($0.00049 per call, 100% uptime); giraffe ($0.0012 per call, 100% uptime); badger ($0.0001 + $0.0001 per result, at most $0.0021, 100% uptime); fox ($0.0032 per call, 100% uptime). A route can refuse an input it cannot apply with a 400 source_unknown (not charged): retry on another route, or omit that input.
lynx · jackal · giraffe · badger · fox
sortstringtop returns ranked tweets chosen by the source; the time window they cover varies by source. latest returns the newest tweets first; fewer sources serve it and it can cost more.
top · latest
Example: top
urlRequiredstringCommunity URL (e.g. https://x.com/i/communities/1926186499399139650).
