SiYuan Search Tool icon

SiYuan Search Tool

Use this tool to search and query the SiYuan knowledge base. Use "fullText" to find content by keywords, "sqlQuery" for advanced database queries, "searchByTag" to find tagged blocks, or "searchByAttribute" to find blocks by attribute values.

Search by Tag

AI-generated

Overview

The SiYuan Search Tool node allows users to search the SiYuan knowledge base for blocks tagged with a specific tag. This operation is useful for quickly finding all content blocks associated with a particular tag, enabling efficient organization and retrieval of tagged information within the SiYuan system. For example, a user can search for all blocks tagged with "project" to gather all project-related notes or data.

Use Case Examples

  1. Search for all blocks tagged with 'meeting' to review meeting notes.
  2. Find all blocks tagged with 'urgent' to prioritize tasks.

Properties

Name Meaning
Tag The tag name to search for (without the # symbol) used to find all blocks that have this specific tag.

Output

JSON

  • success - Indicates if the search operation was successful.
  • blocks - Array of blocks that have the specified tag, containing the search results.

Dependencies

  • SiYuan API credentials including API URL and API token

Troubleshooting

  • If the node returns an empty result, verify that the tag exists in the SiYuan knowledge base and is correctly spelled without the # symbol.
  • Common errors may include authentication failures if the API credentials are incorrect or missing. Ensure the API URL and token are valid and have the necessary permissions.
  • If the node throws an error, check the network connection to the SiYuan server and confirm the server is accessible.

Links

  • SiYuan API Reference - Official documentation for the SiYuan API used by the node to perform searches.

Discussion