fetchserp 0.1.1 → 0.1.2

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: 3cd4f221a3c82a7cbbe3f8f30f2ad30d34033d98090ddaabe716dd6710b7e93c
4
- data.tar.gz: 334c72468085154f231e4cc5de15002fc208e4aeeabcc04a67d4c79a40e7a21f
3
+ metadata.gz: 0074340ccc01f75f24314a4793bf0949e440e18673393957dc51a52c740eb17d
4
+ data.tar.gz: 9c32a55e21868b613bfb952ee4ae8dbe8c769b15ba80f50cad9947e1a3465840
5
5
  SHA512:
6
- metadata.gz: d7e76b461290d590368bf47e5892cf161d8255011259a6bbffa488c8c4959700146ac99597d9f1bd15a9529741f2270543996c117440319ed94b8162b32460f7
7
- data.tar.gz: 69c53b9825c3d84eccdb6770eab3552e335882ad9ea59b40e5b69cec10a5372d6b9699227bb52f0aa51eb0170d33249a3dc30028e315f99b5cb26dc2777bdcd6
6
+ metadata.gz: '0159792db3d0f8ece50c0c50d42e09a550a7b1e6bcb672b8874bb10187b38e481572626d6938275e8f7becb0060a70f95974836a26f86c3efbfb65e816e9f0bd'
7
+ data.tar.gz: 3b30f3fcc8b587214626a603b335d1b84ddba0efe2884ad22aa157bc03a9c3ab0a2c50d4c026bb4c1ff4ed84cd01ed39ee5885a6d461468897d3d0c6d0f7850d
data/README.md CHANGED
@@ -7,7 +7,7 @@ A lightweight, hand-crafted Ruby SDK for the FetchSERP REST API.
7
7
  Add this line to your application's Gemfile:
8
8
 
9
9
  ```ruby
10
- gem "fetchserp", git: "https://github.com/fetchserp/fetchserp-ruby.git"
10
+ gem "fetchserp", "~> 0.1"
11
11
  ```
12
12
 
13
13
  Then bundle install:
@@ -16,6 +16,22 @@ Then bundle install:
16
16
  bundle install
17
17
  ```
18
18
 
19
+ ## Authentication
20
+
21
+ An API key is required for **all** requests. You can create a free account and grab your key at <https://fetchserp.com/> — every new account starts with **250 free credits** so you can test the endpoints immediately.
22
+
23
+ Set it in your environment (recommended):
24
+
25
+ ```bash
26
+ export FETCHSERP_API_KEY="your-secret-token"
27
+ ```
28
+
29
+ or pass it directly when instantiating the client:
30
+
31
+ ```ruby
32
+ client = FetchSERP.new(api_key: "your-secret-token")
33
+ ```
34
+
19
35
  ## Quick Start
20
36
 
21
37
  ```ruby
@@ -30,6 +46,10 @@ puts response.data
30
46
  # Fetch Google SERP results
31
47
  serp = client.serp(query: "best ruby gems", country: "us")
32
48
  puts serp.data["results"]
49
+
50
+ # Get ranking positions for a domain/keyword
51
+ ranking = client.ranking(keyword: "serp api", domain: "fetchserp.com", pages_number: 5)
52
+ puts ranking.data["results"]
33
53
  ```
34
54
 
35
55
  The client will raise `FetchSERP::Error` on any HTTP error (network, 4xx, 5xx) so you can handle failures gracefully.
@@ -79,6 +79,12 @@ module FetchSERP
79
79
  get("/api/v1/serp_html", params)
80
80
  end
81
81
 
82
+ # SERP AI Overview and AI Mode - returns AI overview and AI mode response for the query
83
+ # Less reliable than the 2-step process but returns results in under 30 seconds
84
+ def serp_ai_mode(**params)
85
+ get("/api/v1/serp_ai_mode", params)
86
+ end
87
+
82
88
  # Step 1: returns uuid
83
89
  def serp_js(**params)
84
90
  get("/api/v1/serp_js", params)
@@ -1,3 +1,3 @@
1
1
  module FetchSERP
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fetchserp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - FetchSERP
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-06-19 00:00:00.000000000 Z
11
+ date: 2025-06-25 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A lightweight Ruby client for interacting with the FetchSERP API. Provides
14
14
  helpers for authentication and convenient Ruby methods for each endpoint.