From e73f1a2b5211fd9932fa9282eec2feb2ba48956e Mon Sep 17 00:00:00 2001 From: davideuler Date: Sat, 22 Feb 2025 02:31:15 +0800 Subject: [PATCH] send 'markdown' format request to firecrawl to get complete markdown for search result pages. Include scrapeOptions with formats: ['markdown'] to get complete markdown content for each search result otherwise it defaults to getting SERP results (url, title, description). --- composables/useWebSearch.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/composables/useWebSearch.ts b/composables/useWebSearch.ts index b33ad5e..9a759a5 100644 --- a/composables/useWebSearch.ts +++ b/composables/useWebSearch.ts @@ -28,7 +28,12 @@ export const useWebSearch = (): WebSearchFunction => { apiUrl: webSearchApiBase, }) return async (q: string, o: WebSearchOptions) => { - const results = await fc.search(q, o) + const results = await fc.search(q, { + ...o, + scrapeOptions: { + formats: ['markdown'] + } + }) if (results.error) { throw new Error(results.error) }