Reactjs Application with YouTube Video API JSON Data

Reactjs Application with YouTube Video API JSON Data

Hello my friends, welcome back to my blog. Today in this blog post, I am going to show you, Reactjs Application with YouTube Video API JSON Data.

Reactjs Yotube Video API

For react js new comers, please check the below link:
React js Basic Tutorials

Friends now I proceed onwards and here is the working code snippet for Reactjs Application with YouTube Video API JSON Data and please use this carefully to avoid the mistakes:

1. Firstly friends we need fresh reactjs setup and for that we need to run below commands into our terminal and also w should have latest node version installed on our system:

Guys you can skip this first step if you already have reactjs fresh setup:

npx create-react-app reactdata

cd reactdata

npm install axios --save

npm install bootstrap --save

npm start // run the project


2. Finally friends we need to add below code into our src/App.js file to get final output on web browser:

import React from 'react';
import axios from 'axios';
//Bootstrap library
import 'bootstrap/dist/css/bootstrap.min.css';
class Home extends React.Component {
  constructor(props) {
      this.state = {
        data: []
        //Get all youtube videos details in bootstrap table
        axios.get('').then(res => 
        //Storing users detail in state array object
        render() {
        return (
          <div className="maincontainer">
            <div className="container mb-5 mt-5 text-left">
            <hr />
            <table className="table table-hover table-bordered">



              { => {
                return (

                      <td><img src={result.thumbnail} /></td>
                      <td><a target="_blank" href={"" + result.videoId}>{result.title}</a></td>


    export default Home;


Now we are done friends also and If you have any kind of query or suggestion or any requirement then feel free to comment below.

Note: Friends, I just tell the basic setup and things, you can change the code according to your requirements. For better understanding must watch video above.

Here is the site from where I use json fake data to show into my applications:

I will appreciate that if you will tell your views for this post. Nothing matters if your views will be good or bad.



Ajay Malhotra
the authorAjay Malhotra
Hello to all. Welcome to Myself Ajay Malhotra and I am freelance full stack developer. I love coding. I know Wordpress, Core php, Angularjs, Angular 2, Angular 6, Angular 7, Angular 8, Angular 9, Angular 10, Angular 11, Nodejs, laravel, Codeigniter, Shopify, Squarespace, Jquery, Google Map Api, Vuejs, Reactjs, Bigcommerce etc.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.