{"record":{"id":"c04fd96c2bed3e09","repo":"FlowiseAI/Flowise","slug":"firecrawl-url-is-required-for-scrape-mode","errorCode":null,"errorMessage":"Firecrawl: URL is required for scrape mode","messagePattern":"Firecrawl: URL is required for scrape mode","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/documentloaders/FireCrawl/FireCrawl.ts","lineNumber":599,"sourceCode":"                throw new Error('Firecrawl: Query is required for search mode')\n            }\n            const response = await app.search({ query: this.query, ...this.params })\n            if (!response.success) {\n                throw new Error(`Firecrawl: Failed to search. Warning: ${response.warning}`)\n            }\n\n            // Convert search results to FirecrawlDocument format\n            firecrawlDocs = (response.data || []).map((result) => ({\n                markdown: result.description,\n                metadata: {\n                    title: result.title,\n                    sourceURL: result.url,\n                    description: result.description\n                }\n            }))\n        } else if (this.mode === 'scrape') {\n            if (!this.url) {\n                throw new Error('Firecrawl: URL is required for scrape mode')\n            }\n            const response = await app.scrapeUrl(this.url, this.params)\n            if (!response.success) {\n                throw new Error(`Firecrawl: Failed to scrape URL. Error: ${response.error}`)\n            }\n            firecrawlDocs = [response.data as FirecrawlDocument]\n        } else if (this.mode === 'crawl') {\n            if (!this.url) {\n                throw new Error('Firecrawl: URL is required for crawl mode')\n            }\n            const response = await app.crawlUrl(this.url, this.params)\n            if ('status' in response) {\n                if (response.status === 'failed') {\n                    throw new Error('Firecrawl: Crawl job failed')\n                }\n                firecrawlDocs = response.data || []\n            } else {\n                if (!response.success) {","sourceCodeStart":581,"sourceCodeEnd":617,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/documentloaders/FireCrawl/FireCrawl.ts#L581-L617","documentation":"Thrown by FireCrawlLoader.load() in scrape mode when no URL was supplied. Scrape requires a single target URL; the loader fails fast to avoid a wasted API call.","triggerScenarios":"new FireCrawlLoader({ apiKey, mode: 'scrape', url: undefined }) then .load(). Usually a Flowise input binding that resolved to empty.","commonSituations":"URL field blank in node UI; upstream node produced no URL; template variable unresolved; user picked 'scrape' but forgot the URL field.","solutions":["Supply a valid absolute URL (with protocol) in loader params.","Validate upstream URL before constructing the loader.","Use a different mode if a URL is not available."],"exampleFix":"// before\nnew FireCrawlLoader({ apiKey, mode: 'scrape' }).load()\n\n// after\nconst url = (inputUrl || '').trim()\nif (!url) throw new Error('Scrape mode requires a URL')\nnew URL(url) // throws on invalid\nnew FireCrawlLoader({ apiKey, mode: 'scrape', url }).load()","handlingStrategy":"validation","validationCode":"const url = (params.url ?? '').trim()\nif (!url) throw new Error('scrape mode requires a url')\nnew URL(url)\nnew FireCrawlLoader({ ...params, mode: 'scrape', url })","typeGuard":"function hasValidUrl(p: FirecrawlLoaderParameters): p is FirecrawlLoaderParameters & { url: string } {\n  if (typeof p.url !== 'string' || !p.url.trim()) return false\n  try { new URL(p.url); return true } catch { return false }\n}","tryCatchPattern":"try { await loader.load() }\ncatch (e) { if (/URL is required for scrape mode/.test((e as Error).message)) throw new Error('Provide a URL for the scrape node'); throw e }","preventionTips":["Validate URL with `new URL()` upstream.","Bind the URL field to a non-empty source.","Show a UI hint that scrape mode requires a URL."],"tags":["firecrawl","validation","scrape","loader","config"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}