Search youtube via this simple ruby api
Latest commit 2c5ecfe Jan 12, 2015 @grosser thx david!
Failed to load latest commit information.
lib v0.2.0 Jan 12, 2015
spec add method to retrieve information from a single video Oct 19, 2014
.travis.yml bump travis Jan 12, 2015
Gemfile actually need json Jun 20, 2014
Gemfile.lock v0.2.0 Jan 12, 2015
Rakefile bump Jun 20, 2014 thx david! Jan 12, 2015
youtube_search.gemspec license + thanks for the patch Jun 20, 2014

Search youtube via this simple ruby api

  • simple
  • no dependencies


gem install youtube_search

  "title"=>"Killer Whale Imitates Boat Motor",
  "content"=>"Top YouTube Videos on ...",
  "raw" => <REXML::Element ... >,
  "embeddable" => true,

or raw json with format: 'json'

page / per_page are supported'cats', :page => 10, :per_page => 4).first

and standard youtube options'cats', 'time' => 'this_week', 'orderby' => 'viewCount').first

I can haz iframe:

# DISCLAIMER this iframe may steal 4 minutes of your life ;)
id ='lolcats').first['video_id']
%{<iframe src="{id}" width=640 height=480 frameborder=0></iframe>}

Searching playlists


Retrieve videos by playlist ID

videos = YoutubeSearch.playlist_videos('5F23DAF4BFE3D14C')


  • more detailed xml parsing (you can fetch everything via 'raw', but more defaults would be nice)
  • parse dates into ruby objects



Michael Grosser
License: MIT Build Status