The library returns search results from Google based on a given search query via Outscraper API.
Install the gem and add to the application's Gemfile by executing:
bundle add outscraper
If bundler is not being used to manage dependencies, install the gem by executing:
gem install outscraper
require 'Outscraper'
client = Outscraper::Client.new('SECRET_API_KEY')
Link to the profile page to create the API key
# Search for SERP results:
results = client.google_search('buy iphone 13 TX', language: 'en', region: 'us')