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

# Fuzzy search for files and directories

> Performs fuzzy search on filesystem paths using fuzzy matching algorithm. Optimized alternative to find and grep commands.



## OpenAPI

````yaml https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml get /filesystem-search/{path}
openapi: 3.0.0
info:
  contact: {}
  description: API for manipulating filesystem, processes and network.
  title: Sandbox API
  version: 0.0.1
servers:
  - url: https://sbx-{sandbox_id}-{workspace_id}.{region}.bl.run
    variables:
      sandbox_id:
        default: unknown
      workspace_id:
        default: unknown
      region:
        default: unknown
security:
  - BearerAuth: []
paths:
  /filesystem-search/{path}:
    get:
      tags:
        - filesystem
      summary: Fuzzy search for files and directories
      description: >-
        Performs fuzzy search on filesystem paths using fuzzy matching
        algorithm. Optimized alternative to find and grep commands.
      parameters:
        - description: Path to search in (e.g., /home/user/projects)
          in: path
          name: path
          required: true
          schema:
            type: string
        - description: 'Maximum number of results to return (default: 20)'
          in: query
          name: maxResults
          schema:
            type: integer
        - description: Comma-separated file patterns to include (e.g., *.go,*.js)
          in: query
          name: patterns
          schema:
            type: string
        - description: >-
            Comma-separated directory names to skip (default:
            node_modules,vendor,.git,dist,build,target,__pycache__,.venv,.next,coverage).
            Use empty string to skip no directories.
          in: query
          name: excludeDirs
          schema:
            type: string
        - description: 'Exclude hidden files and directories (default: true)'
          in: query
          name: excludeHidden
          schema:
            type: boolean
      responses:
        '200':
          description: Fuzzy search results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FuzzySearchResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    FuzzySearchResponse:
      properties:
        matches:
          items:
            $ref: '#/components/schemas/FuzzySearchMatch'
          type: array
        total:
          example: 5
          type: integer
      required:
        - matches
        - total
      type: object
    ErrorResponse:
      properties:
        error:
          example: Error message
          type: string
      required:
        - error
      type: object
    FuzzySearchMatch:
      properties:
        path:
          example: src/main.go
          type: string
        score:
          example: 100
          type: integer
        type:
          description: '"file" or "directory"'
          example: file
          type: string
      required:
        - path
        - score
        - type
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````