Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
Nick:
Nicolas23dfe90baaf8
diff --git a/apps/js-sdk/firecrawl/src/index.ts b/apps/js-sdk/firecrawl/src/index.tsindex cdde4e20e..ee55343c3 100644--- a/apps/js-sdk/firecrawl/src/index.ts+++ b/apps/js-sdk/firecrawl/src/index.ts@@ -202,21 +202,7 @@ export default class FirecrawlApp {Authorization: `Bearer ${this.apiKey}`,} as AxiosRequestHeaders;let jsonData: any = { url, ...params };- if (this.version === 'v0' && jsonData?.extractorOptions?.extractionSchema) {- let schema = jsonData.extractorOptions.extractionSchema;- // Check if schema is an instance of ZodSchema to correctly identify Zod schemas- if (schema instanceof z.ZodSchema || schema instanceof z.ZodObject) {- schema = zodToJsonSchema(schema);- }- jsonData = {- ...jsonData,- extractorOptions: {- ...jsonData.extractorOptions,- extractionSchema: schema,- mode: jsonData.extractorOptions.mode || "llm-extraction",- },- };- } else if (this.version === 'v1' && jsonData?.extract?.schema) {+ if (jsonData?.extract?.schema) {let schema = jsonData.extract.schema;// Try parsing the schema as a Zod schemadiff --git a/apps/js-sdk/firecrawl/types/index.d.ts b/apps/js-sdk/firecrawl/types/index.d.tsindex 95e61531f..8997fccd1 100644--- a/apps/js-sdk/firecrawl/types/index.d.ts+++ b/apps/js-sdk/firecrawl/types/index.d.ts@@ -1,5 +1,6 @@import { AxiosResponse, AxiosRequestHeaders } from "axios";import { TypedEventTarget } from "typescript-event-target";+import { z } from "zod";/*** Configuration interface for FirecrawlApp.* @param apiKey - Optional API key for authentication.