FlowiseAI/Flowise · error · Error
Firecrawl: URL is required for scrape mode
Error message
Firecrawl: URL is required for scrape mode
What it means
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.
Source
Thrown at packages/components/nodes/documentloaders/FireCrawl/FireCrawl.ts:599
throw new Error('Firecrawl: Query is required for search mode')
}
const response = await app.search({ query: this.query, ...this.params })
if (!response.success) {
throw new Error(`Firecrawl: Failed to search. Warning: ${response.warning}`)
}
// Convert search results to FirecrawlDocument format
firecrawlDocs = (response.data || []).map((result) => ({
markdown: result.description,
metadata: {
title: result.title,
sourceURL: result.url,
description: result.description
}
}))
} else if (this.mode === 'scrape') {
if (!this.url) {
throw new Error('Firecrawl: URL is required for scrape mode')
}
const response = await app.scrapeUrl(this.url, this.params)
if (!response.success) {
throw new Error(`Firecrawl: Failed to scrape URL. Error: ${response.error}`)
}
firecrawlDocs = [response.data as FirecrawlDocument]
} else if (this.mode === 'crawl') {
if (!this.url) {
throw new Error('Firecrawl: URL is required for crawl mode')
}
const response = await app.crawlUrl(this.url, this.params)
if ('status' in response) {
if (response.status === 'failed') {
throw new Error('Firecrawl: Crawl job failed')
}
firecrawlDocs = response.data || []
} else {
if (!response.success) {View on GitHub (pinned to abe4a8601a)
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.
Example fix
// before
new FireCrawlLoader({ apiKey, mode: 'scrape' }).load()
// after
const url = (inputUrl || '').trim()
if (!url) throw new Error('Scrape mode requires a URL')
new URL(url) // throws on invalid
new FireCrawlLoader({ apiKey, mode: 'scrape', url }).load() Defensive patterns
Strategy: validation
Validate before calling
const url = (params.url ?? '').trim()
if (!url) throw new Error('scrape mode requires a url')
new URL(url)
new FireCrawlLoader({ ...params, mode: 'scrape', url }) Type guard
function hasValidUrl(p: FirecrawlLoaderParameters): p is FirecrawlLoaderParameters & { url: string } {
if (typeof p.url !== 'string' || !p.url.trim()) return false
try { new URL(p.url); return true } catch { return false }
} Try / catch
try { await loader.load() }
catch (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 } Prevention
- 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.
When it happens
Trigger: new FireCrawlLoader({ apiKey, mode: 'scrape', url: undefined }) then .load(). Usually a Flowise input binding that resolved to empty.
Common situations: URL field blank in node UI; upstream node produced no URL; template variable unresolved; user picked 'scrape' but forgot the URL field.
Related errors
- Firecrawl: Query is required for search mode
- Firecrawl: URL is required for crawl mode
- Firecrawl API key not set. You can set it as FIRECRAWL_API_K
- Firecrawl: Failed to scrape URL. Error: ${response.error}
- Model is required
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/c04fd96c2bed3e09.
Report an issue: GitHub.