firecrawl 4.25.0 → 4.25.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.
package/README.md CHANGED
@@ -7,7 +7,7 @@ The Firecrawl Node SDK is a library that lets you easily search, scrape, and int
7
7
  To install the Firecrawl Node SDK, you can use npm:
8
8
 
9
9
  ```bash
10
- npm install @mendable/firecrawl-js
10
+ npm install firecrawl
11
11
  ```
12
12
 
13
13
  ## Usage
@@ -18,7 +18,7 @@ npm install @mendable/firecrawl-js
18
18
  Here's an example of how to use the SDK with error handling:
19
19
 
20
20
  ```js
21
- import Firecrawl from '@mendable/firecrawl-js';
21
+ import { Firecrawl } from 'firecrawl';
22
22
 
23
23
  const app = new Firecrawl({ apiKey: 'fc-YOUR_API_KEY' });
24
24
 
@@ -114,7 +114,7 @@ const status = await app.getCrawlStatus(id);
114
114
  Use `extract` with a prompt and schema. Zod schemas are supported directly.
115
115
 
116
116
  ```js
117
- import Firecrawl from '@mendable/firecrawl-js';
117
+ import { Firecrawl } from 'firecrawl';
118
118
  import { z } from 'zod';
119
119
 
120
120
  const app = new Firecrawl({ apiKey: 'fc-YOUR_API_KEY' });
@@ -236,7 +236,7 @@ await watch.start();
236
236
  The feature‑frozen v1 is still available under `app.v1` with the original method names.
237
237
 
