Examples

1st example search with keywords

7 HOUR 4K DRONE FILM: "EARTH FROM ABOVE& ..
7 HOUR 4K DRONE FILM: "EARTH FROM ABOVE& ..
3 HOURS OF AMAZING NATURE SCENERY & RELAX ..
3 HOURS OF AMAZING NATURE SCENERY & RELAX ..
HD 1080P - NATURE SCENERY VIDEO
HD 1080P - NATURE SCENERY VIDEO
COSTA RICA IN 4K 60FPS HDR (ULTRA HD)
COSTA RICA IN 4K 60FPS HDR (ULTRA HD)
NORWAY AMAZING BEAUTIFUL NATURE WITH RELAXING ..
NORWAY AMAZING BEAUTIFUL NATURE WITH RELAXING ..
SCOTLAND IN 4K ULTRA HD HDR - MOTHER OF NATUR ..
SCOTLAND IN 4K ULTRA HD HDR - MOTHER OF NATUR ..
BREATHTAKING COLORS OF NATURE IN 4K III 🐦BEAU ..
BREATHTAKING COLORS OF NATURE IN 4K III 🐦BEAU ..
4K VIDEO (ULTRA HD) UNBELIEVABLE BEAUTY
4K VIDEO (ULTRA HD) UNBELIEVABLE BEAUTY
THE BREATHTAKING BEAUTY OF NATURE | HD
THE BREATHTAKING BEAUTY OF NATURE | HD
SWITZERLAND 4K VIDEO ULTRA HD - IMPRESSIVE NA ..
SWITZERLAND 4K VIDEO ULTRA HD - IMPRESSIVE NA ..
► PLANET EARTH: AMAZING NATURE SCENERY.
► PLANET EARTH: AMAZING NATURE SCENERY.
4K AFRICAN WILDLIFE | AFRICAN NATURE SHOWREEL ..
4K AFRICAN WILDLIFE | AFRICAN NATURE SHOWREEL ..
4K FOREST STREAM - RELAXING RIVER SOUNDS - NO ..
4K FOREST STREAM - RELAXING RIVER SOUNDS - NO ..
AMAZING NATURE INCREDIBLE CROATIA - 4K NATURE ..
AMAZING NATURE INCREDIBLE CROATIA - 4K NATURE ..
4K RELAXING RIVER - ULTRA HD NATURE VIDEO -   ..
4K RELAXING RIVER - ULTRA HD NATURE VIDEO - ..
ULTIMATE WILD ANIMALS COLLECTION IN 8K ULTRA  ..
ULTIMATE WILD ANIMALS COLLECTION IN 8K ULTRA ..
BREATHTAKING NATURE SCENERY ON PLANET EARTH & ..
BREATHTAKING NATURE SCENERY ON PLANET EARTH & ..
NATURE'S DEADLIEST PREDATORS IN THE WORLD ..
NATURE'S DEADLIEST PREDATORS IN THE WORLD ..
AMAZING NATURE FULL HD 1080P :TIME LAPSE
AMAZING NATURE FULL HD 1080P :TIME LAPSE
NORWAY 4K - AMAZING BEAUTIFUL NATURE SCENERY  ..
NORWAY 4K - AMAZING BEAUTIFUL NATURE SCENERY ..
AUTUMN RIVER SOUNDS -  RELAXING NATURE VIDEO  ..
AUTUMN RIVER SOUNDS - RELAXING NATURE VIDEO ..
SCOTLAND 4K VIDEO (ULTRA HD) - AMAZING BEAUTI ..
SCOTLAND 4K VIDEO (ULTRA HD) - AMAZING BEAUTI ..
8K VIDEO (ULTRAHD) THE BEAUTY OF PLANET EARTH ..
8K VIDEO (ULTRAHD) THE BEAUTY OF PLANET EARTH ..
8K COLORFUL WILDLIFE ANIMALS COLLECTION IN 8K ..
8K COLORFUL WILDLIFE ANIMALS COLLECTION IN 8K ..
BEST RELAXING FILM 4K ULTRA HD NATURE SCENERY ..
BEST RELAXING FILM 4K ULTRA HD NATURE SCENERY ..
4K VIDEO (ULTRA HD) : UNBELIEVABLE BEAUTY - R ..
4K VIDEO (ULTRA HD) : UNBELIEVABLE BEAUTY - R ..
A JOURNEY AROUND THE EARTH IN 8K ULTRA HD / N ..
A JOURNEY AROUND THE EARTH IN 8K ULTRA HD / N ..
EXCEPTIONAL ANIMALS COLLECTION IN 8K ULTRA HD ..
EXCEPTIONAL ANIMALS COLLECTION IN 8K ULTRA HD ..
4K VIDEO (ULTRA HD) : UNBELIEVABLE BEAUTY - R ..
4K VIDEO (ULTRA HD) : UNBELIEVABLE BEAUTY - R ..
4K VIDEO (ULTRA HD) : UNBELIEVABLE BEAUTY - R ..
4K VIDEO (ULTRA HD) : UNBELIEVABLE BEAUTY - R ..
NORWAY 4K VIDEO ULTRA HD - NATURE HEALING FIL ..
NORWAY 4K VIDEO ULTRA HD - NATURE HEALING FIL ..
THE BEAUTY OF BRAZIL IN 4K 60FPS HDR (ULTRA H ..
THE BEAUTY OF BRAZIL IN 4K 60FPS HDR (ULTRA H ..
RELAXING MUSIC WITH NATURE SOUNDS - WATERFALL ..
RELAXING MUSIC WITH NATURE SOUNDS - WATERFALL ..
4K SPRING FOREST - BLACKBIRD SONG - BIRD SING ..
4K SPRING FOREST - BLACKBIRD SONG - BIRD SING ..
4K TROPICAL BEACH - RELAXING SEA/ OCEAN WAVE  ..
4K TROPICAL BEACH - RELAXING SEA/ OCEAN WAVE ..
DEATH VALLEY NATIONAL PARK - 4K (ULTRA HD) NA ..
DEATH VALLEY NATIONAL PARK - 4K (ULTRA HD) NA ..
NATIONAL GEOGRAPHIC WILD THAILAND - NAT GEO W ..
NATIONAL GEOGRAPHIC WILD THAILAND - NAT GEO W ..
THE BEAUTY OF CUBA IN 4K 60FPS HDR (ULTRA HD) ..
THE BEAUTY OF CUBA IN 4K 60FPS HDR (ULTRA HD) ..
BEAUTIFUL NATURE VIDEO IN 4K (ULTRA HD) - AUT ..
BEAUTIFUL NATURE VIDEO IN 4K (ULTRA HD) - AUT ..
RELAXING RIVER SOUNDS - PEACEFUL FOREST RIVER ..
RELAXING RIVER SOUNDS - PEACEFUL FOREST RIVER ..
8K AMAZING ANIMALS COLLECTION 8K ULTRA HD • R ..
8K AMAZING ANIMALS COLLECTION 8K ULTRA HD • R ..
NAT GEO WILD ISLANDS CYPRUS HD NATURE HISTORY ..
NAT GEO WILD ISLANDS CYPRUS HD NATURE HISTORY ..
8K VIDEO ULTRA HD HDR - NATURE IS THE ART OF  ..
8K VIDEO ULTRA HD HDR - NATURE IS THE ART OF ..
SLOVENIA IN 4K 60FPS HDR (ULTRA HD) || NATURE ..
SLOVENIA IN 4K 60FPS HDR (ULTRA HD) || NATURE ..
WATERFALL PARADISE: PLITVICE LAKES, CROATIA H ..
WATERFALL PARADISE: PLITVICE LAKES, CROATIA H ..
STOCK FOOTAGE NO COPYRIGHT FULL HD-NATURE-WAT ..
STOCK FOOTAGE NO COPYRIGHT FULL HD-NATURE-WAT ..
BEAUTIFUL LANDSCAPES 4K ULTRAHD SLIDESHOW 201 ..
BEAUTIFUL LANDSCAPES 4K ULTRAHD SLIDESHOW 201 ..
"THE SOOTHING SUN" SUNRISES & S ..
"THE SOOTHING SUN" SUNRISES & S ..
HD: GRIZZLY BEARS CATCHING SALMON - NATURE ..
HD: GRIZZLY BEARS CATCHING SALMON - NATURE ..
TCL HD DEMO: COLORFUL BEAUTY OF NATURE
TCL HD DEMO: COLORFUL BEAUTY OF NATURE

2nd example username, in this case rpoland

SIMONE GAGLIARDI - L'HISTOIRE DU GITAN II MOVIMENT ..
SIMONE GAGLIARDI - L'HISTOIRE DU GITAN II MOVIMENT ..
SIMONE GAGLIARDI - L'HISTOIRE DU GITAN I MOVIMENTO ..
SIMONE GAGLIARDI - L'HISTOIRE DU GITAN I MOVIMENTO ..
DUSTIN FURLOW - AIRBORNE (OFFICIAL)
DUSTIN FURLOW - AIRBORNE (OFFICIAL)
SAMMY BOLLER - RITUAL LIGHTS (OFFICIAL)
SAMMY BOLLER - RITUAL LIGHTS (OFFICIAL)
ROBOT ROCK (DAFT PUNK ) - STEFANO BARONE (LIVE)
ROBOT ROCK (DAFT PUNK ) - STEFANO BARONE (LIVE)
BEN FLANDERS - PARADOX (OFFICIAL)
BEN FLANDERS - PARADOX (OFFICIAL)
SöNKE MEINEN & TREVOR GORDON HALL - DAWN SONG
SöNKE MEINEN & TREVOR GORDON HALL - DAWN SONG
MATTHEW O'DELL - SECRETS OF THE HEART
MATTHEW O'DELL - SECRETS OF THE HEART
KATGRüVS - TAKE ME HOME TONIGHT (EDDIE MONEY)
KATGRüVS - TAKE ME HOME TONIGHT (EDDIE MONEY)
BLUE SMOKE - GARETH PEARSON
BLUE SMOKE - GARETH PEARSON
R.D. KING (LIVE) - (CANDYRAT CONCERT)
R.D. KING (LIVE) - (CANDYRAT CONCERT)
ANTOINE DUFOUR - MOTHER
ANTOINE DUFOUR - MOTHER
ADRIAN BELLUE (LIVE) - (CANDYRAT CONCERT)
ADRIAN BELLUE (LIVE) - (CANDYRAT CONCERT)
BEN FLANDERS - SHADOWS
BEN FLANDERS - SHADOWS
CHRIS MIKE - YOU (LIVE AT HOME)
CHRIS MIKE - YOU (LIVE AT HOME)
ALEX ANDERSON - RESTLESS DREAMS
ALEX ANDERSON - RESTLESS DREAMS
MICHAEL KOBRIN - WAVES (OFFICIAL VIDEO)
MICHAEL KOBRIN - WAVES (OFFICIAL VIDEO)
GALIA SOCIAL - FOLLOW
GALIA SOCIAL - FOLLOW
TREVOR GORDON HALL - MORNING SIDEWALK 3.0 (KALIMBA ..
TREVOR GORDON HALL - MORNING SIDEWALK 3.0 (KALIMBA ..
ANTOINE DUFOUR - SPIRITUAL BATTLEFIELD GROOVE FT.  ..
ANTOINE DUFOUR - SPIRITUAL BATTLEFIELD GROOVE FT. ..
BEN FLANDERS - SLAPPER
BEN FLANDERS - SLAPPER
MYSTERY CIRCUS - 김화종(HWAJONG KIM)
MYSTERY CIRCUS - 김화종(HWAJONG KIM)
DUSTIN FURLOW - ANDY'S GIFT
DUSTIN FURLOW - ANDY'S GIFT
HOTEL CALIFORNIA - EAGLES | PROG METAL GUITAR COVE ..
HOTEL CALIFORNIA - EAGLES | PROG METAL GUITAR COVE ..
ANTOINE DUFOUR - ECLIPSE CLOCK WAR MACHINE
ANTOINE DUFOUR - ECLIPSE CLOCK WAR MACHINE
R.D. KING (LIVE) - (CANDYRAT CONCERT)
R.D. KING (LIVE) - (CANDYRAT CONCERT)
LORENZO POLIDORI - CAROUSEL
LORENZO POLIDORI - CAROUSEL
JEFF GUNN - WONDER
JEFF GUNN - WONDER
DON ROSS (LIVE) - (CANDYRAT HOLIDAY CONCERT)
DON ROSS (LIVE) - (CANDYRAT HOLIDAY CONCERT)
DON ROSS (LIVE) - (CANDYRAT HOLIDAY CONCERT)
DON ROSS (LIVE) - (CANDYRAT HOLIDAY CONCERT)
ANTOINE DUFOUR - TRIAD
ANTOINE DUFOUR - TRIAD
RYAN AYERS - FOLDS (LIVE IN STUDIO)
RYAN AYERS - FOLDS (LIVE IN STUDIO)
BEN FLANDERS - TILTED
BEN FLANDERS - TILTED
DUSTIN FURLOW - REMEMBRANCE
DUSTIN FURLOW - REMEMBRANCE
SAMMY BOLLER - PATH OF THE HEART (OFFICIAL)
SAMMY BOLLER - PATH OF THE HEART (OFFICIAL)
ANTOINE DUFOUR - EN T'ATTENDANT
ANTOINE DUFOUR - EN T'ATTENDANT
SAMMY BOLLER - THE EMPRESS | FRIEDMAN AMPS PLAYTHR ..
SAMMY BOLLER - THE EMPRESS | FRIEDMAN AMPS PLAYTHR ..
NICK JOHNSON - PARTY GOBLIN (OFFICIAL VIDEO)
NICK JOHNSON - PARTY GOBLIN (OFFICIAL VIDEO)
CHRIS MIKE - LIMERENCE (LIVE 4K)
CHRIS MIKE - LIMERENCE (LIVE 4K)
JACOB RAAGAARD - ELEANOR RIGBY (THE BEATLES)
JACOB RAAGAARD - ELEANOR RIGBY (THE BEATLES)
CHRIS MIKE - “SOCIALHOLIC” IS OUT NOW!
CHRIS MIKE - “SOCIALHOLIC” IS OUT NOW!
R.D. KING (LIVE) - CANDYRAT CONCERT
R.D. KING (LIVE) - CANDYRAT CONCERT
DANIEL PADIM - FLYING WITH WHITE WINGS
DANIEL PADIM - FLYING WITH WHITE WINGS
DONOVAN RAITT - HEROES AND FRIENDS (SOLO GUITAR)
DONOVAN RAITT - HEROES AND FRIENDS (SOLO GUITAR)
ANTOINE DUFOUR - REFLECT (PRE-ORDER)
ANTOINE DUFOUR - REFLECT (PRE-ORDER)
JONATHAN TRY FT. KIN YIU - EDGE OF DESIRE (JOHN MA ..
JONATHAN TRY FT. KIN YIU - EDGE OF DESIRE (JOHN MA ..
CALUM GRAHAM (LIVE) - CANDYRAT CONCERT
CALUM GRAHAM (LIVE) - CANDYRAT CONCERT
R.D. KING - THE DYING OF THE LIGHT (ACOUSTIC GUITA ..
R.D. KING - THE DYING OF THE LIGHT (ACOUSTIC GUITA ..
ADRIAN BELLUE (LIVE) - CANDYRAT CONCERTS
ADRIAN BELLUE (LIVE) - CANDYRAT CONCERTS
CHRIS MIKE - LIMERENCE - OFFICIAL VIDEO
CHRIS MIKE - LIMERENCE - OFFICIAL VIDEO

Code and options

include_once('class/class.youtubelist.php');
//First set the type, keywords, username, channel or playlist
$video = new youtubelist('keywords');
//Default set_keywords, set_username, set_channel or set_playlist (in this example set_keywords)
$video->set_keywords('HD nature');
// -- Here your youtube API key
$video->set_api('Here your youtube API key');
//Max results
$video->set_max(50);
// --set sorting order: relevance, date , rating , title , videoCount , viewCount or none; default: relevance
// --At this moment sorting seems only to work with a search
$video->set_order('relevance');
//--Cache the feed
$video->set_cachexml(true);
// --How long must the cach been saved (in seconds)
$video->set_cachelife(86400);
// --Set where to store xml files
$video->set_xmlpath('./cache/');
// --Set safesearch possible: none, moderate, strict; default: strict
$video->set_safeSearch('none');
// --OPTIONAL - Set lang; codes can be found here http://www.loc.gov/standards/iso639-2/php/code_list.php row ISO 639-1 Code
// --If not set all languages will appear in the results
$video->set_lang('EN');
// --OPTIONAL - Search only 3d. Set to any, 2d or 3d.
$video->set_3d('3d');
// --OPTIONAL - Search HD. any, high or standard.
$video->set_hd('high');
// --OPTIONAL - Search for license. possible: cc, youtube. Only used for the search option or don't set.
$video->set_license('youtube');
// --OPTIONAL - Search for duration. possible: any, short, medium, long. Only used for the search option or don't set.v $video->set_duration('long');
// --OPTIONAL - Set length title and description text
$video->set_descriptionlength(300);
// --OPTIONAL - Make the description first character uppercase and the rest lowercase - default is true
$video->set_descriptioncap (true);
$video->set_titlelength(45);
// --OPTIONAL - Set the title all character's uppercase - default is true
$video->set_titlecap (true);
// --OPTIONAL - Set debug true to show the url request (only in case of errors) - default is false
$video->set_debug (false);

Resctrictions

maximum 50 movies (youtube restriction)

API key youtube

  1. Create a Google Account

    If you do not already have a Google account, create one now as you'll be needing it.

  2. Create a new Google Project

    Go to your Google Console. Click on Projects in the upper-left, then Create Project and enter a project name & ID.

  3. Enable YouTube Data API V3

    Click on the project you have created if it hasn't already opened after creating. Then go to APIs & auth on the left. In the next screen, click on YouTube Data API V3. Enable the API by toggling the OFF button to ON.

  4. Get API Key

    Once you have enabled the API, click on Quota on the top. You can then click on API Access on the top left and create a new Browser Key. This key can be linked to a domain for security measures, but it is not obligated. Once you've created the key (it should look something like this: AIzaSyDmk3oxVjtu06AWRv60ADPvcYO9tvswzm8), copy it and use it as 'YouTube Data V3 API Key' option.