@@ -50,8 +50,8 @@ $ gem install serpapi
5050
5151```ruby
5252require 'serpapi'
53- client = SerpApi::Client.new api_key: "serpapi_api_key"
54- results = client.search q: "coffee", engine: "google"
53+ client = SerpApi::Client.new( api_key: "serpapi_api_key")
54+ results = client.search( q: "coffee", engine: "google")
5555pp results
5656 ```
5757
@@ -64,7 +64,7 @@ This example runs a search for "coffee" on Google. It then returns the results a
6464require 'serpapi'
6565
6666# serpapi client created with default parameters
67- client = SerpApi::Client.new(api_key: "secret_key", engine: "google" )
67+ client = SerpApi::Client.new(engine: 'google', api_key: 'secret_key' )
6868
6969# We recommend that you keep your keys safe.
7070# At least, don't commit them in plain text.
@@ -103,7 +103,7 @@ results = client.search(params)
103103raw_html = client.html(parameter)
104104```
105105
106- [Google search documentation](https://serpapi.com/search-api).
106+ [SerpApi documentation](https://serpapi.com/search-api).
107107More hands on examples are available below.
108108
109109#### Documentations
@@ -150,14 +150,15 @@ This API allows retrieving previous search results.
150150To fetch earlier results from the search_id.
151151
152152First, you need to run a search and save the search id.
153+
153154```ruby
154155require 'serpapi'
155- client = SerpApi::Client.new(api_key : 'secret_api_key ', engine : 'google ')
156+ client = SerpApi::Client.new(engine : 'google ', api_key : 'secret_api_key ')
156157results = client.search(q: "Coffee", location: "Portland")
157158search_id = results[:search_metadata][:id]
158159```
159160
160- Now let's retrieve the previous search results from the archive.
161+ Now we can retrieve the previous search results from the archive (free)
161162
162163```ruby
163164require 'serpapi'
0 commit comments