Loading...
Loading...
Search Zhihu & the web, get trending topics, and read/publish on Zhihu (知乎) — search Zhihu content or the entire web via the official Developer Platform API, get hot topics (热榜), list published articles & answers with stats, inspect content, publish articles, and answer questions. Use when the user mentions 知乎 / Zhihu, 搜索知乎, 全网搜索, 热榜, "我的知乎文章/回答", reading stats, 发文, or 回答问题.
npx skill4agent add acedatacloud/skills zhihu| Script | Auth | Capabilities |
|---|---|---|
| | Search Zhihu, search the web, get hot topics |
| | Read/write own articles & answers |
urllibZHIHU_DEVELOPER_TOKENZHIHU_COOKIES{name, value, domain, path, ...}scripts/search.pyZHIHU_DEVELOPER_TOKENSEARCH=$SKILL_DIR/scripts/search.py
# Search Zhihu content (站内搜索) — questions, answers, articles
python3 $SEARCH search "Python 爬虫"
python3 $SEARCH search "Python 爬虫" --count 5
# Search the entire web (全网搜索) — all indexed sites
python3 $SEARCH global "AI Agent"
python3 $SEARCH global "AI Agent" --count 15
# Filter by site or time
python3 $SEARCH global "React" --filter 'host=="github.com"'
python3 $SEARCH global "新闻" --filter 'publish_time>=1720000000'
python3 $SEARCH global "技术" --filter 'host=="github.com" AND publish_time>=1720000000'
python3 $SEARCH global "实时新闻" --db realtime
# Get Zhihu trending topics (热榜)
python3 $SEARCH hot
python3 $SEARCH hot --limit 10| Goal | Command |
|---|---|
| Search Zhihu (max 10 results) | |
| Search entire web (max 20) | |
| Filter by site | |
| Filter by time | |
| Search only realtime/static index | |
| Zhihu trending topics (max 30) | |
urlhost=="example.com"host=="zhihu.com"searchpublish_time>=1720000000ANDOR(host=="a.com" OR host=="b.com") AND publish_time>=Tscripts/blog.pyZHIHU_COOKIESBLOG=$SKILL_DIR/scripts/blog.py
# Read (run directly)
python3 $BLOG whoami # who is logged in
python3 $BLOG articles --limit 20 # my published articles + stats
python3 $BLOG article <article-id> # one article's details + stats
python3 $BLOG answers --limit 20 # my published answers + stats
python3 $BLOG answer <answer-id> # one answer's details + stats
python3 $BLOG question <question-id> # a question's info + whether I answered itpython3 $BLOG whoami
# → {"id": "...", "name": "崔庆才丨静觅", "url_token": "cui-qing-cai", ...}401403| Goal | Command |
|---|---|
| Who am I | |
| My latest articles + vote/comment counts | |
| My latest answers + like/favorite/comment counts | |
| Next page (any list) | add |
| One article's stats | |
| One answer's stats (incl. 赞同 voteup) | |
| A question's info + my answer id (if any) | |
voteup_countcomment_countanswersvoteup_countlike_countfavorite_countcomment_countanswer <id>voteup_countquestion <id>already_answeredmy_answer_idanswer-questionedit-answer--confirmpublish--confirm--confirm--confirm# Content is HTML. For Markdown, convert to HTML first (e.g. `pandoc -f gfm -t html`).
python3 $BLOG publish --title "标题" --content-file article.html # dry-run
python3 $BLOG publish --title "标题" --content-file article.html --draft-only --confirm # save a private draft
python3 $BLOG publish --title "标题" --content-file article.html --confirm # PUBLIC, goes live--draft-only--draft-only--draft-only<img>src--confirm<img src>data:*.zhimg.comimages: {found, rehosted, failed}images_found--no-images--confirmpublish--confirm--confirm--confirm# Content is HTML (same as articles). For Markdown, convert to HTML first.
# Post a NEW answer to a question
python3 $BLOG answer-question --question <qid> --content-file ans.html # dry-run
python3 $BLOG answer-question --question <qid> --content-file ans.html --draft-only --confirm # PRIVATE draft (safe)
python3 $BLOG answer-question --question <qid> --content-file ans.html --confirm # PUBLIC, goes live
# Edit an EXISTING answer (replaces its live, public content)
python3 $BLOG edit-answer --id <answer-id> --content-file ans.html # dry-run
python3 $BLOG edit-answer --id <answer-id> --content-file ans.html --confirm # overwrites live answeranswer-question --confirmedit-answeranswersquestion <qid>my_answer_id--draft-only--draft-only--confirmedit-answer--confirm--repost allowed|disallowed--repost allowed|disalloweddisallowed--no-imagespublish401403ZHIHU_COOKIEScsdnjuejin--platformpublish_artifactpublish_artifact(kind="article", channel="zhihu", title="<title>", url="<the REAL returned URL>", status="delivered")status="failed"_shared/artifacts.md