Zhihu Keyword Search
Search Zhihu by keyword with optional result-type, sort, time-interval, topic-display, and offset controls. Use it to find relevant answers, articles, or videos.
/v1/zhihu/search_v1
$0.04
- Price
- $0.04 per successful call, Failed calls are free
- Endpoint ID
zhihu.search_v1
Parameters
-
keywordstring RequiredSearch keywords.
Example
咖啡 -
offsetinteger OptionalStart offset, begins with 0.
Example
0 -
show_all_topicsstring OptionalWhether to show all topics.
Available Values:
FALSE: Do not show topics.TRUE: Show all topics.
Example
FALSE -
verticalstring OptionalResult type filter.
Available Values:
answer: Answers only.article: Articles only.zvideo: Videos only.
Example
answer -
sortstring OptionalSorting criteria.
Available Values:
upvoted_count: Most upvoted.created_time: Latest published.
Example
upvoted_count -
time_intervalstring OptionalPublish time interval filter.
Available Values:
a_day: Within one day.a_week: Within one week.a_month: Within one month.three_months: Within three months.half_a_year: Within half a year.a_year: Within one year.
Example
a_day
Code samples
curl -G "https://api.mofa-ai.com/v1/zhihu/search_v1" \
-H "Authorization: Bearer $MOFA_API_KEY" \
--data-urlencode 'keyword=咖啡' \
--data-urlencode 'offset=0' \
--data-urlencode 'show_all_topics=FALSE' \
--data-urlencode 'vertical=answer' \
--data-urlencode 'sort=upvoted_count' \
--data-urlencode 'time_interval=a_day'
import os
import requests
resp = requests.get(
"https://api.mofa-ai.com/v1/zhihu/search_v1",
headers={"Authorization": f"Bearer {os.environ['MOFA_API_KEY']}"},
params={
"keyword": "咖啡",
"offset": "0",
"show_all_topics": "FALSE",
"vertical": "answer",
"sort": "upvoted_count",
"time_interval": "a_day",
},
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/zhihu/search_v1");
url.search = new URLSearchParams({
keyword: "咖啡",
offset: "0",
show_all_topics: "FALSE",
vertical: "answer",
sort: "upvoted_count",
time_interval: "a_day",
});
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.
More Zhihu endpoints
-
Column Article Details
$0.02Retrieve details for a Zhihu column article identified by article ID. Use it to inspect a known article for reading, review, or archiving.
/v1/zhihu/get_column_article_detail_v1
-
Answer List
$0.02Retrieve answers for a Zhihu question with sorting and pagination controls. Use it to browse responses to a known question and continue through additional an…
/v1/zhihu/get_answer_list_v1
-
Column Article List
$0.02Retrieve articles from a Zhihu column with offset pagination. Use it to browse a known column's publication history and select articles for detail lookup.
/v1/zhihu/get_column_article_list_v1
-
User Info
$0.02Retrieve the public profile for a Zhihu user identified by URL token. Use it to inspect an account found through Zhihu content or relationship data.
/v1/zhihu/get_user_info_v1
-
User Followees
$0.02Retrieve accounts followed by a Zhihu user, with offset pagination. Use it to explore the outgoing connections of a known account.
/v1/zhihu/get_user_followees_v1
-
User Followers
$0.02Retrieve accounts that follow a Zhihu user, with offset pagination. Use it to explore the audience connections of a known account.
/v1/zhihu/get_user_followers_v1
-
User Articles
$0.02Retrieve articles published by a Zhihu user with offset pagination and publish-time or upvote sorting. Use it to browse a creator's articles in the selected…
/v1/zhihu/get_user_articles_v1
-
User Included Articles
$0.02Retrieve the included-article records exposed for a Zhihu user, with offset pagination. Use it to browse that account's included-article list.
/v1/zhihu/get_user_included_articles_v1
-
User Follow Columns
$0.02Retrieve Zhihu columns followed by a user, with offset pagination. Use it to browse the columns associated with a known account's follow activity.
/v1/zhihu/get_user_follow_columns_v1
-
User Follow Collections
$0.02Retrieve Zhihu collections followed by a user, with offset pagination. Use it to browse the collections associated with a known account's follow activity.
/v1/zhihu/get_user_follow_collections_v1
-
User Follow Topics
$0.02Retrieve Zhihu topics followed by a user, with offset pagination. Use it to browse the topics associated with a known account's follow activity.
/v1/zhihu/get_user_follow_topics_v1
-
Answer Comments
$0.02Retrieve comments for a Zhihu answer with hottest or latest sorting and offset pagination. Use it to review discussion around a known answer and continue thr…
/v1/zhihu/get_answer_comments_v1
-
Comment Replies
$0.02Retrieve replies to a Zhihu comment with hottest or latest sorting and offset pagination. Use it to follow discussion under a known comment and continue thro…
/v1/zhihu/get_comment_replies_v1