Call it
curl https://api.peume.com/v1/call/search-weibo-posts-by-keyword \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"maxItems": 50,
"maxTotalChargeUsd": 0.5,
"memory": 1024,
"timeout": 90,
"mode": "search",
"keywords": [
"咖啡"
]
}
}'const res = await fetch("https://api.peume.com/v1/call/search-weibo-posts-by-keyword", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"maxItems": 50,
"maxTotalChargeUsd": 0.5,
"memory": 1024,
"timeout": 90,
"mode": "search",
"keywords": [
"咖啡"
]
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/search-weibo-posts-by-keyword",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"maxItems": 50,
"maxTotalChargeUsd": 0.5,
"memory": 1024,
"timeout": 90,
"mode": "search",
"keywords": [
"咖啡"
]
}
},
)
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: search-weibo-posts-by-keyword.
Parameters
maxItemsintegeroptional row cap; pay-per-event actors that take the row count from their own input ignore it, so maxTotalChargeUsd is the spend limit
Example: 50
maxTotalChargeUsdnumberthe spend cap enforces on every event this run bills, in dollars. 's key requires it, above 0 and at most 1, and holds it for the call
Example: 0.5
memoryintegerMB of run memory. 's key requires 1024, which fixes the actor-start charge; your own key may set any size
Example: 1024
timeoutintegerrun timeout in seconds. 's key requires 90 so the run and its rows arrive before any wait gives up; a larger pull should use your own key and the async web.scrape.job.* pair above
Example: 90
modeRequiredstringmust be `search` for this entry — it selects the mode
Example: search
keywordsRequiredarraysearch terms, one per entry — e.g. 咖啡 or #新能源# for a topic; a post matching two terms is returned once
Example: ["咖啡"]
max_itemsintegerposts per keyword, 1-10000; default 50. You pay per post returned — cap it here or with maxTotalChargeUsd
Example: 50
search_typestringtop (default; relevance-ranked, ends after ~2,000 posts per keyword, often fewer) | latest (newest-first; keeps going back in time — use it, or a date range, for deep pulls)
Example: latest
start_datestringYYYY-MM-DD in Beijing time (or a full ISO timestamp); only posts on or after it
Example: 2026-09-01
end_datestringYYYY-MM-DD in Beijing time, whole day inclusive; not before start_date
Example: 2026-09-07
proxyUrlsarrayleave empty to use the residential proxy included in the run price; or pass your own gateway URLs
Other ways to do it
Same job, other sources, cheapest first.
