Call it
curl https://api.peume.com/v1/call/x-search-posts-by-keyword-2 \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"keyword": "Elon Musk",
"search_type": "Top"
}
}'const res = await fetch("https://api.peume.com/v1/call/x-search-posts-by-keyword-2", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"keyword": "Elon Musk",
"search_type": "Top"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/x-search-posts-by-keyword-2",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"keyword": "Elon Musk",
"search_type": "Top"
}
},
)
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-search-posts-by-keyword-2.
Parameters
keywordRequiredstringSearch Keyword
Example: Elon Musk
search_typestringSearch Type
Example: Top
cursorstringCursor
Other ways to do it
Same job, other sources, cheapest first.
Search posts onRead one account's timeline through a from: search, newest first, with text, time, counts, views, language and media.Search posts by keywordBest sourceSearch posts by keyword. Checks the cheapest source first and moves to the next one until it finds an answer.X / Twitter SearchSearch with full advanced-search syntax (operators like from:, since:, until:, min_faves: work inline in the query) and get structured tweets with text, author, engagement, and curSearch by keyword — top, latest, media, peopleSearches by keyword across top, latest, media, people, or list result modes with cursor pagination.Search the full tweet archive by keyword querySearch Posts AllSearch tweets from the last 7 days by keywordSearch Posts Recent
