firecrawl-sdk 1.9.2 → 1.10.0
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 +4 -4
- data/lib/firecrawl/models/monitor.rb +75 -0
- data/lib/firecrawl/models/search_options.rb +4 -1
- data/lib/firecrawl/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fc48fdfecc01e4811b2634c740ffab0787e03f99001a401014a3e98b0e63f627
|
|
4
|
+
data.tar.gz: ad7b3330c7e5f0934c58747ad2748b737783b90d4ccbf732d6f60924543bf45d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 75d9dde872641f95f313555ee32c842295c1a4afd150e1158b256821cf5a61f21078c80003b96ef86bce189c8909de1053bbad00a53907b5c191368b1af94444
|
|
7
|
+
data.tar.gz: 87b0802113b459ead84ea99a1b3a3aa989c26bf1c55b98dd567e7a2e669a38f52a9205a0924b5c1824e8078f61ab472d2f12a471dabfd7a86b445892914c061e
|
|
@@ -2,6 +2,81 @@
|
|
|
2
2
|
|
|
3
3
|
module Firecrawl
|
|
4
4
|
module Models
|
|
5
|
+
# A scrape, crawl, or search target stored on a monitor.
|
|
6
|
+
#
|
|
7
|
+
# Targets are forwarded to the API verbatim, so callers may also pass
|
|
8
|
+
# plain Hashes with camelCase keys. This class is a convenience for
|
|
9
|
+
# building well-formed target payloads (and is what {#to_h} emits).
|
|
10
|
+
#
|
|
11
|
+
# Search targets (+type: "search"+) use the +queries+, +search_window+,
|
|
12
|
+
# +include_domains+, +exclude_domains+, and +max_results+ fields.
|
|
13
|
+
class MonitorTarget
|
|
14
|
+
attr_reader :id, :type, :urls, :url, :scrape_options, :crawl_options,
|
|
15
|
+
:queries, :search_window, :include_domains,
|
|
16
|
+
:exclude_domains, :max_results
|
|
17
|
+
|
|
18
|
+
def initialize(data)
|
|
19
|
+
@id = data["id"]
|
|
20
|
+
@type = data["type"]
|
|
21
|
+
@urls = data["urls"]
|
|
22
|
+
@url = data["url"]
|
|
23
|
+
@scrape_options = data["scrapeOptions"]
|
|
24
|
+
@crawl_options = data["crawlOptions"]
|
|
25
|
+
# search target fields
|
|
26
|
+
@queries = data["queries"]
|
|
27
|
+
@search_window = data["searchWindow"]
|
|
28
|
+
@include_domains = data["includeDomains"]
|
|
29
|
+
@exclude_domains = data["excludeDomains"]
|
|
30
|
+
@max_results = data["maxResults"]
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def to_h
|
|
34
|
+
{
|
|
35
|
+
"id" => @id,
|
|
36
|
+
"type" => @type,
|
|
37
|
+
"urls" => @urls,
|
|
38
|
+
"url" => @url,
|
|
39
|
+
"scrapeOptions" => @scrape_options,
|
|
40
|
+
"crawlOptions" => @crawl_options,
|
|
41
|
+
"queries" => @queries,
|
|
42
|
+
"searchWindow" => @search_window,
|
|
43
|
+
"includeDomains" => @include_domains,
|
|
44
|
+
"excludeDomains" => @exclude_domains,
|
|
45
|
+
"maxResults" => @max_results,
|
|
46
|
+
}.compact
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# A per-target result on a monitor check.
|
|
51
|
+
#
|
|
52
|
+
# Search targets (+type: "search"+) populate the +search_completed+,
|
|
53
|
+
# +result_count+, +matches+, +summary+, +judge_degraded+,
|
|
54
|
+
# +degraded_reason+, +search_credits+, +judge_credits+, and
|
|
55
|
+
# +results_judged+ fields.
|
|
56
|
+
class MonitorTargetResult
|
|
57
|
+
attr_reader :target_id, :type, :expected_jobs, :crawl_id,
|
|
58
|
+
:search_completed, :result_count, :matches, :summary,
|
|
59
|
+
:judge_degraded, :degraded_reason, :search_credits,
|
|
60
|
+
:judge_credits, :results_judged
|
|
61
|
+
|
|
62
|
+
def initialize(data)
|
|
63
|
+
@target_id = data["targetId"]
|
|
64
|
+
@type = data["type"]
|
|
65
|
+
@expected_jobs = data["expectedJobs"]
|
|
66
|
+
@crawl_id = data["crawlId"]
|
|
67
|
+
# search target result fields
|
|
68
|
+
@search_completed = data["searchCompleted"]
|
|
69
|
+
@result_count = data["resultCount"]
|
|
70
|
+
@matches = data["matches"]
|
|
71
|
+
@summary = data["summary"]
|
|
72
|
+
@judge_degraded = data["judgeDegraded"]
|
|
73
|
+
@degraded_reason = data["degradedReason"]
|
|
74
|
+
@search_credits = data["searchCredits"]
|
|
75
|
+
@judge_credits = data["judgeCredits"]
|
|
76
|
+
@results_judged = data["resultsJudged"]
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
5
80
|
class Monitor
|
|
6
81
|
attr_reader :id, :name, :status, :schedule, :next_run_at, :last_run_at,
|
|
7
82
|
:current_check_id, :targets, :webhook, :notification,
|
|
@@ -6,7 +6,7 @@ module Firecrawl
|
|
|
6
6
|
class SearchOptions
|
|
7
7
|
FIELDS = %i[
|
|
8
8
|
sources categories include_domains exclude_domains limit tbs location
|
|
9
|
-
ignore_invalid_urls timeout scrape_options integration
|
|
9
|
+
ignore_invalid_urls timeout scrape_options integration enterprise
|
|
10
10
|
].freeze
|
|
11
11
|
|
|
12
12
|
attr_reader(*FIELDS)
|
|
@@ -28,6 +28,9 @@ module Firecrawl
|
|
|
28
28
|
"timeout" => timeout,
|
|
29
29
|
"scrapeOptions" => scrape_options&.to_h,
|
|
30
30
|
"integration" => integration,
|
|
31
|
+
# Enterprise search options. Use ["zdr"] for end-to-end Zero Data
|
|
32
|
+
# Retention or ["anon"] for anonymized search. Must be enabled for your team.
|
|
33
|
+
"enterprise" => enterprise,
|
|
31
34
|
}.compact
|
|
32
35
|
end
|
|
33
36
|
end
|
data/lib/firecrawl/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: firecrawl-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Firecrawl
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-06-
|
|
11
|
+
date: 2026-06-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: A type-safe Ruby client for the Firecrawl v2 API. Supports scraping,
|
|
14
14
|
crawling, batch scraping, URL mapping, web search, and AI agent operations.
|