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
fix: pkgvuln
Gergő Móricz1ddd6630207a
diff --git a/apps/test-suite/package.json b/apps/test-suite/package.jsonindex f0f0a1ddd..945ee39d2 100644--- a/apps/test-suite/package.json+++ b/apps/test-suite/package.json@@ -15,6 +15,7 @@"@anthropic-ai/sdk": "^0.57.0","@dqbd/tiktoken": "^1.0.14","@supabase/supabase-js": "^2.43.1",+ "axios": "^1.12.2","dotenv": "^16.4.5","jest": "^30.0.5","openai": "^5.10.2",diff --git a/apps/test-suite/pnpm-lock.yaml b/apps/test-suite/pnpm-lock.yamlindex 3d2eb96ea..3a9104d5d 100644--- a/apps/test-suite/pnpm-lock.yaml+++ b/apps/test-suite/pnpm-lock.yaml@@ -33,6 +33,9 @@ importers:'@supabase/supabase-js':specifier: ^2.43.1version: 2.44.2+ axios:+ specifier: ^1.12.2+ version: 1.12.2([email protected])dotenv:specifier: ^16.4.5version: 16.4.5@@ -1966,8 +1969,8 @@ packages:resolution: {integrity: sha512-VTijN8+pKrf4sfM2t+ISXjypJ+k3AiP6OMzyLoWJ7jfMBtBfWbQc1rN07OndNb0CZRBBukOHoBhYDPuyae+/1Q==}engines: {node: '>= 10.0.0'}- resolution: {integrity: sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==}+ resolution: {integrity: sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==}resolution: {integrity: sha512-mRijnKimhGDMsizTvBTWotwNpzrkHr+VvZUQBof2AufXKB8NXrL1W69TG20EvOz7aevx6FTJIaBuBkYxS8zolg==}@@ -7703,7 +7706,7 @@ snapshots:uuid: 8.0.0xml2js: 0.6.2dependencies:follow-redirects: 1.15.6([email protected])form-data: 4.0.4@@ -8665,7 +8668,7 @@ snapshots:dependencies:- has-symbols: 1.0.3+ has-symbols: 1.1.0dependencies:@@ -9853,7 +9856,7 @@ snapshots:dependencies:- axios: 1.11.0([email protected])+ axios: 1.12.2([email protected])transitivePeerDependencies:- debugdiff --git a/examples/scrape_and_analyze_airbnb_data_e2b/package-lock.json b/examples/scrape_and_analyze_airbnb_data_e2b/package-lock.jsonindex 76e884c16..cff56bce5 100644--- a/examples/scrape_and_analyze_airbnb_data_e2b/package-lock.json+++ b/examples/scrape_and_analyze_airbnb_data_e2b/package-lock.json@@ -11,7 +11,7 @@"dependencies": {"@anthropic-ai/sdk": "^0.20.7","@e2b/code-interpreter": "^0.0.2",- "@mendable/firecrawl-js": "^0.0.21",+ "@mendable/firecrawl-js": "^4.3.5","buffer": "^6.0.3","dotenv": "^16.4.5"},@@ -501,13 +501,18 @@}},"node_modules/@mendable/firecrawl-js": {- "version": "0.0.21",- "resolved": "https://registry.npmjs.org/@mendable/firecrawl-js/-/firecrawl-js-0.0.21.tgz",- "integrity": "sha512-0geMb1CilorUowVugcVWZeM2a4PCH/iAxCbqPDpt66tEQ40r9217r7U1g3BRHnF/KDA6NvHM7wNIw/HqtUc6uw==",+ "version": "4.3.5",+ "resolved": "https://registry.npmjs.org/@mendable/firecrawl-js/-/firecrawl-js-4.3.5.tgz",+ "integrity": "sha512-6Vd0bEVD0hOS4SXlmrBnOkm86WWqEITHSTXwdnjm6SkTz6ZF6o85gGHUvOYoky4w7AoLctAv8yqrm6aZsy4lfQ==",+ "license": "MIT","dependencies": {- "axios": "^1.6.8",+ "axios": "^1.12.2",+ "typescript-event-target": "^1.1.1","zod": "^3.23.8","zod-to-json-schema": "^3.23.0"+ },+ "engines": {+ "node": ">=22.0.0"}},"node_modules/@types/node": {@@ -555,9 +560,9 @@"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="},"node_modules/axios": {- "version": "1.11.0",- "resolved": "https://registry.npmjs.org/axios/-/axios-1.11.0.tgz",- "integrity": "sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==",+ "version": "1.12.2",+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz",+ "integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==","license": "MIT","dependencies": {"follow-redirects": "^1.15.6",@@ -1216,6 +1221,12 @@"node": ">=14.17"}},+ "node_modules/typescript-event-target": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/typescript-event-target/-/typescript-event-target-1.1.1.tgz",+ "integrity": "sha512-dFSOFBKV6uwaloBCCUhxlD3Pr/P1a/tJdcmPrTXCHlEFD3faj0mztjcGn6VBAhQ0/Bdy8K3VWrrqwbt/ffsYsg==",+ "license": "MIT"+ },"node_modules/undici-types": {"version": "5.26.5","resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",diff --git a/examples/scrape_and_analyze_airbnb_data_e2b/package.json b/examples/scrape_and_analyze_airbnb_data_e2b/package.jsonindex b4098d546..a4c50d458 100644--- a/examples/scrape_and_analyze_airbnb_data_e2b/package.json+++ b/examples/scrape_and_analyze_airbnb_data_e2b/package.json@@ -19,7 +19,7 @@"dependencies": {"@anthropic-ai/sdk": "^0.20.7","@e2b/code-interpreter": "^0.0.2",- "@mendable/firecrawl-js": "^0.0.21",+ "@mendable/firecrawl-js": "^4.3.5","buffer": "^6.0.3","dotenv": "^16.4.5"}diff --git a/examples/scrape_and_analyze_airbnb_data_e2b/scraping.ts b/examples/scrape_and_analyze_airbnb_data_e2b/scraping.tsindex 9c1ab6faf..c1cdedf41 100644--- a/examples/scrape_and_analyze_airbnb_data_e2b/scraping.ts+++ b/examples/scrape_and_analyze_airbnb_data_e2b/scraping.ts@@ -28,19 +28,18 @@ export async function scrapeAirbnb() {.describe('Pagination links in the bottom of the page.'),})- const params2 = {- pageOptions: {- onlyMainContent: false,- },- extractorOptions: { extractionSchema: paginationSchema },- timeout: 50000, // if needed, sometimes airbnb stalls...- }-// Start crawling to get pagination links- const linksData = await app.scrapeUrl(listingsUrl, params2)- console.log(linksData.data['llm_extraction'])+ const linksData = await app.scrape(listingsUrl, {+ onlyMainContent: false,+ formats: [{+ type: "json",+ schema: paginationSchema,+ }],+ timeout: 50000, // if needed, sometimes airbnb stalls...+ });+ console.log(linksData.json)- let paginationLinks = linksData.data['llm_extraction'].page_links.map(+ let paginationLinks = linksData.json!.page_links.map((link) => baseUrl + link.link)@@ -64,17 +63,16 @@ export async function scrapeAirbnb() {.describe('Airbnb listings in San Francisco'),})- const params = {- pageOptions: {- onlyMainContent: false,- },- extractorOptions: { extractionSchema: schema },- }-// Function to scrape a single URLconst scrapeListings = async (url) => {- const result = await app.scrapeUrl(url, params)- return result.data['llm_extraction'].listings+ const result = await app.scrape(url, {+ onlyMainContent: false,+ formats: [{+ type: "json",+ schema: schema,+ }],+ });+ return result.json!.listings}// Scrape all pagination links in parallel