IMPORTANT: If you want your API key to be encrypted please remember to use the HTTPS protocol!
Transcripts API Methods
Transcripts retrieved over the API are built from a core time-synchronized document. You can specify a number of parameters in your request to tailor the output to your needs.
Get Transcript for File
[GET] http://static.3playmedia.com/files/:file_id/transcript.:format?apikey=:api_key
Get Transcript for File by Video ID
[GET] http://static.3playmedia.com/files/:video_id/transcript.:format?apikey=:api_key&usevideoid=1
Available Formats: json, js, html, txt, doc
Display Alterations
Sometimes you may want to grab a simple text format that will look good on your web page. However, new lines will not render as breaks in HTML. In this case, you may want to use the pre option on download. For example, when downloading a .txt version of a transcript:
[GET] http://static.3playmedia.com/files/:id/transcript.txt?apikey=:api_key
Will render on a Web page as:
This is the first paragraph. This is the second paragraph.
[GET] http://static.3playmedia.com/files/:id/transcript.txt?apikey=:api_key&pre=1
Will render on a Web page as:
This is the first paragraph.
This is the second paragraph.
Downloading Transcripts
Note: To download a file as {filename}.{format}, you can append &download=1 to the api query. If you are automating this job, you should allow your query to read the file headers. For example with wget:
wget -S --content-disposition=on "http://static.3playmedia.com/files/:id/transcript.:format?apikey=:api_key&download=1"
Get Transcripts by threeplay_transcript_id
This is useful for getting transcripts for translations or captions imports.
[GET] api.3playmedia.com/files/:file_id/transcript.txt?apikey=:api_key&threeplay_transcript_id=:threeplay_transcript_id
API Specification for transcripts
Title | List transcripts for a media file |
URL | api.3playmedia.com/files/:file_id/transcripts |
Method | GET |
Paramaters |
api_key: Your API group's key to authenticate access usevideoid [OPTIONAL]: a value of 1 indicates that :file_id will be interpreted as a video id (e.g. as stored on a partner video platform) instead of a 3Play Media file id. |
Success response |
Code: 200 Content: [{id: 123, media_file_id: 100, language_id: 1, language_name: "English", type: "TranscribedTranscript"}, {id: 124, media_file_id: 100, language_id: 13, language_name: "Spanish", type: "TranslatedTranscript"}] |
Error response |
Code: 200 Content: {iserror: true, errors: {not_found: "The requested resource was not found"}} |
Title | Show details for a specified transcript |
URL | api.3playmedia.com/files/:file_id/transcripts/:transcript_id |
Method | GET |
Parameters |
api_key: Your API group's key to authenticate access format_id: id of the 3Play Media output format desired (e.g. 16 for plain text transcript) usevideoid [OPTIONAL]: a value of 1 indicates that :file_id will be interpreted as a video id (e.g. as stored on a partner video platform) instead of a 3Play Media file id. |
Success response |
Code: 200 Content: The transcript in the requested format |
Error response |
Code: 200 Content: {iserror: true, errors: {not_found: "The requested resource was not found"}} OR one of the following error messages: - No output format was specified - Format #{id} is not an available format |
1 Comments