Bear Blog 的新 API,和我的开源技能 / A new Bear Blog API and an open-source skill
中文
今天(2026 年 11 月 16 日),Bear Blog 推出了官方 API。文章、页面和博客设置,现在都可以通过 API 管理了。
我把这组接口封装成了 🍯 Bear Blog Skill,并开源在 GitHub。装进 Codex、Claude Code 等支持 Agent Skills 的工具后,就能用自然语言安排博客操作,例如:
$bearblog 根据这份 Markdown 创建草稿,并添加 notes 标签。
$bearblog 列出全部草稿和定时发布的文章。
Claude Code 中使用 /bearblog 调用。
这篇文章本身,就是在我的工作流中使用 🍯 Bear Blog Skill,通过 Bear Blog 官方 API 发布的。
这个技能覆盖了官方文档中的全部 7 个接口,可以创建、读取、修改和删除文章或页面,处理发布与定时发布,也能更新首页、导航、CSS 和其他受支持的博客设置。它还支持导出文章正文和设置;搜索、批量编辑则通过组合官方接口完成。
整个技能只调用 Bear Blog 官方公开 API,不使用私有协议、未公开接口或非官方平台能力。它也附带一个只依赖 Python 标准库的命令行客户端,不使用智能体时同样可以运行。
只有付费 Bear Blog 才能生成 API Key,入口在后台的 Settings → API。使用技能需要 Python 3.9+,并在本地配置 API Key 和原始 Bear 子域名;即使绑定了自定义域名,也要填写 Bear 子域名。
项目采用 MIT 许可,README 提供中英文等八种语言,安装和使用方法都放在仓库里:
English
Today, November 16, 2026, Bear Blog introduced its official API, making posts, pages and blog settings accessible through a documented interface.
I wrapped these endpoints into 🍯 Bear Blog Skill and open-sourced it on GitHub. With the skill installed in Codex, Claude Code or another tool that supports Agent Skills, you can ask the agent to manage your blog in natural language:
$bearblog Create a draft from this Markdown file and add the notes tag.
$bearblog List all drafts and scheduled posts.
In Claude Code, invoke it with /bearblog.
This article itself was published from my workflow using 🍯 Bear Blog Skill through the official Bear Blog API.
The skill covers all seven documented endpoints. It can create, read, update and delete posts or pages, publish and schedule content, and update the homepage, navigation, CSS and other supported blog settings. It also exports post bodies and settings. Search and bulk editing combine documented API calls.
It uses only Bear Blog's official public API, with no private protocols, undocumented endpoints or unofficial platform capabilities. A standalone command-line client, built entirely with the Python standard library, is included for use without an agent.
Only paid Bear Blog plans can generate API keys, under Settings → API in the dashboard. To use the skill, you need Python 3.9+ and a local configuration containing your API key and original Bear subdomain. Use the Bear subdomain even if your blog has a custom domain.
The project is MIT-licensed, with a README available in eight languages, including English and Chinese. Installation and usage instructions are in the repository: