A gem for interfacing with the shutterstock API. See the documentation for more info


Add this line to your application's Gemfile:

gem 'shutterstock'

And then execute:

$ bundle

Or install it yourself as:

$ gem install shutterstock


Add your config settings to an initializer, such as config/initializers/shutterstock.rb

Shutterstock.configure do |config|
  config.api_username = 'xxx'
  config.api_key = 'xxx'
  config.username = 'xxx'
  config.password = 'xxx' = '[email protected]'

Currently this gem only supports searching for images and downloading/purchasing images.

Search usage:

client =
trees ='tree')

Download/purchase usage:

client =
trees = client.subscriptions(subscription_id, image_id, size, format)

For size, you can use Shutterstock::API::Subscriptions::SIZE.small (medium, large, and vector are other options)

For format, you can use Shutterstock::API::Subscriptions::FORMAT.jpg (eps is the other option)

If there are additional query parameters you'd like to send to the API, send an optional hash paramater to the methods. For example:

options = {search_group: "photos"}
trees ='tree', options)


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request