You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Integrate search data into your AI workflow, RAG / finetuning 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).
6
6
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).
8
8
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
+
Query a vast range of data at scale, including web search results, flight schedules, stock market data, news headlines, and [more](https://serpapi.com).
10
10
11
11
## Features
12
12
*`persistent` → Keep socket connection open to save on SSL handshake / reconnection (2x faster). [Search at scale](#Search-At-Scale)
@@ -16,14 +16,13 @@ Fast query at scale a vast range of data, including web search results, flight s
16
16
17
17
## Installation
18
18
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)).
20
-
21
-
| 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.
19
+
Ruby 2.7 and later are supported. To achieve an optimal performance, the latest version is recommended. Check 2.7.8 vs 3.4.4 [performance comparison](#Performance-Comparison).
22
20
21
+
Other versions, such as Ruby 1.9, Ruby 2.x, and JRuby, are compatible with [legacy SerpApi library](https://github.com/serpapi/google-search-results-ruby), which is still supported. To upgrade to the latest library, check our [migration guide](#Migration-quick-guide).
23
22
24
23
### Bundler
25
24
```ruby
26
-
gem 'serpapi', '~> 1.0.0'
25
+
gem 'serpapi', '~> 1.0', '>= 1.0.1'
27
26
```
28
27
29
28
### Gem
@@ -55,7 +54,7 @@ Environment variables are a secure, safe, and easy way to manage secrets.
55
54
## Search API advanced usage with Google search engine
56
55
57
56
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.
57
+
The list of parameters depends on the chosen search engine.
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.
165
+
This code shows a simple solution to batch searches asynchronously into a [queue](https://en.wikipedia.org/wiki/Queue_(abstract_data_type)). Each search may take up to few seconds to complete. By the time the first element pops out of the queue, the search results might already be available in the archive. If not, the `search_archive` method blocks until the search results are available.
168
166
169
167
### Search at scale
170
168
The provided code snippet is a Ruby spec test case that demonstrates the use of thread pools to execute multiple HTTP requests concurrently.
Integrate search data into your AI workflow, RAG / finetuning or ruby application using this official wrapper for [SerpApi](https://serpapi.com).
25
+
Integrate search data into your AI workflow, RAG / fine-tuning, or Ruby application using this official wrapper for [SerpApi](https://serpapi.com).
26
26
27
-
SerpApi supports Google, Google Maps, Google Shopping, Baidu, Yandex, Yahoo, eBay, App Stores, and [more.](https://serpapi.com).
27
+
SerpApi supports Google, Google Maps, Google Shopping, Baidu, Yandex, Yahoo, eBay, App Stores, and [more](https://serpapi.com).
28
28
29
-
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).
29
+
Query a vast range of data at scale, including web search results, flight schedules, stock market data, news headlines, and [more](https://serpapi.com).
30
30
31
31
## Features
32
32
* `persistent` → Keep socket connection open to save on SSL handshake / reconnection (2x faster). [Search at scale](#Search-At-Scale)
@@ -36,14 +36,13 @@ Fast query at scale a vast range of data, including web search results, flight s
36
36
37
37
## Installation
38
38
39
-
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)).
40
-
41
-
| 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.
39
+
Ruby 2.7 and later are supported. To achieve an optimal performance, the latest version is recommended. Check 2.7.8 vs 3.4.4 [performance comparison](#Performance-Comparison).
42
40
41
+
Other versions, such as Ruby 1.9, Ruby 2.x, and JRuby, are compatible with [legacy SerpApi library](https://github.com/serpapi/google-search-results-ruby), which is still supported. To upgrade to the latest library, check our [migration guide](#Migration-quick-guide).
43
42
44
43
### Bundler
45
44
```ruby
46
-
gem 'serpapi', '~> 1.0.0'
45
+
gem 'serpapi', '~> 1.0', '>= 1.0.1'
47
46
```
48
47
49
48
### Gem
@@ -75,7 +74,7 @@ Environment variables are a secure, safe, and easy way to manage secrets.
75
74
## Search API advanced usage with Google search engine
76
75
77
76
This example dives into all the available parameters for the Google search engine.
78
-
The set of parameters is extensive and depends on the search engine you choose.
77
+
The list of parameters depends on the chosen search engine.
if search_archived[:search_metadata][:status] =~ /Cached|Success/
172
+
puts "#{search_archived[:search_parameters][:q]}: search results found in archive for: #{company}"
173
+
next
174
+
end
175
+
176
+
schedule_search.push(result)
177
+
end
146
178
147
-
This code shows a simple solution to batch searches asynchronously into a [queue](https://en.wikipedia.org/wiki/Queue_(abstract_data_type)).
148
-
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.
This code shows a simple solution to batch searches asynchronously into a [queue](https://en.wikipedia.org/wiki/Queue_(abstract_data_type)). Each search may take up to few seconds to complete. By the time the first element pops out of the queue, the search results might already be available in the archive. If not, the `search_archive` method blocks until the search results are available.
149
186
150
187
### Search at scale
151
188
The provided code snippet is a Ruby spec test case that demonstrates the use of thread pools to execute multiple HTTP requests concurrently.
0 commit comments