Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Migrate Youtube

Security covered Under active development 1 sites

This module allows you to migrate YouTube videos and playlists into your Drupal site. It provides source plugins that use your YouTube API key to fetch video data, including optional details like duration.

Migrate Youtube

INTRODUCTION

This module provides a set of two migrate source plugin to migrate Youtube videos and playlists.

REQUIREMENTS

This module requires the following module:

* Migrate - https://www.drupal.org/project/migrate
* Migrate Plus - https://www.drupal.org/project/migrate_plus

RECOMMENDED MODULES

* Migrate Tools - https://www.drupal.org/project/migrate_tools

CONFIGURATION

1. In your local settings.php file, add your Youtube API key as follow:

    $settings['youtube_api_key'] = 'your-own-1234567-API-KEY-here';

Migrating videos

Use the 'migrate_youtube_api_playlist_items' source plugin to retrieve videos,
you can pass any Youtube playlist ID as migrate source.

    source:
      plugin: migrate_youtube_api_playlist_items
      playlist_id: youtube-account-playlist-id

Every youtube account has a main playlist containing all its videos (https://developers.google.com/youtube/v3/docs).

Because of API calls limitations with your key, this source tries to be as
efficient as possible.
Additional calls are needed to retrieve video duration, if needed, set the
contentDetails key to true

    source:
      plugin: migrate_youtube_api_playlist_items
      playlist_id: whatever-playlist-id-here
      contentDetails: true

Then add the duration to your destination as follow

    process:
      ...
      field_duration: duration

See the provided example in migration_examples/youtube_video_to_media.yml

Playlist migration is also available.
Learn more about this module's (source fields, maintenance) in its README.md file.

Drupal 10–11

Ask your assistant about Migrate Youtube

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • migrate Drupal core
  • migrate_plus Drupal core >=6.0.7

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
6
Tracked since
May 2023
Latest release
7 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
2.0.0 Stable 10–11 Apr 2, 2026
1.0.3 Stable 9–10 Apr 2, 2026
1.0.2 Stable 9–10 Aug 14, 2023
1.0.1 Stable 9–10 May 19, 2023
1.0.0 Stable 9–10 May 19, 2023
1.0.x-dev Dev 9–10 May 19, 2023