> ## Documentation Index
> Fetch the complete documentation index at: https://cognitio-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Find text

> Search for text patterns across files in the project using ripgrep.



## OpenAPI

````yaml /openapi.json get /find
openapi: 3.1.1
info:
  title: cognitio
  description: cognitio api
  version: 1.0.0
servers: []
security: []
paths:
  /find:
    get:
      summary: Find text
      description: Search for text patterns across files in the project using ripgrep.
      operationId: find.text
      parameters:
        - in: query
          name: directory
          schema:
            type: string
        - in: query
          name: workspace
          schema:
            type: string
        - in: query
          name: pattern
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Matches
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    path:
                      type: object
                      properties:
                        text:
                          type: string
                      required:
                        - text
                    lines:
                      type: object
                      properties:
                        text:
                          type: string
                      required:
                        - text
                    line_number:
                      type: number
                    absolute_offset:
                      type: number
                    submatches:
                      type: array
                      items:
                        type: object
                        properties:
                          match:
                            type: object
                            properties:
                              text:
                                type: string
                            required:
                              - text
                          start:
                            type: number
                          end:
                            type: number
                        required:
                          - match
                          - start
                          - end
                  required:
                    - path
                    - lines
                    - line_number
                    - absolute_offset
                    - submatches
      x-codeSamples:
        - lang: js
          source: |-
            import { createCognitioClient } from "@cognitio/sdk

            const client = createCognitioClient()
            await client.find.text({
              ...
            })

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.