Google Related Searches API

Google searches that may be related to other search terms are presented with related search boxes or a related searches section, typically at the bottom of the search page.

Internet connection seems to not be working.
Register / Sign In for a full access to our APIs.
  • Collapse / Expand
    JSON
    CTRL + Left Mouse Button
  • Copy JSON path:ALT + Left Mouse Button
  • {
    • "error": "Internet connection seems to not be working."
    }

Code to integrate

  • require 'google_search_results' 
    
    params = {
      q: "Benefits of Tea",
      location: "Austin, Texas, United States",
      google_domain: "google.com",
      hl: "en",
      gl: "us",
      api_key: "secret_api_key"
    }
    
    search = GoogleSearch.new(params)
    related_searches = search.get_hash[:related_searches]
    

Free Plan · 100 searches / month

Get started

JSON structure overview

{
  ...
  "related_searches": [
    {
      "block_position": "Integer - Index of related search container",
      "query": "String - Query of the related search",
      "image": "String - Image of the related search",
      "link":  "String - Link to the Google search",
      "serpapi_link":  "String - SerpApi Link of the Google search",
      "items": [
        {
          "name": "String - Name of the item",
          "image": "String - Image of the item",
          "reviews": "Integer - Number of reviews. Available for some searches, e.g. restaurants",
          "rating": "Float - Rating of the item. Available for some searches, e.g. restaurants",
          "duration": "String - Duration of a video",
          "extensions": "Array - Extensions of the item",
          "link":  "String - Link to the Google search",
          "serpapi_link":  "String - SerpApi Link of the Google search",
        }
      ],
    },
    ...
  ],
  ...
}

SerpApi results for ""