siyuan

Search, read, and manage SiYuan blocks and documents via POST JSON API requests.

Updated May 5, 2026
One-click install
npx skills add https://github.com/Z43L/zeus-agent --skill siyuan-z43l
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: siyuan
Source: https://github.com/Z43L/zeus-agent/tree/main/optional-skills/productivity/siyuan
Command: npx skills add https://github.com/Z43L/zeus-agent --skill siyuan-z43l

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the friction of manually browsing and editing your self-hosted SiYuan knowledge base by giving you a curl-driven API workflow for finding content and performing common note operations.

Core Features & Use Cases

  • Full-text search and SQL querying: Locate relevant blocks/documents using /api/search/fullTextSearchBlock or safe SELECT queries via /api/query/sql.
  • Read and navigate note content: Retrieve block content (Kramdown/Markdown-like) and traverse document structure with block children and path/attributes endpoints.
  • Create, update, rename, and delete: Create notebooks and documents, append/update blocks, set attributes, rename docs, and remove blocks/docs.
  • Export for portability: Export a document as Markdown using /api/export/exportMdContent.
  • Use Case: Find all paragraphs matching a topic (e.g., “meeting notes”), fetch their IDs and content, and append a synthesized summary into a target document for ongoing knowledge maintenance.

Quick Start

Use the siyuan skill to search for blocks containing "project timeline" in your local SiYuan instance using the SIYUAN_URL and SIYUAN_TOKEN environment variables.

Frequently Asked Questions about siyuan

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search for blocks in a SiYuan knowledge base using an API?▼

To search for blocks in a SiYuan knowledge base via API, send POST JSON requests with Token authorization to endpoints like /api/search/fullTextSearchBlock for full-text discovery or /api/query/sql for structured SQL lookups.

Can I export SiYuan documents to Markdown programmatically?▼

Yes, you can export SiYuan documents to Markdown programmatically by sending authorized POST JSON requests to the /api/export/exportMdContent endpoint to retrieve portable document content.

How do I create and update blocks in SiYuan via curl?▼

You can create and update blocks in SiYuan via curl by sending POST JSON requests with a valid SIYUAN_TOKEN to append, update, or rename documents and manage block attributes.

What do I need to configure before managing SiYuan notes through API requests?▼

Before managing SiYuan notes through API requests, you need to configure the SIYUAN_TOKEN environment variable for authorization and optionally set SIYUAN_URL to point to your self-hosted instance.

Does the SiYuan API support SQL queries for finding specific notes?▼

Yes, the SiYuan API supports SQL queries for finding specific notes by executing safe SELECT statements via the /api/query/sql endpoint to locate relevant blocks and documents.

Why are my API requests to SiYuan failing to retrieve block content?▼

API requests to SiYuan fail to retrieve block content when the SIYUAN_TOKEN is missing or invalid, or if the provided block and document ID formats do not match SiYuan's validation requirements.