---
updatedAt: 2026-09-22T19:12:17.000Z
agentTools:
  projectIndex: https://docs.wistia.com/llms.txt
---

# Find Caption Matches

Finds exact text in caption tracks without modifying them. Matching uses the
same normalization, composite-media boundaries, and time coordinates as the
targeted caption edit endpoint. Fuzzy alternatives are returned separately
as suggestions and are never reported as exact matches. A resolved match
means the wording was located; a later write can still fail authorization,
version, or edit-boundary checks.

When more than 10 exact matches exist, use the one-based `occurrence`
parameter to retrieve a specific later match.

Authentication and request validation failures apply to the whole request.
Missing, inaccessible, or otherwise unreadable media are reported as
per-media statuses without exposing whether an inaccessible ID exists.

## Requires api token with one of the following permissions
```
Read all folder and media data
```

Tokens with the "Act with a team member's permissions" permission
(`all:delegate_to_contact_permissions` scope) can also be used.


# OpenAPI definition

````json
{
  "openapi": "3.1.1",
  "info": {
    "title": "Data API",
    "description": "Wistia Data API",
    "version": "2026.09.0"
  },
  "servers": [
    {
      "url": "https://api.wistia.com/modern"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Captions"
    }
  ],
  "paths": {
    "/caption_matches": {
      "post": {
        "summary": "Find Caption Matches",
        "x-speakeasy-group": "captions",
        "x-speakeasy-name-override": "findMatches",
        "description": "Finds exact text in caption tracks without modifying them. Matching uses the\nsame normalization, composite-media boundaries, and time coordinates as the\ntargeted caption edit endpoint. Fuzzy alternatives are returned separately\nas suggestions and are never reported as exact matches. A resolved match\nmeans the wording was located; a later write can still fail authorization,\nversion, or edit-boundary checks.\n\nWhen more than 10 exact matches exist, use the one-based `occurrence`\nparameter to retrieve a specific later match.\n\nAuthentication and request validation failures apply to the whole request.\nMissing, inaccessible, or otherwise unreadable media are reported as\nper-media statuses without exposing whether an inaccessible ID exists.\n\n## Requires api token with one of the following permissions\n```\nRead all folder and media data\n```\n\nTokens with the \"Act with a team member's permissions\" permission\n(`all:delegate_to_contact_permissions` scope) can also be used.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "unevaluatedProperties": false,
                "type": "object",
                "properties": {
                  "media_ids": {
                    "description": "Explicit hashed IDs of the media whose captions should be searched.",
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 50,
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "target_text": {
                    "description": "Exact caption wording to locate.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "language_code": {
                    "description": "Exact IETF language tag. Omit when each media has only one caption track.",
                    "type": "string",
                    "minLength": 1
                  },
                  "occurrence": {
                    "description": "One-based exact occurrence to return, including occurrences after the first 10.",
                    "type": "integer",
                    "minimum": 1
                  },
                  "start_ms": {
                    "description": "Optional start of a time range used to disambiguate the match.",
                    "type": "integer",
                    "minimum": 0
                  },
                  "end_ms": {
                    "description": "Optional end of a time range used to disambiguate the match.",
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "media_ids",
                  "target_text"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Every requested media ID was processed; inspect each result's status.",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "properties": {
                    "requested_count": {
                      "type": "integer"
                    },
                    "succeeded_count": {
                      "description": "Number of media whose transcript search was processed successfully, whether or not an exact match was found.",
                      "type": "integer"
                    },
                    "failed_count": {
                      "description": "Number of media that returned a non-ok per-media status.",
                      "type": "integer"
                    },
                    "complete": {
                      "description": "True when every requested media ID was processed, including per-media negative results.",
                      "type": "boolean"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "unevaluatedProperties": false,
                        "type": "object",
                        "properties": {
                          "media_hashed_id": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "ok",
                              "media_not_found",
                              "invalid_media",
                              "no_tracks",
                              "language_required",
                              "track_not_found",
                              "no_active_payload",
                              "response_too_large"
                            ]
                          },
                          "tracks": {
                            "type": "array",
                            "items": {
                              "unevaluatedProperties": false,
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "language": {
                                  "type": "string"
                                },
                                "english_name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "native_name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "version": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "is_draft": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "id",
                                "language",
                                "version",
                                "is_draft"
                              ]
                            }
                          },
                          "track": {
                            "unevaluatedProperties": false,
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "language": {
                                "type": "string"
                              },
                              "english_name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "native_name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "version": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "is_draft": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "id",
                              "language",
                              "version",
                              "is_draft"
                            ]
                          },
                          "match_status": {
                            "type": "string",
                            "enum": [
                              "resolved",
                              "ambiguous",
                              "not_found",
                              "occurrence_not_found"
                            ]
                          },
                          "match_count": {
                            "description": "Total number of exact matches, including matches not present in this response page.",
                            "type": "integer"
                          },
                          "matches": {
                            "description": "Exact matches only.",
                            "type": "array",
                            "items": {
                              "unevaluatedProperties": false,
                              "type": "object",
                              "properties": {
                                "text": {
                                  "type": "string"
                                },
                                "context": {
                                  "type": "string"
                                },
                                "start_ms": {
                                  "type": "integer"
                                },
                                "end_ms": {
                                  "type": "integer"
                                }
                              },
                              "required": [
                                "text",
                                "context",
                                "start_ms",
                                "end_ms"
                              ]
                            }
                          },
                          "matches_truncated": {
                            "type": "boolean"
                          },
                          "next_occurrence": {
                            "description": "The next one-based occurrence that can be requested when exact matches are truncated.",
                            "type": "integer",
                            "minimum": 1
                          },
                          "suggestions": {
                            "description": "Fuzzy alternatives when no exact match exists. These are not exact matches.",
                            "type": "array",
                            "items": {
                              "unevaluatedProperties": false,
                              "type": "object",
                              "properties": {
                                "text": {
                                  "type": "string"
                                },
                                "context": {
                                  "type": "string"
                                },
                                "start_ms": {
                                  "type": "integer"
                                },
                                "end_ms": {
                                  "type": "integer"
                                }
                              },
                              "required": [
                                "text",
                                "context",
                                "start_ms",
                                "end_ms"
                              ]
                            }
                          },
                          "suggestions_truncated": {
                            "type": "boolean"
                          },
                          "hint": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "recovery": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "media_hashed_id",
                          "status"
                        ]
                      }
                    }
                  },
                  "required": [
                    "requested_count",
                    "succeeded_count",
                    "failed_count",
                    "complete",
                    "results"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "properties": {
                    "error": {
                      "description": "Error message detailing the reason for the bad request.",
                      "type": "string",
                      "examples": [
                        "Bad request"
                      ]
                    },
                    "errors": {
                      "description": "Array of error messages detailing the reasons for the bad request.",
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, invalid or missing token",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "properties": {
                    "code": {
                      "description": "A machine-readable identifier for the specific authorization failure.",
                      "type": "string",
                      "enum": [
                        "unauthorized_credentials",
                        "account_inactive",
                        "unauthorized_scope",
                        "unauthorized_params"
                      ]
                    },
                    "error": {
                      "type": "string",
                      "examples": [
                        "Invalid credentials."
                      ]
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "examples": [
                        "Internal server error"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Captions"
        ],
        "parameters": [
          {
            "name": "X-Wistia-API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "2026-09"
            }
          }
        ],
        "x-readme": {
          "code-samples": [
            {
              "name": "Typescript (SDK)",
              "language": "javascript",
              "code": "import { Wistia } from \"@wistia/wistia-api-client\";\n\nconst wistia = new Wistia({\n  bearerAuth: process.env[\"WISTIA_BEARER_AUTH\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await wistia.captions.findMatches({\n    mediaIds: [],\n    targetText: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"
            }
          ]
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "x-readme": {
    "samples-languages": [
      "javascript",
      "shell",
      "node",
      "python",
      "ruby"
    ]
  }
}
````