Searching for a YouTube video

In this section, we will learn about integrating a YouTube-related search video. YouTube Data API Version 3.0 is the new API to access YouTube data. It requires the API key that has been created in the previous section.

The main steps that we have to follow to do a YouTube search are:

  1. After adding the YouTube Search button, click on it to trigger the search process.
  2. The script reads the data-booktitle attribute to get the title. This will serve as a keyword for the search. Check the following screenshot for the HTML markup showing the data-booktitle attribute:
    Searching for a YouTube video
  3. Then, it creates an AJAX request to make an asynchronous call ...

Get Developing Responsive Web Applications with AJAX and jQuery now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.