How can i get the youtube video summary in pipe dream using http request

how can i get the youtube video summary in pipe dream using http request

Hi @kadalikarchandra65,

First off, welcome to Pipedream!

To get the YouTube video summary using an HTTP request in Pipedream, you’ll need to use the YouTube Data API. First, you’ll need an API key from the Google Developer Console. Once you have the API key, you can create a Pipedream workflow with a code step to make the API request.
Here’s an example Pipedream component that makes a request to the YouTube Data API to get video details:

import { axios } from "@pipedream/platform";

export default defineComponent({
  props: {
    apiKey: {
      type: "string",
      label: "API Key",
    },
    videoId: {
      type: "string",
      label: "Video ID",
    },
  },
  async run({ steps, $ }) {
    const url = `https://www.googleapis.com/youtube/v3/videos?part=snippet&id=${this.videoId}&key=${this.apiKey}`;
    const response = await axios($, {
      method: "GET",
      url: url,
    });
    return response.items[0].snippet;
  },
});

Replace apiKey and videoId with your YouTube Data API key and the video ID you want to get the summary for. The component will return the video summary in the snippet property.


This answer is generated from Pipedream @pi bot on Slack. Kindly access Pipedream Users Slack > #help channel to ask it any question

Hello, @vunguyenhung.

First and foremost, thank you for your response. I added the trigger event youtube data api and then it asked me to select the source, as shown in this screenshot: Screenshot by Lightshot

Hi @kadalikarchandra65,

I would suggest you to watch through this Pipedream University series to understand how Pipedream works