> ## 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.

# Find files and directories

> Finds files and directories using the find command.



## OpenAPI

````yaml https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml get /filesystem-find/{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-find/{path}:
    get:
      tags:
        - filesystem
      summary: Find files and directories
      description: Finds files and directories using the find command.
      parameters:
        - description: Path to search in (e.g., /home/user/projects)
          in: path
          name: path
          required: true
          schema:
            type: string
        - description: Type of search (file or directory)
          in: query
          name: type
          schema:
            type: string
        - description: Comma-separated file patterns to include (e.g., *.go,*.js)
          in: query
          name: patterns
          schema:
            type: string
        - description: >-
            Maximum number of results to return (default: 20). If set to 0, all
            results will be returned.
          in: query
          name: maxResults
          schema:
            type: integer
        - 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: Find results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FindResponse'
        '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:
    FindResponse:
      properties:
        matches:
          items:
            $ref: '#/components/schemas/FindMatch'
          type: array
        total:
          example: 5
          type: integer
      required:
        - matches
        - total
      type: object
    ErrorResponse:
      properties:
        error:
          example: Error message
          type: string
      required:
        - error
      type: object
    FindMatch:
      properties:
        path:
          example: src/main.go
          type: string
        type:
          description: '"file" or "directory"'
          example: file
          type: string
      required:
        - path
        - type
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````