> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yertle.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Nodes

> Search nodes with flexible filters.

Accepts a JSON body with optional filter fields: tags, directories,
title_contains, created_by, min/max_children, min/max_parents, etc.
All filters are AND-ed together. For tags, tag_match_mode controls
whether all tags must match ("all") or any tag ("any").



## OpenAPI

````yaml post /orgs/{org_id}/nodes/search
openapi: 3.1.0
info:
  title: Flow API
  description: Content-addressing backend with Git-like versioning
  version: 1.0.0
servers:
  - url: https://api.yertle.com
    description: Production
security: []
paths:
  /orgs/{org_id}/nodes/search:
    post:
      tags:
        - search
      summary: Search Nodes
      description: |-
        Search nodes with flexible filters.

        Accepts a JSON body with optional filter fields: tags, directories,
        title_contains, created_by, min/max_children, min/max_parents, etc.
        All filters are AND-ed together. For tags, tag_match_mode controls
        whether all tags must match ("all") or any tag ("any").
      operationId: search_nodes_orgs__org_id__nodes_search_post
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Org Id
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NodeSearchFilters'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NodeListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    NodeSearchFilters:
      properties:
        tags:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Tags
          description: Tag key-value pairs to filter by
        tag_match_mode:
          anyOf:
            - type: string
              enum:
                - all
                - any
            - type: 'null'
          title: Tag Match Mode
          description: >-
            'all' requires every tag to match (AND), 'any' requires at least one
            (OR)
          default: all
        directories:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Directories
          description: Directory paths to filter by
        recursive_directories:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Recursive Directories
          description: Include subdirectories when filtering by directory
          default: false
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By
          description: Filter by creator user ID
        min_children:
          anyOf:
            - type: integer
            - type: 'null'
          title: Min Children
          description: Minimum number of child nodes
        max_children:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Children
          description: Maximum number of child nodes
        min_parents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Min Parents
          description: Minimum number of parent nodes
        max_parents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Parents
          description: Maximum number of parent nodes
        min_descendants:
          anyOf:
            - type: integer
            - type: 'null'
          title: Min Descendants
          description: Minimum number of descendant nodes
        max_descendants:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Descendants
          description: Maximum number of descendant nodes
        min_ancestors:
          anyOf:
            - type: integer
            - type: 'null'
          title: Min Ancestors
          description: Minimum number of ancestor nodes
        max_ancestors:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Ancestors
          description: Maximum number of ancestor nodes
        title_contains:
          anyOf:
            - type: string
            - type: 'null'
          title: Title Contains
          description: Case-insensitive title search
        limit:
          anyOf:
            - type: integer
            - type: 'null'
          title: Limit
          description: Maximum results to return
          default: 50
        offset:
          anyOf:
            - type: integer
            - type: 'null'
          title: Offset
          description: Number of results to skip
          default: 0
      type: object
      title: NodeSearchFilters
      description: Request model for unified node search with optional filters.
    NodeListResponse:
      properties:
        nodes:
          items:
            $ref: '#/components/schemas/NodeResponse'
          type: array
          title: Nodes
          description: List of nodes
        total:
          type: integer
          title: Total
          description: Total number of nodes
        limit:
          type: integer
          title: Limit
          description: Items per page
        offset:
          type: integer
          title: Offset
          description: Current offset
      type: object
      required:
        - nodes
        - total
        - limit
        - offset
      title: NodeListResponse
      description: Response model for paginated node lists.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    NodeResponse:
      properties:
        id:
          type: string
          title: Id
          description: Node ID
        title:
          type: string
          title: Title
          description: Node title
        description:
          type: string
          title: Description
          description: Node description
        org_id:
          type: string
          title: Org Id
          description: Organization ID
        public_id:
          type: string
          title: Public Id
          description: Public identifier
        created_by:
          type: string
          title: Created By
          description: Creator user ID
        created_by_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By Email
          description: Creator email address
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Creation timestamp
        tags:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Tags
          description: Node tags
        directories:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Directories
          description: Directory paths
        num_parents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Num Parents
          description: How many parents contain this node
        num_children:
          anyOf:
            - type: integer
            - type: 'null'
          title: Num Children
          description: How many children this node contains
        num_descendants:
          anyOf:
            - type: integer
            - type: 'null'
          title: Num Descendants
          description: Total nodes reachable by walking down the tree
          default: 0
        num_ancestors:
          anyOf:
            - type: integer
            - type: 'null'
          title: Num Ancestors
          description: Total nodes reachable by walking up the tree
          default: 0
      type: object
      required:
        - id
        - title
        - description
        - org_id
        - public_id
        - created_by
        - created_at
      title: NodeResponse
      description: Response model for node data.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````