outscraper 0.3.5 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9476b68f4bd7fc5b7af263cc5cb28b5e753960d760c44d1e697681123aee6236
4
- data.tar.gz: 298ec43dbdec09108bbf6e98660b0e1150dce799d3408740a2c6d8fdbfd33c43
3
+ metadata.gz: 36bc03b48faddd06287b3c11a0c457a80412221cc752e19834419b66791eb83b
4
+ data.tar.gz: 2d46d01a94f94ffd1cbd39d8718ecf6c31172ae9a274f9380f365295a5115454
5
5
  SHA512:
6
- metadata.gz: fb819008c8e1a0e634c4a73779842810153156b7c22fc2ce94954e8a030ee363d8dc57127a0db61e190b40dab50d349a93c852d5faf1ebe1cefeba7b7674dde0
7
- data.tar.gz: 2b8beb1a3fdf33a45d0bfc20f293516b535106dfb723f5499f831fea583e5f5788423033939665ce109536ac804ecb2b47dd17f016265f860c45efdb197a7fe2
6
+ metadata.gz: c359daeb150ec3e8c527b3d1e25cde39decf289215f17d47707089ca0d4e61de61a2ae8e837686bd3521e22f44c9746b5d0a73454dc3bf5ee4b6ddc06fa076e4
7
+ data.tar.gz: 715e674806c05bf2daf94f153b5c30c04639b4a6452178b82adb361cddca5c8e97d32783b5dc72f78569f541149f8ed2099fca624f75381346736c9363c433fb
data/README.md CHANGED
@@ -22,7 +22,7 @@ require 'Outscraper'
22
22
 
23
23
  client = Outscraper::Client.new('SECRET_API_KEY')
24
24
  ```
25
- [Link to the profile page to create the API key](https://app.outscraper.com/profile)
25
+ [Link to the account page to create the API key](https://app.outscraper.com/account/api)
26
26
 
27
27
  ## Usage
28
28
 
@@ -0,0 +1,123 @@
1
+ # Businesses Search With Ruby
2
+
3
+ The library provides real-time access to business records via the [Outscraper API](https://app.outscraper.com/api-docs).
4
+ It supports classic structured filters and AI-powered plain-text queries for flexible search.
5
+
6
+ - Structured search using `filters`, `fields`, `limit`, and other parameters
7
+ - AI-powered search using the `query` parameter
8
+ - Combined mode where structured params and `query` are merged by the server
9
+
10
+ ---
11
+
12
+ ## Installation
13
+
14
+ Install the gem and add it to the application's Gemfile by executing:
15
+
16
+ ```bash
17
+ bundle add outscraper
18
+ ```
19
+
20
+ If bundler is not being used to manage dependencies, install the gem by executing:
21
+
22
+ ```bash
23
+ gem install outscraper
24
+ ```
25
+
26
+ [Link to the Ruby package page](https://rubygems.org/gems/outscraper)
27
+
28
+ ---
29
+
30
+ ## Initialization
31
+
32
+ ```ruby
33
+ require "outscraper"
34
+
35
+ client = Outscraper::Client.new("SECRET_API_KEY")
36
+ ```
37
+
38
+ [Link to the profile page to create the API key](https://app.outscraper.com/profile)
39
+
40
+ ---
41
+
42
+ ## Usage
43
+
44
+ ### Search businesses with structured filters
45
+
46
+ ```ruby
47
+ results = client.businessesSearch(
48
+ filters: {
49
+ country_code: "US",
50
+ states: ["NY"],
51
+ cities: ["New York", "Buffalo"],
52
+ types: ["restaurant", "cafe"],
53
+ has_website: true,
54
+ has_phone: true,
55
+ business_statuses: ["operational"]
56
+ },
57
+ limit: 50,
58
+ include_total: false,
59
+ fields: ["name", "phone", "website", "address", "rating", "reviews"]
60
+ )
61
+
62
+ puts results
63
+ ```
64
+
65
+ ### Search businesses with AI plain-text query
66
+
67
+ ```ruby
68
+ results = client.businessesSearch(
69
+ query: "Find cafes in New York, NY. Limit 25. Return name, address, phone, website, rating and reviews."
70
+ )
71
+
72
+ puts results
73
+ ```
74
+
75
+ ### Combine structured params and plain-text query
76
+
77
+ ```ruby
78
+ results = client.businessesSearch(
79
+ filters: {
80
+ country_code: "US",
81
+ states: ["CA"],
82
+ types: ["restaurant"]
83
+ },
84
+ fields: ["name", "phone"],
85
+ limit: 15,
86
+ query: "Add cafes too. Return address and reviews. Limit 20. Include total."
87
+ )
88
+
89
+ puts results
90
+ ```
91
+
92
+ When both structured params and `query` are provided:
93
+
94
+ - `filters` and `fields` are merged
95
+ - for `limit`, `cursor`, and `include_total`, plain-text values take priority when present
96
+ - if a value is not specified, API defaults are used
97
+
98
+ ### Iterate through all results (auto-pagination)
99
+
100
+ ```ruby
101
+ items = client.businessesIterSearch(
102
+ filters: {
103
+ country_code: "US",
104
+ states: ["NY"],
105
+ business_statuses: ["operational"]
106
+ },
107
+ limit: 100,
108
+ fields: ["name", "phone", "address", "rating", "reviews"]
109
+ )
110
+
111
+ puts items.length
112
+ ```
113
+
114
+ ### Get business details by ID
115
+
116
+ ```ruby
117
+ business = client.businessesGet(
118
+ "YOUR_BUSINESS_ID",
119
+ fields: ["name", "phone", "website", "address", "rating", "reviews"]
120
+ )
121
+
122
+ puts business
123
+ ```
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Outscraper
4
- VERSION = "0.3.5"
4
+ VERSION = "0.3.6"
5
5
  end
data/lib/outscraper.rb CHANGED
@@ -414,7 +414,8 @@ module Outscraper
414
414
  fields: nil,
415
415
  async_request: false,
416
416
  ui: false,
417
- webhook: nil
417
+ webhook: nil,
418
+ query: nil
418
419
  )
419
420
  payload = {
420
421
  filters: (filters || {}),
@@ -422,6 +423,7 @@ module Outscraper
422
423
  include_total: include_total,
423
424
  cursor: cursor,
424
425
  fields: fields ? Array(fields) : nil,
426
+ query: query,
425
427
  async: async_request,
426
428
  ui: ui,
427
429
  webhook: webhook
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: outscraper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Outscraper
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-01-26 00:00:00.000000000 Z
11
+ date: 2026-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -39,6 +39,7 @@ files:
39
39
  - LICENSE.txt
40
40
  - README.md
41
41
  - Rakefile
42
+ - examples/Businesses.md
42
43
  - examples/Company Insights.md
43
44
  - examples/Company Website Finder.md
44
45
  - examples/Contacts And Leads.md