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

# Grep transcripts

> Find a pattern in the dialogue of many transcripts.



## OpenAPI

````yaml /specs-prettified/realtime/openapi.stable.json post /v1/stable/transcript/grep
openapi: 3.0.0
info:
  title: Realtime
  description: Realtime gateway API service
  version: 1.0.0
  contact: {}
servers:
  - url: https://realtime-api.voiceflow.com
security: []
tags: []
paths:
  /v1/stable/transcript/grep:
    post:
      tags:
        - Transcript
      summary: Grep transcripts
      description: Find a pattern in the dialogue of many transcripts.
      operationId: StableTranscriptController_grep
      parameters:
        - name: projectID
          required: true
          in: query
          schema:
            type: string
            description: The ID of the project to operate on.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/StableTranscriptGrepRequest"
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StableTranscriptGrepResponse"
      security:
        - token: []
components:
  schemas:
    StableTranscriptGrepRequest:
      type: object
      properties:
        pattern:
          type: string
          minLength: 1
          description: "Regex (case-insensitive) or plain text to find in the dialogue. A
            pattern may hold one open quantifier (*, +, ?, {n,} or {n,m}), no
            backreference and no alternation inside a group. Use exact counts
            such as \\d{3}, or put the alternation at the top level:
            refund|return. Any other pattern runs as plain text, and the result
            says so."
        transcriptIDs:
          description: Transcripts to scan. Leave it out to scan the newest transcripts in
            the date range.
          minItems: 1
          maxItems: 60
          type: array
          items:
            type: string
            minLength: 1
        startDate:
          description: "Lower bound when no transcriptIDs are given: a day or a timestamp."
          anyOf:
            - type: string
              format: date
              pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
            - type: string
              format: date-time
              pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        endDate:
          description: "Upper bound when no transcriptIDs are given: a day or a timestamp."
          anyOf:
            - type: string
              format: date
              pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
            - type: string
              format: date-time
              pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        environmentAlias:
          description: Only transcripts from this environment, when no transcriptIDs are
            given.
          type: string
        limit:
          default: 25
          description: How many transcripts to scan at most, 1 to 60.
          type: integer
          minimum: 1
          maximum: 60
      required:
        - pattern
      additionalProperties: false
    StableTranscriptGrepResponse:
      type: object
      properties:
        pattern:
          type: string
        scanned:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: Transcripts scanned.
        matched:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: Transcripts with at least one match.
        capped:
          description: More transcripts were in the range, or more unique transcriptIDs
            were given, than were scanned; `note` says what to do.
          type: boolean
        errored:
          description: Transcripts whose log could not be read.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        skipped:
          description: Given transcriptIDs that do not belong to this project.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        note:
          type: string
        literalText:
          description: The pattern ran as plain text; `note` says why.
          type: boolean
          enum:
            - true
          x-enumNames:
            - "TRUE"
        hits:
          type: array
          items:
            $ref: "#/components/schemas/StableTranscriptGrepHit"
      required:
        - pattern
        - scanned
        - matched
        - hits
    StableTranscriptGrepHit:
      type: object
      properties:
        transcriptID:
          type: string
        matches:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: How many dialogue lines matched.
        snippets:
          type: array
          items:
            type: string
          description: Up to 5 matching lines, each cut to 240 characters.
      required:
        - transcriptID
        - matches
        - snippets
  securitySchemes:
    token:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Voiceflow bearer token
````
