> Part of the Rephonic API reference. The full list of pages is at https://rephonic.com/llms.txt.

# Episode Transcript

> Full episode transcript, with speaker names where we know them.

```
GET https://api.rephonic.com/api/episodes/{id}/transcript/
```

Get an episode's full transcript, in segments with start and end times in milliseconds. When we can tell who is speaking, `speakers` maps each speaker number to a name.

Not every episode has a transcript, so check `transcribed` on the episode first. If there isn't one, you'll get a `400` error.

## Parameters

| Field | In | Description | Default | Max | Required |
|-------|----|-------------|---------|-----|----------|
| id | path | The episode's Rephonic ID. Get it from [search episodes](https://rephonic.com/developers/docs/1.1/search-episodes.md) or [list episodes](https://rephonic.com/developers/docs/1.1/list-episodes.md). |  |  | Yes |

## Response Fields

- `transcript` (object)
  - `speakers` (object): The names of the speakers we could identify, keyed by the speaker number used in `segments`. Empty when we couldn't tell who is speaking.
    - `{speaker}` (string): The speaker's name.
  - `segments` (array of objects): The transcript in order, one segment per stretch of speech.
    - `speaker` (integer): Who is speaking. Look the number up in `speakers`.
    - `start` (integer): Where the segment starts, in milliseconds.
    - `end` (integer): Where the segment ends, in milliseconds.
    - `text` (string): What was said.
