#713·agentic

FireCrawl: SearchResponse type is not aligned with FireCrawl API response

Author: mjaklCreated Jun 25, 2025Updated Sep 22, 2025

When using the scrapeUrl tool, I get back a ScrapeResponse type:

typescript
  export interface ScrapeResponse<
    LLMResult = any,
    ActionsSchema extends ActionsResult | never = never
  > extends Document<LLMResult, ActionsSchema> {
    success: true
    warning?: string
    error?: string
  }

Yet, the server responds with data similar to SearchResponse - see their documentation:

typescript
  export interface SearchResponse {
    success: boolean
    data: Document[] // <---- scraping has just a single document here, no array
    warning?: string
    error?: string
  }

That's how I called the tool:

typescript
 const scrapedData = await firecrawl.scrapeUrl({
      url,
      formats: ["markdown"],
    });

Current workaround do access the Markdown, I need to access scrapedData.data.markdown which is not allowed by the type system (the typy system would support scrapeData.markdown, but this does not exist).

Source: transitive-bullshit/agentic