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.
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>'
correct. This is a bad limitation in the current design.
The next iteration of this library doesn't perform any parameters check on the client side.
see:
https://github.com/serpapi/serpapi-ruby
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 whichrelated_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: