Skip to content

Commit 36edd7f

Browse files
committed
Update documentation
1 parent 943e3d4 commit 36edd7f

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
[![serpapi-ruby](https://github.com/serpapi/serpapi-ruby/actions/workflows/ci.yml/badge.svg)](https://github.com/serpapi/serpapi-ruby/actions/workflows/ci.yml) [![Gem Version](https://badge.fury.io/rb/serpapi.svg)](https://badge.fury.io/rb/serpapi)
44

5-
Integrate search data into your AI workflow, RAG / fine tuning or ruby application using this official wrapper for [SerpApi](https://serpapi.com).
5+
Integrate search data into your AI workflow, RAG / fine-tuning, or Ruby application using this official wrapper for [SerpApi](https://serpapi.com).
66

7-
SerpApi supports Google, Google Maps, Google Shopping, Baidu, Yandex, Yahoo, eBay, App Stores, and [more.](https://serpapi.com).
7+
SerpApi supports Google, Google Maps, Google Shopping, Baidu, Yandex, Yahoo, eBay, App Stores, and [more](https://serpapi.com).
88

9-
Fast query at scale a vast range of data, including web search results, flight schedule, stock market data, news headlines, and [more.](https://serpapi.com).
9+
Fast query at scale a vast range of data, including web search results, flight schedules, stock market data, news headlines, and [more](https://serpapi.com).
1010

1111
## Features
1212
* `persistent` → Keep socket connection open to save on SSL handshake / reconnection (2x faster). [Search at scale](#Search-At-Scale)
@@ -16,7 +16,7 @@ Fast query at scale a vast range of data, including web search results, flight s
1616

1717
## Installation
1818

19-
To achieve optimal performance, it is essential to latest Ruby version installed on your system (Ruby 2.7+ is supported by 3.4 is recommended for [performance reason](#Performance-Comparison)).
19+
To achieve optimal performance, you should have the latest Ruby version installed on your system (Ruby 2.7+ is supported, but 3.4 is recommended for [performance reason](#Performance-Comparison)).
2020

2121
| Older versions such as Ruby 1.9, 2.x, and JRuby are compatible with [serpapi older library](https://github.com/serpapi/google-search-results-ruby), which continues to function effectively. see [migration guide](#Migration-quick-guide) if you are using the older library.
2222

@@ -55,7 +55,7 @@ Environment variables are a secure, safe, and easy way to manage secrets.
5555
## Search API advanced usage with Google search engine
5656

5757
This example dives into all the available parameters for the Google search engine.
58-
The set of parameters is extensive and depends on the search engine you choose.
58+
The set of parameters is extensive and depends on your chosen search engine.
5959

6060
```ruby
6161
# load gem
@@ -66,15 +66,15 @@ client = SerpApi::Client.new(
6666
engine: 'google',
6767
api_key: ENV['SERPAPI_KEY'],
6868
# HTTP client configuration
69-
async: false, # non blocking HTTP request see: Search Asynchronous (default: false)
69+
async: false, # non-blocking HTTP request see: Search Asynchronous (default: false)
7070
persistent: true, # leave socket connection open for faster response time see: Search at scale (default: true)
7171
timeout: 5, # HTTP timeout in seconds on the client side only. (default: 120s)
72-
symbolize_names: true # turn on/off JSON keys to symbols (default: on more efficient)
72+
symbolize_names: true # turn on/off JSON keys to symbols (default: on, more efficient)
7373
)
7474

7575
# search query overview (more fields available depending on search engine)
7676
params = {
77-
# overview of parameter for Google search engine which one of many search engine supported.
77+
# overview of parameter for Google search engine which is one of many search engine supported.
7878
# select the search engine (full list: https://serpapi.com/)
7979
engine: "google",
8080
# actual search query
@@ -164,7 +164,7 @@ puts 'done'
164164
* source code: [demo/demo_async.rb](https://github.com/serpapi/serpapi-ruby/blob/master/demo/demo_async.rb)
165165

166166
This code shows a simple solution to batch searches asynchronously into a [queue](https://en.wikipedia.org/wiki/Queue_(abstract_data_type)).
167-
Each search takes a few seconds before completion by SerpApi service and the search engine. By the time the first element pops out of the queue. The search result might be already available in the archive. If not, the `search_archive` method blocks until the search results are available.
167+
Each search takes a few seconds before completion by SerpApi service and the search engine. By the time the first element pops out of the queue. The search result might already be available in the archive. If not, the `search_archive` method blocks until the search results are available.
168168

169169
### Search at scale
170170
The provided code snippet is a Ruby spec test case that demonstrates the use of thread pools to execute multiple HTTP requests concurrently.
@@ -270,7 +270,7 @@ NOTE: api_key is not required for this endpoint.
270270
This API allows retrieving previous search results.
271271
To fetch earlier results from the search_id.
272272

273-
First, you need to run a search and save the search id.
273+
First, you need to run a search and save the search ID.
274274

275275
```ruby
276276
require 'serpapi'
@@ -279,7 +279,7 @@ results = client.search(q: "Coffee", location: "Portland")
279279
search_id = results[:search_metadata][:id]
280280
```
281281

282-
Now we can retrieve the previous search results from the archive using the search id (free of charge).
282+
Now we can retrieve the previous search results from the archive using the search ID (free of charge).
283283

284284
```ruby
285285
require 'serpapi'

0 commit comments

Comments
 (0)