SiYuan icon

SiYuan

Manage SiYuan notebooks, documents, blocks, attributes, and more. Designed for AI agent workflows.

Search → Search by Attribute

AI-generated

Overview

This node performs a search operation within the SiYuan environment by matching a specified attribute name and its value. It is useful for querying blocks or items that have custom or built-in attributes, such as 'custom-status', 'memo', or 'alias'. For example, you can search for all blocks where the attribute 'custom-status' contains a certain value, enabling targeted data retrieval based on metadata.

Use Case Examples

  1. Search for blocks with attribute 'custom-status' containing 'in-progress' to track ongoing tasks.
  2. Find all items with the attribute 'alias' matching a partial string to quickly locate related content.

Properties

Name Meaning
Attribute Name The name of the attribute to search for (e.g., 'custom-status', 'memo', 'alias').
Attribute Value The attribute value to match, supporting partial matches.

Output

JSON

  • result - The search results matching the specified attribute name and value.

Dependencies

  • Requires SiYuan API URL and API token credentials for authentication.

Troubleshooting

  • Ensure that the SiYuan API URL and token are correctly configured; missing or invalid credentials will cause authentication errors.
  • If no results are returned, verify that the attribute name and value are correctly specified and exist in the SiYuan workspace.
  • Partial matches are supported, but overly broad values may return large result sets or unexpected matches.

Discussion