• Verified
  • Free plan

SerpApi Ruby Library

Listed under GitHub repos

SerpApi Ruby Library is an open source Ruby gem that scrapes and parses results from Google, Bing, Baidu, Yandex, Yahoo, eBay and more through the SerpApi service.

Used for

  • search result scraping
  • serpapi client library
  • search api requests

What SerpApi Ruby Library does

This is a Ruby gem that sends search queries to SerpApi.com and returns the parsed results as Ruby hashes. It covers Google, Bing, Baidu, Yandex, Yahoo, eBay, YouTube, Home Depot, Walmart, DuckDuckGo, Naver and Apple Store through separate classes. The README opens with a deprecation notice: the gem is superseded by serpapi-ruby, which the notice says offers 3x faster performance, better error handling, persistent connections and asynchronous search.

Four services are documented: Search API, Location API, Search Archive API and Account API. A search is created with GoogleSearch.new, passing the query and a secret API key; the class formats the request, issues a GET call, and parses the JSON into a hash. SerpApi.com does the scraping and parsing on its side, so the gem only handles request formatting and response decoding.

Key features

Separate engine classes
Classes such as BingSearch, BaiduSearch, YahooSearch, YandexSearch, EbaySearch and YoutubeSearch wrap each supported engine.
Location API lookup
Builds a location list from a query string with a limit parameter, shown with the example q: Austin.
Search Archive API
Retrieves previous searches that were run through the SerpApi.com service.
Account API
Returns account details by calling get_account on a GoogleSearch instance.
Batch asynchronous search
Described in the README as one of two ways to boost searches.
Hash output from JSON
GoogleSearch issues a GET HTTP request and parses the JSON response into a Ruby Hash using the standard library.
Exception based errors
The library raises an exception when a request fails rather than returning an error object.
SerpApi script builder
SerpApi.com provides a playground that generates request parameters to start from.
Gem install path
Installed with gem install google_search_results, tested on Ruby 2.5, 3.0, 3.1 and 3.2.
Google vertical examples
Code samples cover Google Images, Google News and Google Shopping searches using the tbm parameter.
Migration path stated
Deprecation notice points to serpapi-ruby and lists its speed, error handling, connection and async changes.

How it works

  1. Modern Ruby must already be installed before running gem install google_search_results.
  2. Require the library in a Ruby file with require 'google_search_results'.
  3. Create a search object with GoogleSearch.new, passing q and serp_api_key.
  4. Call get_hash on the object to receive the parsed JSON as a Ruby hash.
  5. For other engines, use classes such as BingSearch or BaiduSearch with their own api_key.
  6. Read the deprecation notice and move to serpapi-ruby for persistent connections.

Plans and pricing

The README gives no price for the required SerpApi.com service; only the gem install command and an API key requirement are shown.

Integrations and platforms

Works with

  • Google
  • Bing
  • Baidu
  • Yandex
  • Yahoo
  • eBay
  • YouTube
  • Home Depot
  • Walmart
  • DuckDuckGo
  • Naver
  • Apple Store
  • SerpApi.com

Available as

  • API

Repository facts

  • Repositoryserpapi/google-search-results-ruby
  • LanguageRuby
  • Stars71
  • Forks16
  • LicenceMIT
  • Created2017-12-15
  • Last commit2026-08-25
  • Open issues6
  • api
  • ruby
  • rubygems
  • serp-api

Services and details

  • Does SEO work itself

    Yes
  • Free plan or free tools

    Yes
  • API or MCP server

    Yes

No information yet on keyword research, content optimization, writes content with AI, technical audits, rank tracking, backlinks and link building, local SEO, AI search visibility, free trial, WordPress plugin, browser extension, built for agencies. The website did not say; check with the vendor.

Compare with other SEO tools:

About the company

Listing compiled from public sources and the product's own website. Last updated 2026-11-12. Report a correction or request removal. Back to GitHub repos.