firecrawl 1.19.2 → 1.20.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/dist/index.cjs CHANGED
@@ -607,7 +607,7 @@ var FirecrawlApp = class {
607
607
  /**
608
608
  * Extracts information from URLs using the Firecrawl API.
609
609
  * Currently in Beta. Expect breaking changes on future minor versions.
610
- * @param url - The URL to extract information from.
610
+ * @param urls - The URLs to extract information from. Optional if using other methods for data extraction.
611
611
  * @param params - Additional parameters for the extract request.
612
612
  * @returns The response from the extract operation.
613
613
  */
package/dist/index.d.cts CHANGED
@@ -543,11 +543,11 @@ declare class FirecrawlApp {
543
543
  /**
544
544
  * Extracts information from URLs using the Firecrawl API.
545
545
  * Currently in Beta. Expect breaking changes on future minor versions.
546
- * @param url - The URL to extract information from.
546
+ * @param urls - The URLs to extract information from. Optional if using other methods for data extraction.
547
547
  * @param params - Additional parameters for the extract request.
548
548
  * @returns The response from the extract operation.
549
549
  */
550
- extract<T extends zt.ZodSchema = any>(urls: string[], params?: ExtractParams<T>): Promise<ExtractResponse<zt.infer<T>> | ErrorResponse>;
550
+ extract<T extends zt.ZodSchema = any>(urls?: string[], params?: ExtractParams<T>): Promise<ExtractResponse<zt.infer<T>> | ErrorResponse>;
551
551
  /**
552
552
  * Initiates an asynchronous extract job for a URL using the Firecrawl API.
553
553
  * @param url - The URL to extract data from.
package/dist/index.d.ts CHANGED
@@ -543,11 +543,11 @@ declare class FirecrawlApp {
543
543
  /**
544
544
  * Extracts information from URLs using the Firecrawl API.
545
545
  * Currently in Beta. Expect breaking changes on future minor versions.
546
- * @param url - The URL to extract information from.
546
+ * @param urls - The URLs to extract information from. Optional if using other methods for data extraction.
547
547
  * @param params - Additional parameters for the extract request.
548
548
  * @returns The response from the extract operation.
549
549
  */
550
- extract<T extends zt.ZodSchema = any>(urls: string[], params?: ExtractParams<T>): Promise<ExtractResponse<zt.infer<T>> | ErrorResponse>;
550
+ extract<T extends zt.ZodSchema = any>(urls?: string[], params?: ExtractParams<T>): Promise<ExtractResponse<zt.infer<T>> | ErrorResponse>;
551
551
  /**
552
552
  * Initiates an asynchronous extract job for a URL using the Firecrawl API.
553
553
  * @param url - The URL to extract data from.
package/dist/index.js CHANGED
@@ -571,7 +571,7 @@ var FirecrawlApp = class {
571
571
  /**
572
572
  * Extracts information from URLs using the Firecrawl API.
573
573
  * Currently in Beta. Expect breaking changes on future minor versions.
574
- * @param url - The URL to extract information from.
574
+ * @param urls - The URLs to extract information from. Optional if using other methods for data extraction.
575
575
  * @param params - Additional parameters for the extract request.
576
576
  * @returns The response from the extract operation.
577
577
  */
package/dump.rdb ADDED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "firecrawl",
3
- "version": "1.19.2",
3
+ "version": "1.20.0",
4
4
  "description": "JavaScript SDK for Firecrawl API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -1119,14 +1119,14 @@ export default class FirecrawlApp {
1119
1119
  /**
1120
1120
  * Extracts information from URLs using the Firecrawl API.
1121
1121
  * Currently in Beta. Expect breaking changes on future minor versions.
1122
- * @param url - The URL to extract information from.
1122
+ * @param urls - The URLs to extract information from. Optional if using other methods for data extraction.
1123
1123
  * @param params - Additional parameters for the extract request.
1124
1124
  * @returns The response from the extract operation.
1125
1125
  */
1126
- async extract<T extends zt.ZodSchema = any>(urls: string[], params?: ExtractParams<T>): Promise<ExtractResponse<zt.infer<T>> | ErrorResponse> {
1126
+ async extract<T extends zt.ZodSchema = any>(urls?: string[], params?: ExtractParams<T>): Promise<ExtractResponse<zt.infer<T>> | ErrorResponse> {
1127
1127
  const headers = this.prepareHeaders();
1128
1128
 
1129
- let jsonData: { urls: string[] } & ExtractParams<T> = { urls, ...params };
1129
+ let jsonData: { urls?: string[] } & ExtractParams<T> = { urls: urls, ...params };
1130
1130
  let jsonSchema: any;
1131
1131
  try {
1132
1132
  if (!params?.schema) {