Call it
curl https://api.peume.com/v1/call/search-baidu-news \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"q": "your q"
}
}'const res = await fetch("https://api.peume.com/v1/call/search-baidu-news", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"q": "your q"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/search-baidu-news",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"q": "your q"
}
},
)
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-baidu-news.
Parameters
qRequiredstringThe search query, including all Baidu search operators. (e.g., `inurl:`, `site:`, `intitle:`, etc.).
ctstringWhich language to restrict results. Available options: `1` - All Languages. `2` - Simplified Chinese `3` - Traditional Chinese.
rttstringThe sort type for results. Available options: `1` - Sort by attraction (default) `4` - Sort by time
mediumstringMedium filtering for results. Available options: `0` - No filtering `1` - Show results from medium sites `2` - Show results from Baijiahao (baijiahao.baidu.com)
rnstringThe maximum number of results to return, limited to 50. (e.g., `10` (default) returns 10 results, `30` returns 30 results, and `50` returns 50 results).
json_restrictorstringThe fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.
pnstringThe result offset. It skips the given number of results. It's used for pagination. (e.g., `0` (default) is the first page of results, `10` is the 2nd page of results, `20` is the 3rd page of results, etc.).
