v3

latestOpenAPI 3.1.02026-08-011057254.3 KB
transcript

Search words in transcript

<Note>To search through a transcription created on our EU server, replace api.assemblyai.com with api.eu.assemblyai.com.</Note> Search through the transcript for keywords. You can search for individual words, numbers, or phrases containing up to five words or numbers.

get/v2/transcript/{transcript_id}/word-search

Path parameters

transcript_idstring required

ID of the transcript

Query parameters

wordsstring[] required

Keywords to search for

Response

Word search response

idstring uuid required

The ID of the transcript

total_countinteger required

The total count of all matched instances. For e.g., word 1 matched 2 times, and word 2 matched 3 times, total_count will equal 5.

Example response

{
  "id": "d5a3d302-066e-43fb-b63b-8f57baf185db",
  "total_count": 10,
  "matches": [
    {
      "text": "smoke",
      "count": 6,
      "timestamps": [
        [
          250,
          650
        ],
        [
          49168,
          49398
        ],
        [
          55284,
          55594
        ],
        [
          168888,
          169118
        ],
        [
          215108,
          215386
        ],
        [
          225944,
          226170
        ]
      ],
      "indexes": [
        0,
        136,
        156,
        486,
        652,
        698
      ]
    },
    {
      "text": "wildfires",
      "count": 4,
      "timestamps": [
        [
          1668,
          2346
        ],
        [
          33852,
          34546
        ],
        [
          50118,
          51110
        ],
        [
          231356,
          232354
        ]
      ],
      "indexes": [
        4,
        90,
        140,
        716
      ]
    }
  ]
}