UNPKG

@reliverse/rse

Version:

@reliverse/rse is your all-in-one companion for bootstrapping and improving any kind of projects (especially web apps built with frameworks like Next.js) — whether you're kicking off something new or upgrading an existing app. It is also a little AI-power

15 lines (14 loc) 435 B
import FirecrawlApp from "@mendable/firecrawl-js"; export async function useFirecrawl(url) { const app = new FirecrawlApp({ apiKey: process.env.FIRECRAWL_API_KEY }); const crawlResponse = await app.crawlUrl(url, { limit: 100, scrapeOptions: { formats: ["markdown", "html"] } }); if (!crawlResponse.success) { throw new Error(`Failed to crawl: ${crawlResponse.error}`); } console.log(crawlResponse); }