238
238
  ```js
239
- import Firecrawl from '@mendable/firecrawl-js';
239
+ import { Firecrawl } from 'firecrawl';
240
240
 
241
241
  const app = new Firecrawl({ apiKey: 'fc-YOUR_API_KEY' });
242
242
 
@@ -8,7 +8,7 @@ var require_package = __commonJS({
8
8
  "package.json"(exports, module) {
9
9
  module.exports = {
10
10
  name: "@mendable/firecrawl-js",
11
- version: "4.25.0",
11
+ version: "4.25.2",
12
12
  description: "JavaScript SDK for Firecrawl API",
13
13
  main: "dist/index.js",
14
14
  types: "dist/index.d.ts",
@@ -34,7 +34,7 @@ var require_package = __commonJS({
34
34
  author: "Mendable.ai",
35
35
  license: "MIT",
36
36
  dependencies: {
37
- axios: "1.15.2",
37
+ axios: "1.16.1",
38
38
  firecrawl: "4.16.0",
39
39
  "typescript-event-target": "^1.1.1",
40
40
  zod: "^3.23.8",
@@ -78,7 +78,7 @@ var require_package = __commonJS({
78
78
  "picomatch@<4.0.4": ">=4.0.4",
79
79
  handlebars: ">=4.7.9",
80
80
  "brace-expansion": ">=5.0.6",
81
- "axios@<1.15.2": "1.15.2",
81
+ "axios@>=1.0.0 <1.16.0": "1.16.1",
82
82
  "follow-redirects@<1.16.0": ">=1.16.0 <2.0.0"
83
83
  }
84
84
  }
package/dist/index.cjs CHANGED
@@ -35,7 +35,7 @@ var require_package = __commonJS({
35
35
  "package.json"(exports2, module2) {
36
36
  module2.exports = {
37
37
  name: "@mendable/firecrawl-js",
38
- version: "4.25.0",
38
+ version: "4.25.2",
39
39
  description: "JavaScript SDK for Firecrawl API",
40
40
  main: "dist/index.js",
41
41
  types: "dist/index.d.ts",
@@ -61,7 +61,7 @@ var require_package = __commonJS({
61
61
  author: "Mendable.ai",
62
62
  license: "MIT",
63
63
  dependencies: {
64
- axios: "1.15.2",
64
+ axios: "1.16.1",
65
65
  firecrawl: "4.16.0",
66
66
  "typescript-event-target": "^1.1.1",
67
67
  zod: "^3.23.8",
@@ -105,7 +105,7 @@ var require_package = __commonJS({
105
105
  "picomatch@<4.0.4": ">=4.0.4",
106
106
  handlebars: ">=4.7.9",
107
107
  "brace-expansion": ">=5.0.6",
108
- "axios@<1.15.2": "1.15.2",
108
+ "axios@>=1.0.0 <1.16.0": "1.16.1",
109
109
  "follow-redirects@<1.16.0": ">=1.16.0 <2.0.0"
110
110
  }
111
111
  }
package/dist/index.d.cts CHANGED
@@ -4,7 +4,7 @@ import { AxiosResponse, AxiosRequestHeaders } from 'axios';
4
4
  import { EventEmitter } from 'events';
5
5
  import { TypedEventTarget } from 'typescript-event-target';
6
6
 
7
- type FormatString = "markdown" | "html" | "rawHtml" | "links" | "images" | "screenshot" | "summary" | "changeTracking" | "json" | "attributes" | "branding" | "audio" | "video";
7
+ type FormatString = "markdown" | "html" | "rawHtml" | "links" | "images" | "screenshot" | "summary" | "changeTracking" | "json" | "attributes" | "branding" | "audio" | "video" | "pii";
8
8
  interface Viewport {
9
9
  width: number;
10
10
  height: number;
@@ -140,6 +140,7 @@ interface ScrapeOptions {
140
140
  minAge?: number;
141
141
  storeInCache?: boolean;
142
142
  lockdown?: boolean;
143
+ redactPII?: boolean | RedactPIIOptions;
143
144
  profile?: {
144
145
  name: string;
145
146
  saveChanges?: boolean;
@@ -147,6 +148,51 @@ interface ScrapeOptions {
147
148
  integration?: string;
148
149
  origin?: string;
149
150
  }
151
+ type RedactPIIEntity = "PERSON" | "EMAIL" | "PHONE" | "LOCATION" | "FINANCIAL" | "SECRET";
152
+ interface RedactPIIOptions {
153
+ /**
154
+ * accurate (default): model-only redaction. Best precision, cleanest output.
155
+ * aggressive: model + Presidio + spaCy. Higher recall at the cost of precision.
156
+ * fast: Presidio only, no model call. Lower F1, ~2x throughput.
157
+ */
158
+ mode?: "accurate" | "aggressive" | "fast";
159
+ /** Restrict redaction to these entity buckets. Unset means all entities. */
160
+ entities?: RedactPIIEntity[];
161
+ /**
162
+ * tag (default): replace spans with `<KIND>` placeholders.
163
+ * mask: replace spans with `*` of equal length.
164
+ * remove: drop span characters entirely.
165
+ */
166
+ replaceStyle?: "tag" | "mask" | "remove";
167
+ }
168
+ type PIISource = "model" | "heuristics" | "unknown";
169
+ interface PIISpan {
170
+ start: number;
171
+ end: number;
172
+ /** Unified entity bucket. Omitted when `kind` doesn't map onto one. */
173
+ entity?: RedactPIIEntity;
174
+ /** Granular recognizer label from fire-privacy. */
175
+ kind: string;
176
+ source: PIISource;
177
+ /** Confidence in [0, 1] when supplied. */
178
+ score?: number;
179
+ }
180
+ /**
181
+ * - ok: redaction completed; redactedMarkdown is the result.
182
+ * - skipped: redaction was not performed; see `reason`.
183
+ * - failed: redaction was attempted but did not produce a usable result.
184
+ */
185
+ type PIIStatus = "ok" | "skipped" | "failed";
186
+ /** Always set when status !== "ok". */
187
+ type PIIReason = "empty_input" | "too_large" | "upstream_skipped" | "service_unavailable" | "timeout" | "error";
188
+ interface PIIBlock {
189
+ status: PIIStatus;
190
+ reason?: PIIReason;
191
+ redactedMarkdown: string | null;
192
+ spans: PIISpan[];
193
+ /** Span count per entity bucket. Only non-zero entries are present. */
194
+ counts: Partial<Record<RedactPIIEntity, number>>;
195
+ }
150
196
  type ParseFileData = Blob | File | Buffer | Uint8Array | ArrayBuffer | string;
151
197
  interface ParseFile {
152
198
  data: ParseFileData;
@@ -364,6 +410,7 @@ interface Document {
364
410
  warning?: string;
365
411
  changeTracking?: Record<string, unknown>;
366
412
  branding?: BrandingProfile;
413
+ pii?: PIIBlock;
367
414
  }
368
415
  interface PaginationConfig {
369
416
  /** When true (default), automatically follow `next` links and aggregate all documents. */
@@ -522,6 +569,24 @@ interface MonitorEmailNotification {
522
569
  recipients?: string[];
523
570
  includeDiffs?: boolean;
524
571
  }
572
+ /**
573
+ * Per-recipient opt-in state for monitor email notifications.
574
+ *
575
+ * External recipients (not members of the team that owns the monitor) must
576
+ * confirm their subscription via a one-time email before they receive any
577
+ * monitor notifications. Team members are auto-confirmed.
578
+ *
579
+ * - `pending` → confirmation email sent, no notifications yet
580
+ * - `confirmed` → notifications enabled
581
+ * - `unsubscribed` → recipient opted out and cannot be re-added without a new
582
+ * confirmation flow
583
+ */
584
+ interface MonitorEmailRecipientSubscription {
585
+ email: string;
586
+ status: "pending" | "confirmed" | "unsubscribed";
587
+ source: "team" | "opt_in" | "legacy";
588
+ confirmationEmailSent?: boolean;
589
+ }
525
590
  interface MonitorNotification {
526
591
  email?: MonitorEmailNotification;
527
592
  }
@@ -585,6 +650,13 @@ interface Monitor {
585
650
  targets: MonitorTarget[];
586
651
  webhook?: MonitorWebhookConfig | null;
587
652
  notification?: MonitorNotification | null;
653
+ /**
654
+ * Present on create/update/get responses. Reflects the opt-in state of every
655
+ * email recipient currently configured on the monitor. Absent when the API
656
+ * has not reconciled recipients (e.g. team-default delivery with no
657
+ * explicit recipients).
658
+ */
659
+ emailRecipientSubscriptions?: MonitorEmailRecipientSubscription[];
588
660
  retentionDays: number;
589
661
  estimatedCreditsPerMonth?: number | null;
590
662
  lastCheckSummary?: MonitorSummary | null;
@@ -597,7 +669,12 @@ interface MonitorPageJudgment {
597
669
  meaningful: boolean;
598
670
  confidence: "high" | "medium" | "low";
599
671
  reason: string;
600
- fields: string[];
672
+ meaningfulChanges: Array<{
673
+ type: "added" | "removed" | "changed";
674
+ before: string | null;
675
+ after: string | null;
676
+ reason: string;
677
+ }>;
601
678
  }
602
679
  interface MonitorCheck {
603
680
  id: string;
@@ -2203,4 +2280,4 @@ declare class Firecrawl extends FirecrawlClient {
2203
2280
  get v1(): FirecrawlApp;
2204
2281
  }
2205
2282
 
2206
- export { type ActionOption, type ActiveCrawl, type ActiveCrawlsResponse, type AgentOptions$1 as AgentOptions, type AgentResponse, type AgentStatusResponse, type AgentWebhookConfig, type AgentWebhookEvent, type AttributesFormat, type BatchScrapeJob, type BatchScrapeOptions, type BatchScrapeResponse$1 as BatchScrapeResponse, type BrandingProfile, type BrowserCreateResponse, type BrowserDeleteResponse, type BrowserExecuteResponse, type BrowserListResponse, type BrowserSession, type CategoryOption, type ChangeTrackingFormat, type ClickAction, type ConcurrencyCheck, type CrawlErrorsResponse$1 as CrawlErrorsResponse, type CrawlJob, type CrawlOptions, type CrawlResponse$1 as CrawlResponse, type CreateMonitorRequest, type CreditUsage, type CreditUsageHistoricalPeriod, type CreditUsageHistoricalResponse, type Document, type DocumentMetadata, type ErrorDetails, type ExecuteJavascriptAction, type ExtractResponse$1 as ExtractResponse, Firecrawl, FirecrawlApp as FirecrawlAppV1, FirecrawlClient, type FirecrawlClientInput, type FirecrawlClientOptions, type Format, type FormatOption, type FormatString, type GetMonitorCheckOptions, type HighlightsFormat, JobTimeoutError, type JsonFormat, type ListMonitorChecksOptions, type ListMonitorsOptions, type LocationConfig$1 as LocationConfig, type MapData, type MapOptions, type Monitor, type MonitorCheck, type MonitorCheckDetail, type MonitorCheckPage, type MonitorCrawlTarget, type MonitorEmailNotification, type MonitorJsonFieldDiff, type MonitorNotification, type MonitorPageDiff, type MonitorPageJudgment, type MonitorPageSnapshot, type MonitorSchedule, type MonitorScrapeTarget, type MonitorSummary, type MonitorTarget, type MonitorWebhookConfig, type PDFAction, type PaginationConfig, type ParseFile, type ParseFileData, type ParseFormat, type ParseFormatOption, type ParseFormatString, type ParseOptions, type PressAction, type QueryFormat, type QuestionFormat, type QueueStatusResponse$1 as QueueStatusResponse, type ScrapeAction, type ScrapeBrowserDeleteResponse, type ScrapeExecuteRequest, type ScrapeExecuteResponse, type ScrapeOptions, type ScreenshotAction, type ScreenshotFormat, type ScrollAction, SdkError, type SearchData, type SearchRequest, type SearchResultImages, type SearchResultNews, type SearchResultWeb, type TokenUsage, type TokenUsageHistoricalPeriod, type TokenUsageHistoricalResponse, type UpdateMonitorRequest, type Viewport, type WaitAction, Watcher, type WatcherOptions, type WebhookConfig, type WriteAction, Firecrawl as default };
2283
+ export { type ActionOption, type ActiveCrawl, type ActiveCrawlsResponse, type AgentOptions$1 as AgentOptions, type AgentResponse, type AgentStatusResponse, type AgentWebhookConfig, type AgentWebhookEvent, type AttributesFormat, type BatchScrapeJob, type BatchScrapeOptions, type BatchScrapeResponse$1 as BatchScrapeResponse, type BrandingProfile, type BrowserCreateResponse, type BrowserDeleteResponse, type BrowserExecuteResponse, type BrowserListResponse, type BrowserSession, type CategoryOption, type ChangeTrackingFormat, type ClickAction, type ConcurrencyCheck, type CrawlErrorsResponse$1 as CrawlErrorsResponse, type CrawlJob, type CrawlOptions, type CrawlResponse$1 as CrawlResponse, type CreateMonitorRequest, type CreditUsage, type CreditUsageHistoricalPeriod, type CreditUsageHistoricalResponse, type Document, type DocumentMetadata, type ErrorDetails, type ExecuteJavascriptAction, type ExtractResponse$1 as ExtractResponse, Firecrawl, FirecrawlApp as FirecrawlAppV1, FirecrawlClient, type FirecrawlClientInput, type FirecrawlClientOptions, type Format, type FormatOption, type FormatString, type GetMonitorCheckOptions, type HighlightsFormat, JobTimeoutError, type JsonFormat, type ListMonitorChecksOptions, type ListMonitorsOptions, type LocationConfig$1 as LocationConfig, type MapData, type MapOptions, type Monitor, type MonitorCheck, type MonitorCheckDetail, type MonitorCheckPage, type MonitorCrawlTarget, type MonitorEmailNotification, type MonitorEmailRecipientSubscription, type MonitorJsonFieldDiff, type MonitorNotification, type MonitorPageDiff, type MonitorPageJudgment, type MonitorPageSnapshot, type MonitorSchedule, type MonitorScrapeTarget, type MonitorSummary, type MonitorTarget, type MonitorWebhookConfig, type PDFAction, type PIIBlock, type PIIReason, type PIISource, type PIISpan, type PIIStatus, type PaginationConfig, type ParseFile, type ParseFileData, type ParseFormat, type ParseFormatOption, type ParseFormatString, type ParseOptions, type PressAction, type QueryFormat, type QuestionFormat, type QueueStatusResponse$1 as QueueStatusResponse, type RedactPIIEntity, type RedactPIIOptions, type ScrapeAction, type ScrapeBrowserDeleteResponse, type ScrapeExecuteRequest, type ScrapeExecuteResponse, type ScrapeOptions, type ScreenshotAction, type ScreenshotFormat, type ScrollAction, SdkError, type SearchData, type SearchRequest, type SearchResultImages, type SearchResultNews, type SearchResultWeb, type TokenUsage, type TokenUsageHistoricalPeriod, type TokenUsageHistoricalResponse, type UpdateMonitorRequest, type Viewport, type WaitAction, Watcher, type WatcherOptions, type WebhookConfig, type WriteAction, Firecrawl as default };
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ import { AxiosResponse, AxiosRequestHeaders } from 'axios';
4
4
  import { EventEmitter } from 'events';
5
5
  import { TypedEventTarget } from 'typescript-event-target';
6
6
 
7
- type FormatString = "markdown" | "html" | "rawHtml" | "links" | "images" | "screenshot" | "summary" | "changeTracking" | "json" | "attributes" | "branding" | "audio" | "video";
7
+ type FormatString = "markdown" | "html" | "rawHtml" | "links" | "images" | "screenshot" | "summary" | "changeTracking" | "json" | "attributes" | "branding" | "audio" | "video" | "pii";
8
8
  interface Viewport {
9
9
  width: number;
10
10
  height: number;
@@ -140,6 +140,7 @@ interface ScrapeOptions {
140
140
  minAge?: number;
141
141
  storeInCache?: boolean;
142
142
  lockdown?: boolean;
143
+ redactPII?: boolean | RedactPIIOptions;
143
144
  profile?: {
144
145
  name: string;
145
146
  saveChanges?: boolean;
@@ -147,6 +148,51 @@ interface ScrapeOptions {
147
148
  integration?: string;
148
149
  origin?: string;
149
150
  }
151
+ type RedactPIIEntity = "PERSON" | "EMAIL" | "PHONE" | "LOCATION" | "FINANCIAL" | "SECRET";
152
+ interface RedactPIIOptions {
153
+ /**
154
+ * accurate (default): model-only redaction. Best precision, cleanest output.
155
+ * aggressive: model + Presidio + spaCy. Higher recall at the cost of precision.
156
+ * fast: Presidio only, no model call. Lower F1, ~2x throughput.
157
+ */
158
+ mode?: "accurate" | "aggressive" | "fast";
159
+ /** Restrict redaction to these entity buckets. Unset means all entities. */
160
+ entities?: RedactPIIEntity[];
161
+ /**
162
+ * tag (default): replace spans with `<KIND>` placeholders.
163
+ * mask: replace spans with `*` of equal length.
164
+ * remove: drop span characters entirely.
165
+ */
166
+ replaceStyle?: "tag" | "mask" | "remove";
167
+ }
168
+ type PIISource = "model" | "heuristics" | "unknown";
169
+ interface PIISpan {
170
+ start: number;
171
+ end: number;
172
+ /** Unified entity bucket. Omitted when `kind` doesn't map onto one. */
173
+ entity?: RedactPIIEntity;
174
+ /** Granular recognizer label from fire-privacy. */
175
+ kind: string;
176
+ source: PIISource;
177
+ /** Confidence in [0, 1] when supplied. */
178
+ score?: number;
179
+ }
180
+ /**
181
+ * - ok: redaction completed; redactedMarkdown is the result.
182
+ * - skipped: redaction was not performed; see `reason`.
183
+ * - failed: redaction was attempted but did not produce a usable result.
184
+ */
185
+ type PIIStatus = "ok" | "skipped" | "failed";
186
+ /** Always set when status !== "ok". */
187
+ type PIIReason = "empty_input" | "too_large" | "upstream_skipped" | "service_unavailable" | "timeout" | "error";
188
+ interface PIIBlock {
189
+ status: PIIStatus;
190
+ reason?: PIIReason;
191
+ redactedMarkdown: string | null;
192
+ spans: PIISpan[];
193
+ /** Span count per entity bucket. Only non-zero entries are present. */
194
+ counts: Partial<Record<RedactPIIEntity, number>>;
195
+ }
150
196
  type ParseFileData = Blob | File | Buffer | Uint8Array | ArrayBuffer | string;
151
197
  interface ParseFile {
152
198
  data: ParseFileData;
@@ -364,6 +410,7 @@ interface Document {
364
410
  warning?: string;
365
411
  changeTracking?: Record<string, unknown>;
366
412
  branding?: BrandingProfile;
413
+ pii?: PIIBlock;
367
414
  }
368
415
  interface PaginationConfig {
369
416
  /** When true (default), automatically follow `next` links and aggregate all documents. */
@@ -522,6 +569,24 @@ interface MonitorEmailNotification {
522
569
  recipients?: string[];
523
570
  includeDiffs?: boolean;
524
571
  }
572
+ /**
573
+ * Per-recipient opt-in state for monitor email notifications.
574
+ *
575
+ * External recipients (not members of the team that owns the monitor) must
576
+ * confirm their subscription via a one-time email before they receive any
577
+ * monitor notifications. Team members are auto-confirmed.
578
+ *
579
+ * - `pending` → confirmation email sent, no notifications yet
580
+ * - `confirmed` → notifications enabled
581
+ * - `unsubscribed` → recipient opted out and cannot be re-added without a new
582
+ * confirmation flow
583
+ */
584
+ interface MonitorEmailRecipientSubscription {
585
+ email: string;
586
+ status: "pending" | "confirmed" | "unsubscribed";
587
+ source: "team" | "opt_in" | "legacy";
588
+ confirmationEmailSent?: boolean;
589
+ }
525
590
  interface MonitorNotification {
526
591
  email?: MonitorEmailNotification;
527
592
  }
@@ -585,6 +650,13 @@ interface Monitor {
585
650
  targets: MonitorTarget[];
586
651
  webhook?: MonitorWebhookConfig | null;
587
652
  notification?: MonitorNotification | null;
653
+ /**
654
+ * Present on create/update/get responses. Reflects the opt-in state of every
655
+ * email recipient currently configured on the monitor. Absent when the API
656
+ * has not reconciled recipients (e.g. team-default delivery with no
657
+ * explicit recipients).
658
+ */
659
+ emailRecipientSubscriptions?: MonitorEmailRecipientSubscription[];
588
660
  retentionDays: number;
589
661
  estimatedCreditsPerMonth?: number | null;
590
662
  lastCheckSummary?: MonitorSummary | null;
@@ -597,7 +669,12 @@ interface MonitorPageJudgment {
597
669
  meaningful: boolean;
598
670
  confidence: "high" | "medium" | "low";
599
671
  reason: string;
600
- fields: string[];
672
+ meaningfulChanges: Array<{
673
+ type: "added" | "removed" | "changed";
674
+ before: string | null;
675
+ after: string | null;
676
+ reason: string;
677
+ }>;
601
678
  }
602
679
  interface MonitorCheck {
603
680
  id: string;
@@ -2203,4 +2280,4 @@ declare class Firecrawl extends FirecrawlClient {
2203
2280
  get v1(): FirecrawlApp;
2204
2281
  }
2205
2282
 
2206
- export { type ActionOption, type ActiveCrawl, type ActiveCrawlsResponse, type AgentOptions$1 as AgentOptions, type AgentResponse, type AgentStatusResponse, type AgentWebhookConfig, type AgentWebhookEvent, type AttributesFormat, type BatchScrapeJob, type BatchScrapeOptions, type BatchScrapeResponse$1 as BatchScrapeResponse, type BrandingProfile, type BrowserCreateResponse, type BrowserDeleteResponse, type BrowserExecuteResponse, type BrowserListResponse, type BrowserSession, type CategoryOption, type ChangeTrackingFormat, type ClickAction, type ConcurrencyCheck, type CrawlErrorsResponse$1 as CrawlErrorsResponse, type CrawlJob, type CrawlOptions, type CrawlResponse$1 as CrawlResponse, type CreateMonitorRequest, type CreditUsage, type CreditUsageHistoricalPeriod, type CreditUsageHistoricalResponse, type Document, type DocumentMetadata, type ErrorDetails, type ExecuteJavascriptAction, type ExtractResponse$1 as ExtractResponse, Firecrawl, FirecrawlApp as FirecrawlAppV1, FirecrawlClient, type FirecrawlClientInput, type FirecrawlClientOptions, type Format, type FormatOption, type FormatString, type GetMonitorCheckOptions, type HighlightsFormat, JobTimeoutError, type JsonFormat, type ListMonitorChecksOptions, type ListMonitorsOptions, type LocationConfig$1 as LocationConfig, type MapData, type MapOptions, type Monitor, type MonitorCheck, type MonitorCheckDetail, type MonitorCheckPage, type MonitorCrawlTarget, type MonitorEmailNotification, type MonitorJsonFieldDiff, type MonitorNotification, type MonitorPageDiff, type MonitorPageJudgment, type MonitorPageSnapshot, type MonitorSchedule, type MonitorScrapeTarget, type MonitorSummary, type MonitorTarget, type MonitorWebhookConfig, type PDFAction, type PaginationConfig, type ParseFile, type ParseFileData, type ParseFormat, type ParseFormatOption, type ParseFormatString, type ParseOptions, type PressAction, type QueryFormat, type QuestionFormat, type QueueStatusResponse$1 as QueueStatusResponse, type ScrapeAction, type ScrapeBrowserDeleteResponse, type ScrapeExecuteRequest, type ScrapeExecuteResponse, type ScrapeOptions, type ScreenshotAction, type ScreenshotFormat, type ScrollAction, SdkError, type SearchData, type SearchRequest, type SearchResultImages, type SearchResultNews, type SearchResultWeb, type TokenUsage, type TokenUsageHistoricalPeriod, type TokenUsageHistoricalResponse, type UpdateMonitorRequest, type Viewport, type WaitAction, Watcher, type WatcherOptions, type WebhookConfig, type WriteAction, Firecrawl as default };
2283
+ export { type ActionOption, type ActiveCrawl, type ActiveCrawlsResponse, type AgentOptions$1 as AgentOptions, type AgentResponse, type AgentStatusResponse, type AgentWebhookConfig, type AgentWebhookEvent, type AttributesFormat, type BatchScrapeJob, type BatchScrapeOptions, type BatchScrapeResponse$1 as BatchScrapeResponse, type BrandingProfile, type BrowserCreateResponse, type BrowserDeleteResponse, type BrowserExecuteResponse, type BrowserListResponse, type BrowserSession, type CategoryOption, type ChangeTrackingFormat, type ClickAction, type ConcurrencyCheck, type CrawlErrorsResponse$1 as CrawlErrorsResponse, type CrawlJob, type CrawlOptions, type CrawlResponse$1 as CrawlResponse, type CreateMonitorRequest, type CreditUsage, type CreditUsageHistoricalPeriod, type CreditUsageHistoricalResponse, type Document, type DocumentMetadata, type ErrorDetails, type ExecuteJavascriptAction, type ExtractResponse$1 as ExtractResponse, Firecrawl, FirecrawlApp as FirecrawlAppV1, FirecrawlClient, type FirecrawlClientInput, type FirecrawlClientOptions, type Format, type FormatOption, type FormatString, type GetMonitorCheckOptions, type HighlightsFormat, JobTimeoutError, type JsonFormat, type ListMonitorChecksOptions, type ListMonitorsOptions, type LocationConfig$1 as LocationConfig, type MapData, type MapOptions, type Monitor, type MonitorCheck, type MonitorCheckDetail, type MonitorCheckPage, type MonitorCrawlTarget, type MonitorEmailNotification, type MonitorEmailRecipientSubscription, type MonitorJsonFieldDiff, type MonitorNotification, type MonitorPageDiff, type MonitorPageJudgment, type MonitorPageSnapshot, type MonitorSchedule, type MonitorScrapeTarget, type MonitorSummary, type MonitorTarget, type MonitorWebhookConfig, type PDFAction, type PIIBlock, type PIIReason, type PIISource, type PIISpan, type PIIStatus, type PaginationConfig, type ParseFile, type ParseFileData, type ParseFormat, type ParseFormatOption, type ParseFormatString, type ParseOptions, type PressAction, type QueryFormat, type QuestionFormat, type QueueStatusResponse$1 as QueueStatusResponse, type RedactPIIEntity, type RedactPIIOptions, type ScrapeAction, type ScrapeBrowserDeleteResponse, type ScrapeExecuteRequest, type ScrapeExecuteResponse, type ScrapeOptions, type ScreenshotAction, type ScreenshotFormat, type ScrollAction, SdkError, type SearchData, type SearchRequest, type SearchResultImages, type SearchResultNews, type SearchResultWeb, type TokenUsage, type TokenUsageHistoricalPeriod, type TokenUsageHistoricalResponse, type UpdateMonitorRequest, type Viewport, type WaitAction, Watcher, type WatcherOptions, type WebhookConfig, type WriteAction, Firecrawl as default };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  require_package
3
- } from "./chunk-46XQC2QL.js";
3
+ } from "./chunk-XCQC2QCZ.js";
4
4
 
5
5
  // src/v2/utils/httpClient.ts
6
6
  import axios from "axios";
@@ -2097,7 +2097,7 @@ var FirecrawlApp = class {
2097
2097
  if (typeof process !== "undefined" && process.env && process.env.npm_package_version) {
2098
2098
  return process.env.npm_package_version;
2099
2099
  }
2100
- const packageJson = await import("./package-MW3GMNCL.js");
2100
+ const packageJson = await import("./package-D6422PQU.js");
2101
2101
  return packageJson.default.version;
2102
2102
  } catch (error) {
2103
2103
  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-46XQC2QL.js";
3
+ } from "./chunk-XCQC2QCZ.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.0",
3
+ "version": "4.25.2",
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.15.2",
22
+ "axios": "1.16.1",
23
23
  "typescript-event-target": "^1.1.1",
24
24
  "zod": "^3.23.8",
25
25
  "zod-to-json-schema": "^3.23.0"
package/src/v2/types.ts CHANGED
@@ -14,7 +14,8 @@ export type FormatString =
14
14
  | "attributes"
15
15
  | "branding"
16
16
  | "audio"
17
- | "video";
17
+ | "video"
18
+ | "pii";
18
19
 
19
20
  export interface Viewport {
20
21
  width: number;
@@ -205,6 +206,7 @@ export interface ScrapeOptions {
205
206
  minAge?: number;
206
207
  storeInCache?: boolean;
207
208
  lockdown?: boolean;
209
+ redactPII?: boolean | RedactPIIOptions;
208
210
  profile?: {
209
211
  name: string;
210
212
  saveChanges?: boolean;
@@ -213,6 +215,70 @@ export interface ScrapeOptions {
213
215
  origin?: string;
214
216
  }
215
217
 
218
+ export type RedactPIIEntity =
219
+ | "PERSON"
220
+ | "EMAIL"
221
+ | "PHONE"
222
+ | "LOCATION"
223
+ | "FINANCIAL"
224
+ | "SECRET";
225
+
226
+ export interface RedactPIIOptions {
227
+ /**
228
+ * accurate (default): model-only redaction. Best precision, cleanest output.
229
+ * aggressive: model + Presidio + spaCy. Higher recall at the cost of precision.
230
+ * fast: Presidio only, no model call. Lower F1, ~2x throughput.
231
+ */
232
+ mode?: "accurate" | "aggressive" | "fast";
233
+ /** Restrict redaction to these entity buckets. Unset means all entities. */
234
+ entities?: RedactPIIEntity[];
235
+ /**
236
+ * tag (default): replace spans with `<KIND>` placeholders.
237
+ * mask: replace spans with `*` of equal length.
238
+ * remove: drop span characters entirely.
239
+ */
240
+ replaceStyle?: "tag" | "mask" | "remove";
241
+ }
242
+
243
+ export type PIISource = "model" | "heuristics" | "unknown";
244
+
245
+ export interface PIISpan {
246
+ start: number;
247
+ end: number;
248
+ /** Unified entity bucket. Omitted when `kind` doesn't map onto one. */
249
+ entity?: RedactPIIEntity;
250
+ /** Granular recognizer label from fire-privacy. */
251
+ kind: string;
252
+ source: PIISource;
253
+ /** Confidence in [0, 1] when supplied. */
254
+ score?: number;
255
+ }
256
+
257
+ /**
258
+ * - ok: redaction completed; redactedMarkdown is the result.
259
+ * - skipped: redaction was not performed; see `reason`.
260
+ * - failed: redaction was attempted but did not produce a usable result.
261
+ */
262
+ export type PIIStatus = "ok" | "skipped" | "failed";
263
+
264
+ /** Always set when status !== "ok". */
265
+ export type PIIReason =
266
+ | "empty_input"
267
+ | "too_large"
268
+ | "upstream_skipped"
269
+ | "service_unavailable"
270
+ | "timeout"
271
+ | "error";
272
+
273
+ export interface PIIBlock {
274
+ status: PIIStatus;
275
+ reason?: PIIReason;
276
+ redactedMarkdown: string | null;
277
+ spans: PIISpan[];
278
+ /** Span count per entity bucket. Only non-zero entries are present. */
279
+ counts: Partial<Record<RedactPIIEntity, number>>;
280
+ }
281
+
216
282
  export type ParseFileData =
217
283
  | Blob
218
284
  | File
@@ -483,6 +549,7 @@ export interface Document {
483
549
  warning?: string;
484
550
  changeTracking?: Record<string, unknown>;
485
551
  branding?: BrandingProfile;
552
+ pii?: PIIBlock;
486
553
  }
487
554
 
488
555
  // Pagination configuration for auto-fetching pages from v2 endpoints that return a `next` URL
@@ -660,6 +727,25 @@ export interface MonitorEmailNotification {
660
727
  includeDiffs?: boolean;
661
728
  }
662
729
 
730
+ /**
731
+ * Per-recipient opt-in state for monitor email notifications.
732
+ *
733
+ * External recipients (not members of the team that owns the monitor) must
734
+ * confirm their subscription via a one-time email before they receive any
735
+ * monitor notifications. Team members are auto-confirmed.
736
+ *
737
+ * - `pending` → confirmation email sent, no notifications yet
738
+ * - `confirmed` → notifications enabled
739
+ * - `unsubscribed` → recipient opted out and cannot be re-added without a new
740
+ * confirmation flow
741
+ */
742
+ export interface MonitorEmailRecipientSubscription {
743
+ email: string;
744
+ status: "pending" | "confirmed" | "unsubscribed";
745
+ source: "team" | "opt_in" | "legacy";
746
+ confirmationEmailSent?: boolean;
747
+ }
748
+
663
749
  export interface MonitorNotification {
664
750
  email?: MonitorEmailNotification;
665
751
  }
@@ -731,6 +817,13 @@ export interface Monitor {
731
817
  targets: MonitorTarget[];
732
818
  webhook?: MonitorWebhookConfig | null;
733
819
  notification?: MonitorNotification | null;
820
+ /**
821
+ * Present on create/update/get responses. Reflects the opt-in state of every
822
+ * email recipient currently configured on the monitor. Absent when the API
823
+ * has not reconciled recipients (e.g. team-default delivery with no
824
+ * explicit recipients).
825
+ */
826
+ emailRecipientSubscriptions?: MonitorEmailRecipientSubscription[];
734
827
  retentionDays: number;
735
828
  estimatedCreditsPerMonth?: number | null;
736
829
  lastCheckSummary?: MonitorSummary | null;
@@ -744,7 +837,12 @@ export interface MonitorPageJudgment {
744
837
  meaningful: boolean;
745
838
  confidence: "high" | "medium" | "low";
746
839
  reason: string;
747
- fields: string[];
840
+ meaningfulChanges: Array<{
841
+ type: "added" | "removed" | "changed";
842
+ before: string | null;
843
+ after: string | null;
844
+ reason: string;
845
+ }>;
748
846
  }
749
847
 
750
848
  export interface MonitorCheck {