Skip to content
Software capabilities
AssemblyAI

How to retrieve an AssemblyAI transcript

Retrieve a pre-recorded AssemblyAI transcript by ID using the REST API or Python SDK. Check status before using the transcript text.

Documentation reviewed · 2 methods with sources

Ways to do it

  1. API: GET /v2/transcript/{transcript_id}
  2. SDK: aai.Transcript.get_by_id()
API

GET /v2/transcript/{transcript_id}

Retrieve status, text, and errors.

Read source: AssemblyAI get transcript API
Requirements
AssemblyAI API key and transcript ID.
Limitations
Polling is limited to 60 requests/minute per API key and transcript ID.

Example shell

curl --fail https://api.assemblyai.com/v2/transcript/$ASSEMBLYAI_TRANSCRIPT_ID -H "Authorization: $ASSEMBLYAI_API_KEY"
SDK

aai.Transcript.get_by_id()

Fetch an existing transcript in Python and inspect its text and status.

Read source: AssemblyAI Python SDK transcript retrieval
Requirements
The assemblyai Python package, an AssemblyAI API key, and a transcript ID accessible with that key.
Limitations
Text is available after the transcript reaches completed status. Inspect the error field if status is error.

Example text

import os
import assemblyai as aai

aai.settings.api_key = os.environ["ASSEMBLYAI_API_KEY"]
transcript = aai.Transcript.get_by_id(os.environ["ASSEMBLYAI_TRANSCRIPT_ID"])
print(transcript.status)