firecrawl-sdk 1.17.0 → 1.17.1

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: d4692141ed256c6cf62171578f7bfdbb852ddb915a60b48ba520a73ecc8885b1
4
- data.tar.gz: ff206e069d080e13598824ff3faa7eaf86b89b2cacbc051cd53aa861b20d1977
3
+ metadata.gz: e2b500556e1d7b0d222ae8937ae86dccdcf8c6499871c0202608a46b4611ef17
4
+ data.tar.gz: 2e4913c995ed97d8b55f295ab6adb0e61fe42cc0f08aff1f8aa12763f765b2be
5
5
  SHA512:
6
- metadata.gz: 83a86911be8bfd5b9736bbfbe610c40934b31a9e6da25de714972be4399c9374421955e2b0ef5e41b6a15c0829c3c3ff30dbc1004a75c9a6210182f0df620399
7
- data.tar.gz: 9ca272944fc87bf14462b30e0f7f99239a1253ca11c88c1d7393469f52491362e0a72f7c5e354467e0f154c1e780aa08732e162fdc2345832ffe0d4779f98bc9
6
+ metadata.gz: d138c5083321098460e7ab5777201300ba0b1701f93361e97a27e0b87c88c9bd3163e56124d9b2da94536855a99e41522d13002c73379d1c67dd7bfb280b9624
7
+ data.tar.gz: 64e7178e770554abd242289756c2de70fcd3d76d2104002e36c2d8773065aa14f1e4ca161b60a72ed063da9fb4f5fa1a050d49f79809fbedf951ce2d481909fe
data/README.md CHANGED
@@ -126,6 +126,15 @@ doc = client.parse(file,
126
126
  puts doc.markdown
127
127
  ```
128
128
 
129
+ List the file formats the parse endpoint accepts. `available` is `false` for
130
+ formats the deployment can't currently handle (e.g. images when OCR is off).
131
+
132
+ ```ruby
133
+ client.get_parse_formats.each do |f|
134
+ puts "#{f.format} (#{f.kind}) #{f.extensions.join(", ")} #{f.mime_types.join(", ")} available=#{f.available}"
135
+ end
136
+ ```
137
+
129
138
  ### Crawl
130
139
 
131
140
  ```ruby
@@ -195,6 +195,15 @@ module Firecrawl
195
195
  Models::Document.new(data)
196
196
  end
197
197
 
198
+ # Lists the file formats accepted by {#parse} on this deployment.
199
+ #
200
+ # @return [Array<Models::ParseFormat>]
201
+ def get_parse_formats
202
+ raw = @http.get("/v2/parse/formats")
203
+ formats = (raw["data"] || {})["formats"] || []
204
+ formats.map { |f| Models::ParseFormat.new(f) }
205
+ end
206
+
198
207
  # ================================================================
199
208
  # CRAWL
200
209
  # ================================================================
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Firecrawl
4
+ module Models
5
+ # A file format accepted by the `/v2/parse` endpoint.
6
+ #
7
+ # `kind` is usually one of {KIND_DOCUMENT} or {KIND_IMAGE}, but newer API
8
+ # versions may return other values, which are kept as-is.
9
+ class ParseFormat
10
+ KIND_DOCUMENT = "document"
11
+ KIND_IMAGE = "image"
12
+
13
+ attr_reader :format, :kind, :extensions, :mime_types, :available
14
+
15
+ def initialize(data)
16
+ @format = data["format"]
17
+ @kind = data["kind"]
18
+ @extensions = data["extensions"] || []
19
+ @mime_types = data["mimeTypes"] || []
20
+ @available = data["available"]
21
+ end
22
+
23
+ def document?
24
+ kind == KIND_DOCUMENT
25
+ end
26
+
27
+ def image?
28
+ kind == KIND_IMAGE
29
+ end
30
+
31
+ def to_s
32
+ "ParseFormat{format=#{format}, kind=#{kind}, available=#{available}}"
33
+ end
34
+ end
35
+ end
36
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Firecrawl
4
- VERSION = "1.17.0"
4
+ VERSION = "1.17.1"
5
5
  end
data/lib/firecrawl.rb CHANGED
@@ -22,6 +22,7 @@ require_relative "firecrawl/models/search_options"
22
22
  require_relative "firecrawl/models/search_data"
23
23
  require_relative "firecrawl/models/parse_file"
24
24
  require_relative "firecrawl/models/parse_options"
25
+ require_relative "firecrawl/models/parse_format"
25
26
  require_relative "firecrawl/models/agent_options"
26
27
  require_relative "firecrawl/models/agent_response"
27
28
  require_relative "firecrawl/models/agent_list_response"
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.17.0
4
+ version: 1.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Firecrawl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-09-08 00:00:00.000000000 Z
11
+ date: 2026-10-02 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.
@@ -45,6 +45,7 @@ files:
45
45
  - lib/firecrawl/models/menu_profile.rb
46
46
  - lib/firecrawl/models/monitor.rb
47
47
  - lib/firecrawl/models/parse_file.rb
48
+ - lib/firecrawl/models/parse_format.rb
48
49
  - lib/firecrawl/models/parse_options.rb
49
50
  - lib/firecrawl/models/pdf_parser.rb
50
51
  - lib/firecrawl/models/product_profile.rb