- `episode` (object): The episode the transcript belongs to.
  - `id` (string): The episode's Rephonic ID.
  - `title` (string): The episode's title.
  - `published` (timestamp): When the episode was published.
  - `audio_url` (string or null): The audio file, or `null` when Apple Podcasts hosts the audio, in which case use `itunes_id`.
  - `guid` (string or null): The episode's GUID from the RSS feed.
  - `itunes_id` (integer or null): The episode's Apple Podcasts ID.
  - `duration` (integer or null): How long the episode is, in seconds.
  - `transcribed` (boolean): Whether we have a transcript. Get it from [episode transcript](https://rephonic.com/developers/docs/1.1/episode-transcript.md).
  - `type` (string or null): The episode's format. Values: `monologue`, `discussion`, `interview`, `storytelling`, `scripted`, `news`, `review`, `educational`, `journalism`, `documentary`, `q_and_a`.
  - `evergreen` (boolean or null): Whether the episode is evergreen, meaning its content won't go out of date.
  - `branded` (boolean or null): Whether the episode is made to promote a company or organisation.
  - `popularity` (number or null): How popular the episode is in Apple Podcasts, from 0 to 1. Only compare it between episodes of the same show. It's `null` for shows without enough ratings or episodes for Apple to rank them.
  - `political_leaning` (object or null): The episode's political leaning, or `null` when it isn't political.
    - `name` (string): The leaning. Values: `left`, `center_left`, `center`, `center_right`, `right`.
    - `explanation` (string or null): Why we think so.
  - `summary` (string or null): Our short summary of the episode, or `null` until we've analysed it.
  - `notes` (string or null): The show notes from the RSS feed, as plain text.
  - `youtube_videos` (array of YoutubeVideo objects): The YouTube videos we matched to the episode.
  - `podcast` (PodcastSummary object): The podcast the episode belongs to.

## Example Request

```bash
curl https://api.rephonic.com/api/episodes/9jq9c-huberman-lab-dr-stuart-mcgill-build-a-strong/transcript/ \
  -H "X-Rephonic-Api-Key: YOUR_API_KEY"
```

## Example Response

```json
{
  "transcript": {
    "speakers": {
      "1": "Andrew Huberman",
      "2": "Dr. Stuart McGill"
    },
    "segments": [
      {
        "speaker": 1,
        "start": 300,
        "end": 5660,
        "text": "Welcome to the Huberman Lab Podcast, where we discuss science and science-based tools for everyday life."
      },
      {
        "speaker": 1,
        "start": 9420,
        "end": 17820,
        "text": "I'm Andrew Huberman, and I'm a professor of neurobiology and ophthalmology at Stanford School of Medicine. My guest today is Dr. Stuart McGill."
      },
      {
        "speaker": 2,
        "start": 72520,
        "end": 86020,
        "text": "Hi Andrew."
      }
    ]
  },
  "episode": {
    "id": "9jq9c-huberman-lab-dr-stuart-mcgill-build-a-strong",
    "title": "Dr. Stuart McGill: Build a Strong, Pain-Proof Back",
    "published": "2024-07-15T08:00:00Z",
    "audio_url": "https://www.podtrac.com/pts/redirect.mp3/pdst.fm/...",
    "guid": "b97dc99c-425c-11ef-841c-83023d1564cf",
    "itunes_id": null,
    "duration": 10335,
    "transcribed": true,
    "type": "interview",
    "evergreen": true,
    "branded": false,
    "popularity": null,
    "political_leaning": null,
    "summary": "A conversation about how to build a strong back and prevent back pain.",
    "notes": "In this episode, my guest is Dr. Stuart McGill, Ph.D...",
    "youtube_videos": [],
    "podcast": {
      "id": "huberman-lab",
      "name": "Huberman Lab",
      "itunes_id": 1545953110,
      "publisher": {
        "id": "scicomm-media",
        "name": "Scicomm Media"
      },
      "genres": ["Life Sciences", "Science", "Health & Fitness"],
      "artwork_url": "https://img.rephonic.com/artwork/huberman-lab.jpg?width=600&height=600&quality=95",
      "artwork_thumbnail_url": "https://img.rephonic.com/artwork/huberman-lab.jpg?width=70&height=70&quality=95",
      "active": true,
      "sponsors": {
        "accepted": false
      },
      "guests": {
        "accepted": true
      }
    }
  }
}
```

## Objects

Objects that the fields above refer to by name.

### YoutubeVideo Object

- `id` (string): The YouTube video ID.
- `title` (string): The video's title.
- `num_views` (integer or null): How many times the video has been viewed. Always `null` in [episode transcript](https://rephonic.com/developers/docs/1.1/episode-transcript.md).
- `duration` (integer or null): How long the video is, in seconds.
- `thumbnail_url` (string): The video's thumbnail image.
- `url` (string): The video on YouTube.
- `episode` (EpisodeBase object or null): The episode the video matches. In a podcast's `youtube.playlist.videos` this is set. On the episode endpoints it is always `null`, since you already have the episode.

### PodcastSummary Object

The short version of a podcast that appears inside other results. Pass its `id` to [get a podcast](https://rephonic.com/developers/docs/1.1/get-podcast.md) for the rest.

- `id` (string): The podcast's Rephonic ID.
- `name` (string): The podcast's name.
- `itunes_id` (integer): The podcast's Apple Podcasts ID.
- `publisher` (object)
  - `id` (string): The publisher's Rephonic ID.
  - `name` (string): The publisher's name.
- `genres` (array of strings): The Apple Podcasts categories the show is in, main category first.
- `artwork_url` (string): The cover art, 600 by 600 pixels.
- `artwork_thumbnail_url` (string): The cover art, 70 by 70 pixels.
- `active` (boolean or null): Whether the show published an episode in the last 60 days.
- `sponsors` (object)
  - `accepted` (boolean or null): Whether the show takes sponsors. It's `null` when we haven't analysed the show yet.
- `guests` (object)
  - `accepted` (boolean or null): Whether the show is likely to take guests. It's `null` when we haven't analysed the show yet.
- `weekly_downloads` (integer or null, sometimes absent): Our estimate of listeners per week. See `downloads_per_episode`. Left out of transcript results.
- `downloads_per_episode` (integer or null, sometimes absent): Our estimate of listeners per episode, based on public data. It doesn't include YouTube views. It's `null` when we don't have a reliable estimate, which is usual for shows that aren't active. Left out of transcript results.

### EpisodeBase Object

The episode a YouTube video matches. Its `notes`, `summary` and `political_leaning` are always `null`, and `type`, `evergreen` and `branded` are `null` until we analyse the episode.

- `id` (string): The episode's Rephonic ID.
- `title` (string): The episode's title.
- `published` (timestamp): When the episode was published.
- `audio_url` (string or null): The audio file, or `null` when Apple Podcasts hosts the audio, in which case use `itunes_id`.
- `guid` (string or null): The episode's GUID from the RSS feed.
- `itunes_id` (integer or null): The episode's Apple Podcasts ID.
- `duration` (integer or null): How long the episode is, in seconds.
- `transcribed` (boolean): Whether we have a transcript. Get it from [episode transcript](https://rephonic.com/developers/docs/1.1/episode-transcript.md).
- `type` (string or null): The episode's format. Values: `monologue`, `discussion`, `interview`, `storytelling`, `scripted`, `news`, `review`, `educational`, `journalism`, `documentary`, `q_and_a`.
- `evergreen` (boolean or null): Whether the episode is evergreen, meaning its content won't go out of date.
- `branded` (boolean or null): Whether the episode is made to promote a company or organisation.
- `popularity` (number or null): How popular the episode is in Apple Podcasts, from 0 to 1. Only compare it between episodes of the same show. It's `null` for shows without enough ratings or episodes for Apple to rank them.
- `political_leaning` (object or null): The episode's political leaning, or `null` when it isn't political.
  - `name` (string): The leaning. Values: `left`, `center_left`, `center`, `center_right`, `right`.
  - `explanation` (string or null): Why we think so.
- `summary` (string or null): Our short summary of the episode, or `null` until we've analysed it.
- `notes` (string or null): The show notes from the RSS feed, as plain text.
