---
title: Get Phrase-by-Phrase Transcripts
slug: tutorials/get-phrase-by-phrase-transcripts
description: Learn how to retrieve detailed phrase-by-phrase transcripts for audio interactions with this helpful document. Explore word timings, confidence scores, and speaker labels included in the transcripts. Find code examples and step-by-step instructions for ma
docTags: 
createdAt: 2022-06-14T17:57:19.000Z
---

# <font color="#3694fc">//  </font>Overview&#x20;

Leveraging the unique **`interactionIdentifier`** provided when [successfully declaring](docId\:PqLj1vqO7gTf0iqj1LBVN) the  [audio interaction](docId\:PqLj1vqO7gTf0iqj1LBVN), the **Phrase-by-Phrase Transcript endpoint** lets you instantly retrieve a detailed **phrase-by-phrase transcript** for the audio file provided, including precise **word timings**, **[confidence scores](docId:05yDvE34Wjax0rFhFWDxM)**, and [speaker labels.](https://docs.elevateai.com/transcription-features#fDLGr)

When this <font color="#2166ae">`GET`</font> successfully executes, an **`HTTP`** status is returned to indicate the request was successful, along with a **`JSON`** response providing your [detailed transcription output](https://docs.elevateai.com/tutorials/get-phrase-by-phrase-transcript#w5M5e).&#x20;


:::CodeblockTabs
Sample API Response (Truncated)

```json
{
  "allParticipants": {
    "phrases": [
      "Thank", "You", "For", "Calling", ...
    ],
    "phraseSegments": [
      {
        "startTimeOffset": 1410,
        "endTimeOffset": 1730,
        "phraseIndex": 0,
        "score": 1
      },
      {
        "startTimeOffset": 1730,
        "endTimeOffset": 1810,
        "phraseIndex": 1,
        "score": 1
      },
      ...]
  ...
  }
  ...
}
```
:::

If an error occurs when requesting to declare the interaction, a standard **`HTTP`** status will be retuned to indicate the request was unsuccessful, along with a **`JSON`** response containing additional details to [assist with troubleshooting.](https://docs.elevateai.com/#Qofti)&#x20;

***

# <font color="#3496fc">//  </font>Request Parameters & Code Examples

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://api.elevateai.com/v1/interactions/{interactionIdentifier}/transcript",
  "name": "Retrieve a Phrase-by-Phrase Transcript",
  "method": "GET",
  "request": {
    "pathParameters": [
      {
        "kind": "required",
        "name": "interactionIdentifier",
        "type": "string",
        "description": "interactionIdentifier returned upon successfully declaring the interaction"
      }
    ],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "X-API-Token",
        "type": "string",
        "description": "Valid API key associated with your account for authentication and usage tracking"
      },
      {
        "kind": "optional",
        "name": "Accept-Encoding",
        "type": "string",
        "description": "Recommended for bandwidth optimization, will be 'gzip, deflate, br'"
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "WoV_v6SkqlwseAvEf84vd",
        "code": "{\n\t\"allParticipants\": {\n\t\t\"phrases\": [\n\t\t\t\"string\"\n\t\t],\n\t\t\"phraseSegments\": [{\n\t\t\t\"startTimeOffset\": \"number\",\n\t\t\t\"endTimeOffset\": \"number\",\n\t\t\t\"phraseIndex\": \"number\",\n\t\t\t\"score\": \"number\"\n\t\t}]\n\t},\n\t\"participantOne\": {\n\t\t\"phrases\": [\n\t\t\t\"string\"\n\t\t],\n\t\t\"phraseSegments\": [{\n\t\t\t\"startTimeOffset\": \"number\",\n\t\t\t\"endTimeOffset\": \"number\",\n\t\t\t\"phraseIndex\": \"number\",\n\t\t\t\"score\": \"number\"\n\t\t}]\n\t},\n\t\"participantTwo\": {\n\t\t\"phrases\": [\n\t\t\t\"string\"\n\t\t],\n\t\t\"phraseSegments\": [{\n\t\t\t\"startTimeOffset\": \"number\",\n\t\t\t\"endTimeOffset\": \"number\",\n\t\t\t\"phraseIndex\": \"number\",\n\t\t\t\"score\": \"number\"\n\t\t}]\n\t},\n\t\"redactionSegments\": {\n\t\t\"startTimeOffset\": \"number\",\n\t\t\"endTimeOffset\": \"number\",\n\t\t\"result\": \"string\",\n\t\t\"score\": \"number\"\n\t}\n}",
        "language": "200",
        "customLabel": ""
      },
      {
        "id": "ypTHsXrC_k8R4z-Ys8dYF",
        "code": "{\n  \"errorMessage\"\n}",
        "language": "401",
        "customLabel": ""
      },
      {
        "id": "cnnwSSw8RcAbNP3VrVM75",
        "code": "{\r\n  \"errorMessage\"\r\n}",
        "language": "404",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "WoV_v6SkqlwseAvEf84vd"
  },
  "examples": {
    "languages": [
      {
        "id": "hd-0AondTYPH5nKYQvTFk",
        "code": "curl --location -g --request GET 'https://api.elevateai.com/v1/interactions/{interctionIdentifier}/transcript' \\\n--header 'X-API-Token: {Your API Token}' \\\n--header 'Content-Type: application/json' \\\n--header 'Accept-Encoding: gzip, deflate, br'",
        "language": "curl",
        "customLabel": ""
      },
      {
        "id": "E5gh4zIxbbGtZE2JimFQy",
        "code": "var request = require('request');\nvar options = {\n  'method': 'GET',\n  'url': 'https://api.elevateai.com/v1/interactions/{interctionIdentifier}/transcript',\n  'headers': {\n    'X-API-Token': '{Your API Token}',\n    'Content-Type': 'application/json',\n    'Accept-Encoding': 'gzip, deflate, br'\n  }\n};\nrequest(options, function (error, response) {\n  if (error) throw new Error(error);\n  console.log(response.body);\n});",
        "language": "nodejs",
        "customLabel": ""
      },
      {
        "id": "diBVIFF8cBPbTza4jGpCm",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"X-API-Token\", \"{Your API Token}\");\nmyHeaders.append(\"Content-Type\", \"application/json\");\nmyHeaders.append(\"Accept-Encoding\", \"gzip, deflate, br\");\n\nvar requestOptions = {\n  method: 'GET',\n  headers: myHeaders,\n  redirect: 'follow'\n};\n\nfetch(\"https://api.elevateai.com/v1/interactions/{interctionIdentifier}/transcript\", requestOptions)\n  .then(response => response.text())\n  .then(result => console.log(result))\n  .catch(error => console.log('error', error));",
        "language": "javascript",
        "customLabel": ""
      },
      {
        "id": "q5DbqAwVRRI5guMFfNex1",
        "code": "import http.client\nimport json\n\nconn = http.client.HTTPSConnection(\"api.elevateai.com\")\npayload = ''\nheaders = {\n  'X-API-Token': '{Your API Token}',\n  'Content-Type': 'application/json',\n  'Accept-Encoding': 'gzip, deflate, br'\n}\nconn.request(\"GET\", \"/v1/interactions/{interctionIdentifier}/transcript\", payload, headers)\nres = conn.getresponse()\ndata = res.read()\nprint(data.decode(\"utf-8\"))",
        "language": "python",
        "customLabel": ""
      },
      {
        "id": "syjyH6AOCoCCJ0FTbCkhm",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.elevateai.com/v1/interactions/{interctionIdentifier}/transcript\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"X-API-Token\"] = \"{Your API Token}\"\nrequest[\"Content-Type\"] = \"application/json\"\nrequest[\"Accept-Encoding\"] = \"gzip, deflate, br\"\n\nresponse = https.request(request)\nputs response.read_body\n",
        "language": "ruby",
        "customLabel": ""
      },
      {
        "id": "B-gcGdTD9_LMIrV4pagOy",
        "code": "var client = new RestClient(\"https://api.elevateai.com/v1/interactions/{interctionIdentifier}/transcript\");\r\nclient.Timeout = -1;\r\nvar request = new RestRequest(Method.GET);\r\nrequest.AddHeader(\"X-API-Token\", \"{Your API Token}\");\r\nrequest.AddHeader(\"Content-Type\", \"application/json\");\r\nrequest.AddHeader(\"Accept-Encoding\", \"gzip, deflate, br\");\r\nIRestResponse response = client.Execute(request);\r\nConsole.WriteLine(response.Content);",
        "language": "csharp",
        "customLabel": ""
      },
      {
        "id": "cCHH0AMODXYiXjV-9ezfN",
        "code": "<?php\r\n\r\n$curl = curl_init();\r\n\r\ncurl_setopt_array($curl, array(\r\n  CURLOPT_URL => 'https://api.elevateai.com/v1/interactions/%7BinterctionIdentifier%7D/transcript',\r\n  CURLOPT_RETURNTRANSFER => true,\r\n  CURLOPT_ENCODING => '',\r\n  CURLOPT_MAXREDIRS => 10,\r\n  CURLOPT_TIMEOUT => 0,\r\n  CURLOPT_FOLLOWLOCATION => true,\r\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\r\n  CURLOPT_CUSTOMREQUEST => 'GET',\r\n  CURLOPT_HTTPHEADER => array(\r\n    'X-API-Token: {Your API Token}',\r\n    'Content-Type: application/json',\r\n    'Accept-Encoding: gzip, deflate, br'\r\n  ),\r\n));\r\n\r\n$response = curl_exec($curl);\r\n\r\ncurl_close($curl);\r\necho $response;\r\n",
        "language": "php",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "q5DbqAwVRRI5guMFfNex1"
  },
  "description": "",
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  },
  "autoGeneratedAnchorSlug": "retrieve-a-phrase-by-phrase-transcript",
  "legacyHash": "D47zG7RCs9buhBbXUrvbr"
}
```
:::

***

# <font color="#3694fc">//  </font>Response Schema

## Schema

| **Element**                                                  | **Type**         | **Description**                                                                                                                                                                                                                    |
| ------------------------------------------------------------ | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **&#x7B;participant}**                                       | object           | Top level for [speaker label,](https://docs.elevateai.com/transcription-features#fDLGr)identifying whether data in object represents speech associated with **`allParticipants`** or **`participantOne`** and **`participantTwo`** |
| &#x7B;participant}/**phrases**                               | array of strings | Ordered list of each unique, non-redacted phase spoken by **`participant`** in the interaction                                                                                                                                     |
| &#x7B;participant}/**phraseSegments**                        | array of objects | List of details associated with each utterance                                                                                                                                                                                     |
| &#x7B;participant}/phraseSegments/**startTimeOffset &#x20;** | number           | Start time of phrase, in milliseconds                                                                                                                                                                                              |
| &#x7B;participant}/phraseSegments/**endTimeOffset**          | number           | End time of phrase, in milliseconds                                                                                                                                                                                                |
| &#x7B;participant}/phraseSegments/**phraseIndex**            | number           | Index of phrase in **`participant`**/phrases                                                                                                                                                                                       |
| &#x7B;participant}/phraseSegments/**score**                  | float            | Confidence score                                                                                                                                                                                                                   |
| **redactionSegments**                                        | array of objects | List of details associated with each redacted phrase                                                                                                                                                                               |
| redactionSegments/**startTimeOffset**                        | number           | Start time of redacted phrase, in milliseconds                                                                                                                                                                                     |
| redactionSegments/**endTimeOffset**                          | number           | End time of redacted phrase, in milliseconds                                                                                                                                                                                       |
| redactionSegments/**result**                                 | string           | Reason for redaction, will be **`CVV`**, **`Credit Card`**, or **`Social Security`**                                                                                                                                               |
| redactionSegments/**score**                                  | float            | Confidence score                                                                                                                                                                                                                   |


**Need more help?** Contact the [ElevateAI Support team](mailto\:support@elevateai.com). &#x20;
