firecrawl-sdk 1.17.4 → 1.17.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 +4 -4
- data/README.md +1 -1
- data/lib/firecrawl/client.rb +3 -0
- data/lib/firecrawl/models/parse_options.rb +7 -0
- data/lib/firecrawl/models/query_format.rb +3 -0
- data/lib/firecrawl/models/scrape_options.rb +8 -1
- data/lib/firecrawl/version.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a95cf606a9dba18ec0e90ff361f6100e76b035904a045fbc35b28f51155ba679
|
|
4
|
+
data.tar.gz: 63dcd5e0a23da6fc58bd7d4aa9b0fd5f3c3b36506ffb46a5b44fd2f2ee6b019c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 72b349328602ff6f9b7528ff975b192a319f66fc14e398bfda51ee74cf9c8ab5a824a455609d9a642e463721492bb5962acb3b00c80e4a7bb801da059a0f1581
|
|
7
|
+
data.tar.gz: 19ac1a8b8237502e2e1b7907e637a7a070d8e0f3d309c121eec1b8328dcc233d499d72354cce959fae7514edfe7314db33f90427441ec16167f373af2514fde6
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Firecrawl Ruby SDK
|
|
2
2
|
|
|
3
|
-
Ruby SDK for
|
|
3
|
+
Ruby SDK for [Firecrawl](https://firecrawl.dev), the context API for AI agents. Search, scrape, parse, crawl, map, and interact with the web, and run Agent and Monitor jobs on the v2 API.
|
|
4
4
|
|
|
5
5
|
## Prerequisites
|
|
6
6
|
|
data/lib/firecrawl/client.rb
CHANGED
|
@@ -222,6 +222,7 @@ module Firecrawl
|
|
|
222
222
|
|
|
223
223
|
body = { "url" => url }
|
|
224
224
|
body.merge!(options.to_h) if options
|
|
225
|
+
body["origin"] ||= "ruby-sdk@#{Firecrawl::VERSION}"
|
|
225
226
|
raw = @http.post("/v2/crawl", body)
|
|
226
227
|
Models::CrawlResponse.new(raw)
|
|
227
228
|
end
|
|
@@ -296,6 +297,7 @@ module Firecrawl
|
|
|
296
297
|
body.merge!(opts_hash)
|
|
297
298
|
body.merge!(nested) if nested
|
|
298
299
|
end
|
|
300
|
+
body["origin"] ||= "ruby-sdk@#{Firecrawl::VERSION}"
|
|
299
301
|
raw = @http.post("/v2/batch/scrape", body, extra_headers: extra_headers)
|
|
300
302
|
Models::BatchScrapeResponse.new(raw)
|
|
301
303
|
end
|
|
@@ -347,6 +349,7 @@ module Firecrawl
|
|
|
347
349
|
|
|
348
350
|
body = { "url" => url }
|
|
349
351
|
body.merge!(options.to_h) if options
|
|
352
|
+
body["origin"] ||= "ruby-sdk@#{Firecrawl::VERSION}"
|
|
350
353
|
raw = @http.post("/v2/map", body)
|
|
351
354
|
data = raw["data"] || raw
|
|
352
355
|
Models::MapData.new(data)
|
|
@@ -7,6 +7,11 @@ module Firecrawl
|
|
|
7
7
|
# Parse does not support browser-rendering features (actions, waitFor,
|
|
8
8
|
# location, mobile) nor screenshot/branding/product/menu/audio/video/changeTracking formats. The
|
|
9
9
|
# proxy field only accepts "auto" or "basic".
|
|
10
|
+
#
|
|
11
|
+
# check_prompt_injection scans the parsed content for prompt injection
|
|
12
|
+
# before LLM-backed formats run. A detection fails the parse with
|
|
13
|
+
# SCRAPE_PROMPT_INJECTION_DETECTED. Adds 4 credits when the check scans
|
|
14
|
+
# the whole content.
|
|
10
15
|
class ParseOptions
|
|
11
16
|
UNSUPPORTED_FORMATS = %w[changeTracking screenshot screenshot@fullPage branding product menu audio video].freeze
|
|
12
17
|
|
|
@@ -14,6 +19,7 @@ module Firecrawl
|
|
|
14
19
|
formats headers include_tags exclude_tags only_main_content
|
|
15
20
|
timeout parsers skip_tls_verification remove_base64_images
|
|
16
21
|
block_ads proxy integration redact_pii json_options audit_metadata
|
|
22
|
+
check_prompt_injection
|
|
17
23
|
].freeze
|
|
18
24
|
|
|
19
25
|
attr_reader(*FIELDS)
|
|
@@ -42,6 +48,7 @@ module Firecrawl
|
|
|
42
48
|
"proxy" => proxy,
|
|
43
49
|
"integration" => integration,
|
|
44
50
|
"redactPII" => redact_pii,
|
|
51
|
+
"checkPromptInjection" => check_prompt_injection,
|
|
45
52
|
"jsonOptions" => json_options.is_a?(Hash) ? json_options : json_options&.to_h,
|
|
46
53
|
"auditMetadata" => audit_metadata&.to_h,
|
|
47
54
|
}.compact
|
|
@@ -43,6 +43,9 @@ module Firecrawl
|
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
# JSON format for extracting structured data from page content using a schema.
|
|
46
|
+
#
|
|
47
|
+
# check_prompt_injection is deprecated: use ScrapeOptions#check_prompt_injection
|
|
48
|
+
# or ParseOptions#check_prompt_injection.
|
|
46
49
|
class JsonFormat
|
|
47
50
|
attr_reader :schema, :prompt, :check_prompt_injection
|
|
48
51
|
|
|
@@ -3,12 +3,18 @@
|
|
|
3
3
|
module Firecrawl
|
|
4
4
|
module Models
|
|
5
5
|
# Options for scraping a single URL.
|
|
6
|
+
#
|
|
7
|
+
# check_prompt_injection scans the page content for prompt injection with
|
|
8
|
+
# any format except rawBase64, before LLM-backed formats run. A detection
|
|
9
|
+
# fails the scrape with SCRAPE_PROMPT_INJECTION_DETECTED. Adds 4 credits
|
|
10
|
+
# when the check scans the whole page.
|
|
6
11
|
class ScrapeOptions
|
|
7
12
|
FIELDS = %i[
|
|
8
13
|
formats headers include_tags exclude_tags only_main_content
|
|
9
14
|
timeout wait_for mobile parsers actions location
|
|
10
15
|
skip_tls_verification remove_base64_images block_ads proxy
|
|
11
|
-
max_age store_in_cache lockdown redact_pii
|
|
16
|
+
max_age store_in_cache lockdown check_prompt_injection redact_pii
|
|
17
|
+
integration audit_metadata
|
|
12
18
|
].freeze
|
|
13
19
|
|
|
14
20
|
attr_reader(*FIELDS)
|
|
@@ -41,6 +47,7 @@ module Firecrawl
|
|
|
41
47
|
"maxAge" => max_age,
|
|
42
48
|
"storeInCache" => store_in_cache,
|
|
43
49
|
"lockdown" => lockdown,
|
|
50
|
+
"checkPromptInjection" => check_prompt_injection,
|
|
44
51
|
"redactPII" => redact_pii,
|
|
45
52
|
"integration" => integration,
|
|
46
53
|
"auditMetadata" => audit_metadata&.to_h,
|
data/lib/firecrawl/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: firecrawl-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.17.
|
|
4
|
+
version: 1.17.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Firecrawl
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
|
-
description: A type-safe Ruby client for the Firecrawl v2 API
|
|
14
|
-
|
|
13
|
+
description: 'A type-safe Ruby client for the Firecrawl v2 API: search, scrape, parse,
|
|
14
|
+
crawl, map, and interact with the web, run batch scrapes, and run Agent and Monitor
|
|
15
|
+
jobs.'
|
|
15
16
|
email:
|
|
16
17
|
- hello@firecrawl.dev
|
|
17
18
|
executables: []
|
|
@@ -83,5 +84,5 @@ requirements: []
|
|
|
83
84
|
rubygems_version: 3.5.22
|
|
84
85
|
signing_key:
|
|
85
86
|
specification_version: 4
|
|
86
|
-
summary: Ruby SDK for the
|
|
87
|
+
summary: Ruby SDK for Firecrawl, the context API for AI agents
|
|
87
88
|
test_files: []
|