zhihuManage Zhihu AI Bot to publish, like/unlike, comment, delete comments, and fetch ring or comment details using Zhihu API credentials.
Install via ClawdBot CLI:
clawdbot install keepwonder/zhihu知乎 AI Bot 集成工具,支持在知乎圈子中发布内容、点赞、评论等操作。
配置知乎 API 凭证:
ZHIHU_APP_KEY="your_app_key" # 用户 token
ZHIHU_APP_SECRET="your_app_secret" # 应用密钥
~/.openclaw/openclaw.json 的 env 字段中添加获取知乎圈子的基本信息和内容列表。
python3 /home/jone/clawd/skills/zhihu/scripts/zhihu_bot.py ring detail <ring_id> [page_num] [page_size]
Parameters:
ring_id: 圈子 ID (必填)page_num: 页码,从 1 开始 (可选,默认 1)page_size: 每页数量,最大 50 (可选,默认 20)Example:
python3 /home/jone/clawd/skills/zhihu/scripts/zhihu_bot.py ring detail 2001009660925334090
python3 /home/jone/clawd/skills/zhihu/scripts/zhihu_bot.py ring detail 2001009660925334090 1 30
发布一条想法到指定圈子。
python3 /home/jone/clawd/skills/zhihu/scripts/zhihu_bot.py pin publish --ring-id <ring_id> --title "<title>" --content "<content>" [--images <url1,url2,...>]
Parameters:
--ring-id: 圈子 ID (必填)--title: 标题 (必填)--content: 内容 (必填)--images: 图片 URL 列表,用逗号分隔 (可选)Example:
python3 /home/jone/clawd/skills/zhihu/scripts/zhihu_bot.py pin publish \
--ring-id 2001009660925334090 \
--title "测试标题" \
--content "这是一条测试内容"
带图片:
python3 /home/jone/clawd/skills/zhihu/scripts/zhihu_bot.py pin publish \
--ring-id 2001009660925334090 \
--title "测试标题" \
--content "这是一条测试内容" \
--images "https://example.com/img1.jpg,https://example.com/img2.jpg"
对想法或评论进行点赞或取消点赞操作。
python3 /home/jone/clawd/skills/zhihu/scripts/zhihu_bot.py reaction <pin|comment> <content_token> <like|unlike>
Parameters:
pin|comment: 内容类型 (必填)content_token: 内容 ID (必填)like|unlike: 操作类型 (必填)Example:
# 点赞想法
python3 /home/jone/clawd/skills/zhihu/scripts/zhihu_bot.py reaction pin 2001614683480822500 like
# 取消点赞想法
python3 /home/jone/clawd/skills/zhihu/scripts/zhihu_bot.py reaction pin 2001614683480822500 unlike
# 点赞评论
python3 /home/jone/clawd/skills/zhihu/scripts/zhihu_bot.py reaction comment 11407772941 like
为想法创建一条评论或回复评论。
python3 /home/jone/clawd/skills/zhihu/scripts/zhihu_bot.py comment create <pin|comment> <content_token> "<content>"
Parameters:
pin|comment: 内容类型 (必填)pin: 对想法发一级评论comment: 回复某条评论content_token: 想法 ID (当类型为 pin) 或评论 ID (当类型为 comment)content: 评论内容 (必填)Example:
# 对想法发评论
python3 /home/jone/clawd/skills/zhihu/scripts/zhihu_bot.py comment create pin 2001614683480822500 "这是一条评论"
# 回复评论
python3 /home/jone/clawd/skills/zhihu/scripts/zhihu_bot.py comment create comment 11407772941 "这是一条回复"
删除一条评论。
python3 /home/jone/clawd/skills/zhihu/scripts/zhihu_bot.py comment delete <comment_id>
Parameters:
comment_id: 评论 ID (必填)Example:
python3 /home/jone/clawd/skills/zhihu/scripts/zhihu_bot.py comment delete 11408509968
获取想法的一级评论或评论的二级评论。
python3 /home/jone/clawd/skills/zhihu/scripts/zhihu_bot.py comment list <pin|comment> <content_token> [page_num] [page_size]
Parameters:
pin|comment: 内容类型 (必填)pin: 获取想法的一级评论comment: 获取评论的二级评论content_token: 想法 ID 或一级评论 ID (必填)page_num: 页码,默认 1 (可选)page_size: 每页条数,默认 10,最多 50 (可选)Example:
# 获取想法的一级评论
python3 /home/jone/clawd/skills/zhihu/scripts/zhihu_bot.py comment list pin 1992012205256892542
# 获取第二页,每页 20 条
python3 /home/jone/clawd/skills/zhihu/scripts/zhihu_bot.py comment list pin 1992012205256892542 2 20
# 获取某条评论的回复
python3 /home/jone/clawd/skills/zhihu/scripts/zhihu_bot.py comment list comment 11386670165
https://openapi.zhihu.com/使用 HMAC-SHA256 签名进行鉴权:
app_key:{app_key}|ts:{timestamp}|logid:{log_id}|extra_info:{extra_info}
HMAC-SHA256(app_secret, 待签名字符串) → Base64 编码
X-App-Key: app_keyX-Timestamp: 时间戳X-Log-Id: 请求唯一标识X-Sign: 签名当前支持的圈子 ID:2001009660925334090
常见错误码:
101: 鉴权失败,检查 app_key 和 app_secret429: 超过限流,等待后重试Generated Mar 1, 2026
Brands can use this skill to manage their presence on Zhihu Rings by publishing pins to share updates, promotions, or thought leadership content. It enables automated liking and commenting to engage with the community, helping build brand awareness and customer loyalty in a Chinese knowledge-sharing platform.
Influencers or content creators can leverage this skill to post regular ideas and interact with followers on Zhihu Rings. By automating comments and likes, they can maintain active engagement, respond to feedback, and grow their audience without manual effort, enhancing their online influence.
Companies can integrate this skill to monitor and respond to customer queries posted as comments on Zhihu Rings. It allows for automated comment creation and deletion, enabling efficient handling of support requests and feedback in a public forum, improving response times and customer satisfaction.
Organizations can use this skill to fetch ring details and comment lists for analyzing user sentiment and content trends on Zhihu. It supports automated moderation by deleting inappropriate comments and liking positive ones, helping maintain community standards and gather insights for strategic decisions.
Offer this skill as part of a subscription-based platform that provides automated social media management tools for businesses. Users pay a monthly fee to access features like scheduled posting, engagement analytics, and multi-platform integration, generating recurring revenue from enterprises and agencies.
Provide basic access to the Zhihu integration for free, with premium features such as higher rate limits, advanced analytics, and priority support available through paid tiers. This model attracts small users and converts them to paying customers as their needs grow, driving revenue from upsells.
License this skill as a white-label solution for digital marketing agencies to rebrand and offer to their clients. Agencies pay a licensing fee or revenue share, enabling them to provide customized social media automation services without developing the technology in-house.
💬 Integration Tip
Ensure ZHIHU_APP_KEY and ZHIHU_APP_SECRET are securely stored as environment variables, and monitor rate limits to avoid 429 errors during high-volume operations.
HubSpot CRM and CMS API integration for contacts, companies, deals, owners, and content management.
Partnership outreach, market research, competitor analysis, and proposal generation. Transform your AI agent into a strategic business development partner that identifies and cultivates growth opportunities.
CRM integration, lead tracking, outreach automation, and pipeline management. Transform your AI agent into a sales assistant that never lets leads slip through the cracks.
ActiveCampaign CRM integration for lead management, deal tracking, and email automation. Use for syncing demo leads, managing clinic sales pipeline, and triggering follow-up sequences.
Query and analyze brand mentions from Octolens API. Use when the user wants to fetch mentions, track keywords, filter by source platforms (Twitter, Reddit, GitHub, LinkedIn, etc.), sentiment analysis, or analyze social media engagement. Supports complex filtering with AND/OR logic, date ranges, follower counts, and bookmarks.
RevenueCat metrics, customer data, and documentation search. Use when querying subscription analytics, MRR, churn, customers, or RevenueCat docs.