firecrawl 4.25.4 → 4.26.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.
package/audit-ci.jsonc CHANGED
@@ -1,4 +1,12 @@
1
1
  {
2
2
  "$schema": "https://github.com/IBM/audit-ci/raw/main/docs/schema.json",
3
- "low": true
3
+ "low": true,
4
+ "allowlist": [
5
+ // GHSA-h67p-54hq-rp68 (js-yaml):
6
+ // Jest coverage tooling still resolves a js-yaml 3.x line; the non-affected
7
+ // release is 4.x, so avoid a major-crossing override in this SDK package.
8
+ // Owner: team-engineering-reviewers. Tracking: create internal ticket.
9
+ // Expires: 2026-06-30.
10
+ "GHSA-h67p-54hq-rp68"
11
+ ]
4
12
  }
@@ -12,7 +12,7 @@ var require_package = __commonJS({
12
12
  "package.json"(exports, module) {
13
13
  module.exports = {
14
14
  name: "@mendable/firecrawl-js",
15
- version: "4.25.4",
15
+ version: "4.26.0",
16
16
  description: "JavaScript SDK for Firecrawl API",
17
17
  main: "dist/index.js",
18
18
  types: "dist/index.d.ts",
@@ -38,7 +38,7 @@ var require_package = __commonJS({
38
38
  author: "Mendable.ai",
39
39
  license: "MIT",
40
40
  dependencies: {
41
- axios: "1.16.1",
41
+ axios: "1.18.0",
42
42
  firecrawl: "4.16.0",
43
43
  "typescript-event-target": "^1.1.1",
44
44
  zod: "^3.23.8",
@@ -84,6 +84,8 @@ var require_package = __commonJS({
84
84
  "brace-expansion": ">=5.0.6",
85
85
  "axios@>=1.0.0 <1.16.0": "1.16.1",
86
86
  "follow-redirects@<1.16.0": ">=1.16.0 <2.0.0",
87
+ "form-data@>=4.0.0 <4.0.6": "4.0.6",
88
+ "@babel/core@>=7.0.0 <7.29.6": "7.29.7",
87
89
  "esbuild@>=0.17.0 <0.28.1": "0.28.1"
88
90
  }
89
91
  }
package/dist/index.cjs CHANGED
@@ -39,7 +39,7 @@ var require_package = __commonJS({
39
39
  "package.json"(exports2, module2) {
40
40
  module2.exports = {
41
41
  name: "@mendable/firecrawl-js",
42
- version: "4.25.4",
42
+ version: "4.26.0",
43
43
  description: "JavaScript SDK for Firecrawl API",
44
44
  main: "dist/index.js",
45
45
  types: "dist/index.d.ts",
@@ -65,7 +65,7 @@ var require_package = __commonJS({
65
65
  author: "Mendable.ai",
66
66
  license: "MIT",
67
67
  dependencies: {
68
- axios: "1.16.1",
68
+ axios: "1.18.0",
69
69
  firecrawl: "4.16.0",
70
70
  "typescript-event-target": "^1.1.1",
71
71
  zod: "^3.23.8",
@@ -111,6 +111,8 @@ var require_package = __commonJS({
111
111
  "brace-expansion": ">=5.0.6",
112
112
  "axios@>=1.0.0 <1.16.0": "1.16.1",
113
113
  "follow-redirects@<1.16.0": ">=1.16.0 <2.0.0",
114
+ "form-data@>=4.0.0 <4.0.6": "4.0.6",
115
+ "@babel/core@>=7.0.0 <7.29.6": "7.29.7",
114
116
  "esbuild@>=0.17.0 <0.28.1": "0.28.1"
115
117
  }
116
118
  }
@@ -164,7 +166,10 @@ var HttpClient = class {
164
166
  baseURL: this.apiUrl,
165
167
  timeout: options.timeoutMs ?? 3e5,
166
168
  headers: {
167
- Authorization: `Bearer ${this.apiKey}`
169
+ // Omit the Authorization header entirely when no API key is set so that
170
+ // scrape/search/interact can use the keyless free tier (the cloud only
171
+ // grants it when no Authorization header is present).
172
+ ...this.apiKey ? { Authorization: `Bearer ${this.apiKey}` } : {}
168
173
  },
169
174
  transitional: { clarifyTimeoutError: true }
170
175
  });
@@ -1945,9 +1950,6 @@ var FirecrawlClient = class {
1945
1950
  const opts = typeof options === "string" ? { apiKey: options } : options;
1946
1951
  const apiKey = (opts.apiKey ?? process.env.FIRECRAWL_API_KEY ?? "").trim();
1947
1952
  const apiUrl = (opts.apiUrl ?? process.env.FIRECRAWL_API_URL ?? "https://api.firecrawl.dev").replace(/\/$/, "");
1948
- if (this.isCloudService(apiUrl) && !apiKey) {
1949
- throw new Error("API key is required for the cloud API. Set FIRECRAWL_API_KEY env or pass apiKey.");
1950
- }
1951
1953
  this.http = new HttpClient({
1952
1954
  apiKey,
1953
1955
  apiUrl,
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  require_package
3
- } from "./chunk-BVQPX6RA.js";
3
+ } from "./chunk-P63N5KWQ.js";
4
4
 
5
5
  // src/v2/utils/httpClient.ts
6
6
  import axios from "axios";
@@ -34,7 +34,10 @@ var HttpClient = class {
34
34
  baseURL: this.apiUrl,
35
35
  timeout: options.timeoutMs ?? 3e5,
36
36
  headers: {
37
- Authorization: `Bearer ${this.apiKey}`
37
+ // Omit the Authorization header entirely when no API key is set so that
38
+ // scrape/search/interact can use the keyless free tier (the cloud only
39
+ // grants it when no Authorization header is present).
40
+ ...this.apiKey ? { Authorization: `Bearer ${this.apiKey}` } : {}
38
41
  },
39
42
  transitional: { clarifyTimeoutError: true }
40
43
  });
@@ -1815,9 +1818,6 @@ var FirecrawlClient = class {
1815
1818
  const opts = typeof options === "string" ? { apiKey: options } : options;
1816
1819
  const apiKey = (opts.apiKey ?? process.env.FIRECRAWL_API_KEY ?? "").trim();
1817
1820
  const apiUrl = (opts.apiUrl ?? process.env.FIRECRAWL_API_URL ?? "https://api.firecrawl.dev").replace(/\/$/, "");
1818
- if (this.isCloudService(apiUrl) && !apiKey) {
1819
- throw new Error("API key is required for the cloud API. Set FIRECRAWL_API_KEY env or pass apiKey.");
1820
- }
1821
1821
  this.http = new HttpClient({
1822
1822
  apiKey,
1823
1823
  apiUrl,
@@ -2244,7 +2244,7 @@ var FirecrawlApp = class {
2244
2244
  if (typeof process !== "undefined" && process.env && process.env.npm_package_version) {
2245
2245
  return process.env.npm_package_version;
2246
2246
  }
2247
- const packageJson = await import("./package-4T5PXLTT.js");
2247
+ const packageJson = await import("./package-VYUXJRD4.js");
2248
2248
  return packageJson.default.version;
2249
2249
  } catch (error) {
2250
2250
  const isTest = typeof process !== "undefined" && (process.env.JEST_WORKER_ID != null || false);
@@ -1,4 +1,4 @@
1
1
  import {
2
2
  require_package
3
- } from "./chunk-BVQPX6RA.js";
3
+ } from "./chunk-P63N5KWQ.js";
4
4
  export default require_package();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "firecrawl",
3
- "version": "4.25.4",
3
+ "version": "4.26.0",
4
4
  "description": "JavaScript SDK for Firecrawl API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -19,7 +19,7 @@
19
19
  "author": "Mendable.ai",
20
20
  "license": "MIT",
21
21
  "dependencies": {
22
- "axios": "1.16.1",
22
+ "axios": "1.18.0",
23
23
  "typescript-event-target": "^1.1.1",
24
24
  "zod": "^3.23.8",
25
25
  "zod-to-json-schema": "^3.23.0"
@@ -67,12 +67,11 @@ describe('Firecrawl v2 Client Options', () => {
67
67
  expect(client).toBeInstanceOf(FirecrawlClient);
68
68
  });
69
69
 
70
- it('should throw for empty string API key on cloud', () => {
71
- expect(() => new Firecrawl('')).toThrow('API key is required');
72
- });
73
-
74
- it('should throw for whitespace-only string API key on cloud', () => {
75
- expect(() => new Firecrawl(' ')).toThrow('API key is required');
70
+ it('should construct without an API key for the keyless free tier', () => {
71
+ // No key: scrape/search/interact use the keyless free tier; the SDK no
72
+ // longer throws at construction.
73
+ expect(() => new Firecrawl('')).not.toThrow();
74
+ expect(() => new Firecrawl(' ')).not.toThrow();
76
75
  });
77
76
 
78
77
  it('should provide v1 accessor when constructed with string', () => {
package/src/v2/client.ts CHANGED
@@ -137,9 +137,9 @@ export class FirecrawlClient {
137
137
  const apiKey = (opts.apiKey ?? process.env.FIRECRAWL_API_KEY ?? "").trim();
138
138
  const apiUrl = (opts.apiUrl ?? process.env.FIRECRAWL_API_URL ?? "https://api.firecrawl.dev").replace(/\/$/, "");
139
139
 
140
- if (this.isCloudService(apiUrl) && !apiKey) {
141
- throw new Error("API key is required for the cloud API. Set FIRECRAWL_API_KEY env or pass apiKey.");
142
- }
140
+ // No API key is allowed: scrape, search, and interact fall back to the
141
+ // keyless free tier (rate-limited per IP). Other methods will return 401
142
+ // from the API until a key is provided.
143
143
 
144
144
  this.http = new HttpClient({
145
145
  apiKey,
@@ -34,7 +34,10 @@ export class HttpClient {
34
34
  baseURL: this.apiUrl,
35
35
  timeout: options.timeoutMs ?? 300000,
36
36
  headers: {
37
- Authorization: `Bearer ${this.apiKey}`,
37
+ // Omit the Authorization header entirely when no API key is set so that
38
+ // scrape/search/interact can use the keyless free tier (the cloud only
39
+ // grants it when no Authorization header is present).
40
+ ...(this.apiKey ? { Authorization: `Bearer ${this.apiKey}` } : {}),
38
41
  },
39
42
  transitional: { clarifyTimeoutError: true },
40
43
  });