We rebuilt our website from scratch and are still updating some extensions and pages. Having a problem? Sign in and open a support ticket or contact us.
JoomBoost

YouTube Data API

Easy Youtube Videos gets the videos from the YouTube Data API v3, Google's service for reading YouTube data. It needs an API key. The key is free; Google gives each project a daily quota of requests.

Create an API key

  1. Go to https://console.cloud.google.com/ and sign in with a Google account.
  2. Create a project, or pick an existing one, in the project list at the top.
  3. Open APIs & Services > Library, search for YouTube Data API v3, open it and click Enable.
  4. Open APIs & Services > Credentials, click Create credentials and choose API key.
  5. Copy the key and paste it in Api Key on the Module tab of your module.

Restrict the key

Restrict the key so that nobody else can use your quota. On the key's page in Credentials:

  • Under API restrictions, choose Restrict key and select only YouTube Data API v3.
  • Under Application restrictions, choose IP addresses and enter the IP address of your web server, or choose None.

Do not use Websites (HTTP referrers). The module calls YouTube from your server, not from the visitor's browser, and does not send your site's address. A key restricted to websites gets the error "Requests from referer ... are blocked."

What the module asks for

Each time the module is built, your server sends:

Source Requests
Playlist one list request
Channel or user one request to find the channel, one list request
Keyword search one search request
Standard list one list request

Then one more request for each video, to get its duration, category and views. A click on Load More sends the same requests for the next page.

Quota

Google gives each project 10,000 quota units per day by default. A list request or a video request costs 1 unit. A search request costs 100 units. With Max Videos at 6:

  • a playlist module uses about 7 units each time it is built;
  • a search module uses about 106 units each time it is built, so the daily quota runs out after about 90 page views.

To use less quota, turn on Joomla caching for the module. Set Caching to Use Global on the Advanced tab, and turn caching on in System > Global Configuration > System > Cache. With a Cache Time of 900 seconds, the module asks YouTube at most once every 15 minutes for each page. See Load More about the button with caching.

You can see your quota use in the Google Cloud console under APIs & Services > YouTube Data API v3 > Quotas.

Errors from YouTube

When YouTube answers with an error, the module shows a red box "Easy Youtube Videos not working" on the page, with YouTube's error code and message. Visitors see it too. See Troubleshooting for the common messages.

Privacy

The API requests go from your server to Google and carry no visitor data. The popup player loads from www.youtube.com in the visitor's browser when a video is opened, and YouTube's own privacy terms apply to it.

All Extensions