google-search-results-ruby icon indicating copy to clipboard operation
google-search-results-ruby copied to clipboard

[Google Related Questions API] Support for Related Questions API

Open aliayar opened this issue 3 years ago • 0 comments

The Ruby package does not support related_questions_api as it checks the parameters before launching the request and can't find the "q" parameter which related_questions_api does not require.

The problem stems from these lines:

https://github.com/serpapi/google-search-results-ruby/blob/2ac987f67bbad0ed9d5fdcb62301abdc74947576/lib/search/serp_api_search.rb#L154-L180

The error is:

Ruby30-x64/lib/ruby/gems/3.0.0/gems/google_search_results-2.2.0/lib/search/serp_api_search.rb:178:in `check_params': missing required keys in params:  (SerpApiException)
 - q
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/google_search_results-2.2.0/lib/search/google_search.rb:36:in `initialize'
        from ./deneme.rb:23:in `new'
        from ./deneme.rb:23:in `block in <main>'
        from ./deneme.rb:15:in `each'
        from ./deneme.rb:15:in `<main>'

aliayar avatar Nov 07 '22 14:11 aliayar