Skip to main content

Youtube Summary API

The Youtube Summary API can be used to summarize Youtube videos. This takes in a videoId and checks if there are subtitles available for the video. If there are subtitles available, it will summarize the subtitles. If there are no subtitles available, it will use convert speech to text and summarize the text.

Arguments

  • videoId: The videoId of the Youtube video
  • language: The language of the subtitles. If set to AUTO, it will default to english.

Language Codes

  • HINDI: hi,
  • VIETNAMESE: vi,
  • CHINESE_TRADITIONAL: zh-TW,
  • CHINESE_SIMPLIFIED: zh-CN,
  • RUSSIAN: ru,
  • JAPANESE: ja,
  • UKRAINIAN: uk,
  • ENGLISH: en,
  • SPANISH: es,
  • INDONESIAN: id,
  • KOREAN: ko,
  • POLISH: pl,
  • CZECH: cs,
  • FILIPINO: fil,
  • FRENCH: fr,
  • ITALIAN: it,
  • DANISH: da,
  • DUTCH: nl,
  • GERMAN: de,
  • TURKISH: tr,
  • ROMANIAN: ro,
  • THAI: th,
  • NORWEGIAN: no,
  • PORTUGUESE: pt,
  • BRAZILIAN_PORTUGUESE: pt,
  • HUNGARIAN: hu,

API Request Schema

In bash:

curl -X POST --location 'https://endpoints.getmerlin.in/services/summarize/youtube' \
--header 'Content-Type: application/json' \
--header 'x-merlin-key: <YOUR_MERLIN_API_KEY>' \
--data '{
"videoId": "<YOUTUBE_VIDEO_ID>",
"language": "AUTO"
}'

In Javascript:

const axios = require("axios");

(async () => {
const result = await axios.post(
"https://endpoints.getmerlin.in/services/summarize/youtube",
{
videoId: "<YOUTUBE_VIDEO_ID>",
language: "AUTO",
},
{
headers: {
"x-merlin-key": "<API_KEY>",
},
}
);

console.log(result.data);
})();

Response

200 Response:

{
"status": "success",
"data": {
"summary": [
{
"timeStamp": "6.96",
"explaination": [
"There are numerous options to choose from",
"This video compares and contrasts Hugo and Gatsby, covering their main features, pros and cons, and use cases"
],
"content": "Static site generators are potent tools"
},
{
"timeStamp": "73.68",
"explaination": [
"Both tools support the docs as code workflow",
"Sites created with these tools are very secure",
"There is no back end to hack",
"Both tools allow for quick deployment using automated pipelines",
"There are many free hosting options available on the web",
"Criteria to compare the tools: the programming language or framework used, the learning curve, the community and ecosystem, and speed"
],
"content": "Static websites and both tools are open source"
},
{
"timeStamp": "136.48",
"explaination": [
"Hugo uses the Go programming language.",
"Gatsby is a React application.",
"Consider the knowledge and learning curve of each generator.",
"Consider the ubiquity of JavaScript and popularity of React."
],
"content": "Choose a static site generator based on the programming language or framework."
},
{
"timeStamp": "195.84",
"explaination": [
"Gatsby benefits from the advantages of React and the wider JavaScript community.",
"Gatsby is built with plugins in mind, allowing you to benefit from the thousands of React libraries out there.",
"Gatsby is open source and backed by a team of paid professional developers, ensuring long term support.",
"Gatsby also uses GraphQL to fetch data."
],
"content": "Gatsby and Hugo are popular static site generators."
},
{
"timeStamp": "263.76",
"explaination": [
"You can get data from markdown files and content management systems like WordPress and even CSV files",
"Hugo is also open source with a vibrant community and templates available, but the community and developer pool are smaller compared to Gatsby",
"Speed refers to the speed of the website, which is more or less the same for both"
],
"content": "GraphQL is a more efficient way to make API calls"
},
{
"timeStamp": "321.68",
"explaination": [
"It can generate whole static sites in milliseconds",
"Build times are significantly faster than Gatsby"
],
"content": "Hugo is a fast static site generator"
},
{
"timeStamp": "383.36",
"explaination": [
"Gatsby is used by the PayPal developer and the Node.js Foundation website, and supports TypeScript",
"Hugo is used by the tech YouTuber Fireship, and is recommended for fast static sites with an easier learning curve"
],
"content": "Gatsby and Hugo are popular site generators"
},
{
"timeStamp": "444.40",
"explaination": [
"Tell us which tool you prefer.",
"We can help write and audit your technical documentation. Book a free consultation today."
],
"content": "Both 439.28 and 444.40 make tech documentation easier."
}
],
"title": "Static site generators like Hugo and Gatsby are lightweight, open-source tools that allow for fast, secure website deployment. They have unique programming languages and learning curves."
},
"usage": {
"used": 4182,
"limit": 10000,
"type": "b2b_employee"
}
}

400 Response:

{
"status": "error",
"error": {
"type": "UNKNOWN_ERROR",
"message": "Oopsie Daisy! Let’s pretend that never happened. Try again, maybe?"
}
}