@@ -272,16 +272,16 @@ First, you need to run a search and save the search id.
272272
273273``` ruby
274274require ' serpapi'
275- client = SerpApi ::Client .new (engine: ' google' , api_key: ' secret_api_key ' )
275+ client = SerpApi ::Client .new (engine: ' google' , api_key: ENV [ ' SERPAPI_KEY ' ] )
276276results = client.search(q: " Coffee" , location: " Portland" )
277277search_id = results[:search_metadata ][:id ]
278278```
279279
280- Now we can retrieve the previous search results from the archive (free)
280+ Now we can retrieve the previous search results from the archive using the search id (free of charge).
281281
282282``` ruby
283283require ' serpapi'
284- client = SerpApi ::Client .new (api_key: ' secret_api_key ' )
284+ client = SerpApi ::Client .new (api_key: ENV [ ' SERPAPI_KEY ' ] )
285285results = client.search_archive(search_id)
286286pp results
287287```
@@ -291,11 +291,30 @@ This code prints the search results from the archive. :)
291291### Account API
292292``` ruby
293293require ' serpapi'
294- client = SerpApi ::Client .new (api_key: ' secret_api_key ' )
294+ client = SerpApi ::Client .new (api_key: ENV [ ' SERPAPI_KEY ' ] )
295295pp client.account
296296```
297297
298- It prints your account information.
298+ It prints your account information as:
299+ ``json
300+ {
301+ account_id: "1234567890",
302+ api_key: "your_secret_key",
303+ account_email: "email@company.com ",
304+ account_status: "Active",
305+ plan_id: "free",
306+ plan_name: "Free Plan",
307+ plan_monthly_price: 0.0,
308+ searches_per_month: 100,
309+ plan_searches_left: 0,
310+ extra_credits: 100,
311+ total_searches_left: 10,
312+ this_month_usage: 100,
313+ this_hour_searches: 0,
314+ last_hour_searches: 0,
315+ account_rate_limit_per_hour: 100
316+ }
317+ ```
299318
300319## Basic example per search engine
301320
0 commit comments