Cross-platform search Cross-Platform Search
Searches recent content across news, Weibo, WeChat, Zhihu, Douyin, Xiaohongshu, Bilibili, and Kuaishou with source and time filters. Use it to monitor a topic across multiple platforms.
/v1/search/search_v1
$0.04
- Price
- $0.04 per successful call, Failed calls are free
- Endpoint ID
search.search_v1
Parameters
-
keywordstring OptionalSearch query string. Supports these five syntax forms:
- AND (&&): A && B matches content containing both A and B.
- OR (||): A || B matches content containing A or B.
- Exclusion (-): -A matches content that does not contain A.
- Parentheses (): (A && B) || C matches content containing C, or both A and B.
- English double quotes (""): "A" disables tokenization and requires an exact match for A.
Example
咖啡 -
sourcestring OptionalTarget social media platform for search filtering.
Available Values:
ALL: All platformsNEWS: NewsWEIBO: Sina WeiboWEIXIN: Weixin (WeChat)ZHIHU: ZhihuDOUYIN: Douyin (TikTok China)XIAOHONGSHU: Xiaohongshu (Little Red Book)BILIBILI: BilibiliKUAISHOU: Kuaishou
Example
ALL -
startstring OptionalStart time of the search period (yyyy-MM-dd HH:mm:ss). Required for initial request.
-
endstring OptionalEnd time of the search period (yyyy-MM-dd HH:mm:ss). Required for initial request.
-
next_cursorstring OptionalPagination cursor provided by the 'nextCursor' field in the previous response.
Code samples
curl -G "https://api.mofa-ai.com/v1/search/search_v1" \
-H "Authorization: Bearer $MOFA_API_KEY" \
--data-urlencode 'keyword=咖啡' \
--data-urlencode 'source=ALL'
import os
import requests
resp = requests.get(
"https://api.mofa-ai.com/v1/search/search_v1",
headers={"Authorization": f"Bearer {os.environ['MOFA_API_KEY']}"},
params={
"keyword": "咖啡",
"source": "ALL",
},
timeout=60,
)
body = resp.json()
if body["success"]:
print(body["cost_usd"], body["data"])
else:
print(body["error"], body["message"])
const url = new URL("https://api.mofa-ai.com/v1/search/search_v1");
url.search = new URLSearchParams({
keyword: "咖啡",
source: "ALL",
});
const resp = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.MOFA_API_KEY}` },
});
const body = await resp.json();
if (body.success) console.log(body.cost_usd, body.data);
else console.error(body.error, body.message);
Example response
There is no example response for this endpoint yet.
Try it
Sign in to call this endpoint from this page. Successful calls are billed to your balance, failed calls are free, and new accounts get $0.50 of trial credit.