5 Steps on How to Get Youtube Video Data in JSON Format

To get your YouTube video data such as link, title in JSON format, here are the steps to follow

  1. Go to RSS-to-JSON Online converter

  2. Go to your YouTube channel and grab your channel ID

    To grab your ID you need to go to your YouTube channel and on the URL of your YouTube page, you will see some code after the https://www.youtube.com/channel/which in my case is UCm814ttdg5c0GvOrRCUE3z8gthatโ€™s your channel ID.

    For example: https://www.youtube.com/channel/UCm814ttdg5c0GvOrRCUE3z8g

  3. After grabbing your channelโ€™s ID, you need to replace the bolded ID in the YouTube feeds link below

https://www.youtube.com/feeds/videos.xml?channel_id=UCm814Any5c0GvOrRCUE3z8g

After replacing the ID in the YouTube feeds link with your own ID, copy the whole link and go back to the RSS-to-JSON website.

  1. Paste the code in the box and click on convert to JSON. It will reload, and you will see your YouTube video data in JSON format.

rss to json

  1. If you want the link of the JSON format instead of copying the JSON data from the website, below the convert to JSON box you will see โ€œAPI call: โ€œ

rss to json api call

Copy the link after the colon, that it is a link that will automatically update itself when you upload new video.

<https://api.rss2json.com/v1/api.json?rss_url=https%3A%2F%2Fwww.youtube.com%2Ffeeds%2Fvideos.xml%3Fchannel_id%3DUCm814Any5c0GvOrRCUE3z8g>

That the link of your YouTube video in JSON format.

Let say you are using HUGO (a static site generator) to get the json data from the url, all you need to do is use the getJSON command in Hugo.

{{ getJSON  "https://api.rss2json.com/v1/api.json?rss_url=https%3A%2F%2Fwww.youtube.com%2Ffeeds%2Fvideos.xml%3Fchannel_id%3DUCm814Any5c0GvOrRCUE3z8g"}}