firecrawl 1.8.2 → 1.8.4
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/dist/index.cjs +3 -2
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -2
- package/package.json +1 -1
- package/src/index.ts +5 -2
package/dist/index.cjs
CHANGED
|
@@ -292,11 +292,12 @@ var FirecrawlApp = class {
|
|
|
292
292
|
* @param params - Additional parameters for the scrape request.
|
|
293
293
|
* @param pollInterval - Time in seconds for job status checks.
|
|
294
294
|
* @param idempotencyKey - Optional idempotency key for the request.
|
|
295
|
+
* @param webhook - Optional webhook for the batch scrape.
|
|
295
296
|
* @returns The response from the crawl operation.
|
|
296
297
|
*/
|
|
297
|
-
async batchScrapeUrls(urls, params, pollInterval = 2, idempotencyKey) {
|
|
298
|
+
async batchScrapeUrls(urls, params, pollInterval = 2, idempotencyKey, webhook) {
|
|
298
299
|
const headers = this.prepareHeaders(idempotencyKey);
|
|
299
|
-
let jsonData = { urls, ...params ?? {} };
|
|
300
|
+
let jsonData = { urls, ...params ?? {}, webhook };
|
|
300
301
|
try {
|
|
301
302
|
const response = await this.postRequest(
|
|
302
303
|
this.apiUrl + `/v1/batch/scrape`,
|
package/dist/index.d.cts
CHANGED
|
@@ -206,6 +206,7 @@ interface MapParams {
|
|
|
206
206
|
search?: string;
|
|
207
207
|
ignoreSitemap?: boolean;
|
|
208
208
|
includeSubdomains?: boolean;
|
|
209
|
+
sitemapOnly?: boolean;
|
|
209
210
|
limit?: number;
|
|
210
211
|
}
|
|
211
212
|
/**
|
|
@@ -303,9 +304,10 @@ declare class FirecrawlApp {
|
|
|
303
304
|
* @param params - Additional parameters for the scrape request.
|
|
304
305
|
* @param pollInterval - Time in seconds for job status checks.
|
|
305
306
|
* @param idempotencyKey - Optional idempotency key for the request.
|
|
307
|
+
* @param webhook - Optional webhook for the batch scrape.
|
|
306
308
|
* @returns The response from the crawl operation.
|
|
307
309
|
*/
|
|
308
|
-
batchScrapeUrls(urls: string[], params?: ScrapeParams, pollInterval?: number, idempotencyKey?: string): Promise<BatchScrapeStatusResponse | ErrorResponse>;
|
|
310
|
+
batchScrapeUrls(urls: string[], params?: ScrapeParams, pollInterval?: number, idempotencyKey?: string, webhook?: CrawlParams["webhook"]): Promise<BatchScrapeStatusResponse | ErrorResponse>;
|
|
309
311
|
asyncBatchScrapeUrls(urls: string[], params?: ScrapeParams, idempotencyKey?: string): Promise<BatchScrapeResponse | ErrorResponse>;
|
|
310
312
|
/**
|
|
311
313
|
* Initiates a batch scrape job and returns a CrawlWatcher to monitor the job via WebSocket.
|
package/dist/index.d.ts
CHANGED
|
@@ -206,6 +206,7 @@ interface MapParams {
|
|
|
206
206
|
search?: string;
|
|
207
207
|
ignoreSitemap?: boolean;
|
|
208
208
|
includeSubdomains?: boolean;
|
|
209
|
+
sitemapOnly?: boolean;
|
|
209
210
|
limit?: number;
|
|
210
211
|
}
|
|
211
212
|
/**
|
|
@@ -303,9 +304,10 @@ declare class FirecrawlApp {
|
|
|
303
304
|
* @param params - Additional parameters for the scrape request.
|
|
304
305
|
* @param pollInterval - Time in seconds for job status checks.
|
|
305
306
|
* @param idempotencyKey - Optional idempotency key for the request.
|
|
307
|
+
* @param webhook - Optional webhook for the batch scrape.
|
|
306
308
|
* @returns The response from the crawl operation.
|
|
307
309
|
*/
|
|
308
|
-
batchScrapeUrls(urls: string[], params?: ScrapeParams, pollInterval?: number, idempotencyKey?: string): Promise<BatchScrapeStatusResponse | ErrorResponse>;
|
|
310
|
+
batchScrapeUrls(urls: string[], params?: ScrapeParams, pollInterval?: number, idempotencyKey?: string, webhook?: CrawlParams["webhook"]): Promise<BatchScrapeStatusResponse | ErrorResponse>;
|
|
309
311
|
asyncBatchScrapeUrls(urls: string[], params?: ScrapeParams, idempotencyKey?: string): Promise<BatchScrapeResponse | ErrorResponse>;
|
|
310
312
|
/**
|
|
311
313
|
* Initiates a batch scrape job and returns a CrawlWatcher to monitor the job via WebSocket.
|
package/dist/index.js
CHANGED
|
@@ -256,11 +256,12 @@ var FirecrawlApp = class {
|
|
|
256
256
|
* @param params - Additional parameters for the scrape request.
|
|
257
257
|
* @param pollInterval - Time in seconds for job status checks.
|
|
258
258
|
* @param idempotencyKey - Optional idempotency key for the request.
|
|
259
|
+
* @param webhook - Optional webhook for the batch scrape.
|
|
259
260
|
* @returns The response from the crawl operation.
|
|
260
261
|
*/
|
|
261
|
-
async batchScrapeUrls(urls, params, pollInterval = 2, idempotencyKey) {
|
|
262
|
+
async batchScrapeUrls(urls, params, pollInterval = 2, idempotencyKey, webhook) {
|
|
262
263
|
const headers = this.prepareHeaders(idempotencyKey);
|
|
263
|
-
let jsonData = { urls, ...params ?? {} };
|
|
264
|
+
let jsonData = { urls, ...params ?? {}, webhook };
|
|
264
265
|
try {
|
|
265
266
|
const response = await this.postRequest(
|
|
266
267
|
this.apiUrl + `/v1/batch/scrape`,
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -221,6 +221,7 @@ export interface MapParams {
|
|
|
221
221
|
search?: string;
|
|
222
222
|
ignoreSitemap?: boolean;
|
|
223
223
|
includeSubdomains?: boolean;
|
|
224
|
+
sitemapOnly?: boolean;
|
|
224
225
|
limit?: number;
|
|
225
226
|
}
|
|
226
227
|
|
|
@@ -543,16 +544,18 @@ export default class FirecrawlApp {
|
|
|
543
544
|
* @param params - Additional parameters for the scrape request.
|
|
544
545
|
* @param pollInterval - Time in seconds for job status checks.
|
|
545
546
|
* @param idempotencyKey - Optional idempotency key for the request.
|
|
547
|
+
* @param webhook - Optional webhook for the batch scrape.
|
|
546
548
|
* @returns The response from the crawl operation.
|
|
547
549
|
*/
|
|
548
550
|
async batchScrapeUrls(
|
|
549
551
|
urls: string[],
|
|
550
552
|
params?: ScrapeParams,
|
|
551
553
|
pollInterval: number = 2,
|
|
552
|
-
idempotencyKey?: string
|
|
554
|
+
idempotencyKey?: string,
|
|
555
|
+
webhook?: CrawlParams["webhook"],
|
|
553
556
|
): Promise<BatchScrapeStatusResponse | ErrorResponse> {
|
|
554
557
|
const headers = this.prepareHeaders(idempotencyKey);
|
|
555
|
-
let jsonData: any = { urls, ...(params ?? {}) };
|
|
558
|
+
let jsonData: any = { urls, ...(params ?? {}), webhook };
|
|
556
559
|
try {
|
|
557
560
|
const response: AxiosResponse = await this.postRequest(
|
|
558
561
|
this.apiUrl + `/v1/batch/scrape`,
|