When using the scrapeUrl tool, I get back a ScrapeResponse type:
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:
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:
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).
When using the
scrapeUrltool, I get back aScrapeResponsetype:Yet, the server responds with data similar to
SearchResponse- see their documentation:That's how I called the tool:
Current workaround do access the Markdown, I need to access
scrapedData.data.markdownwhich is not allowed by the type system (the typy system would supportscrapeData.markdown, but this does not exist).