Skip to content

feat(tavily): add TavilyFetcher component using the Extract API#3561

Open
SyedShahmeerAli12 wants to merge 1 commit into
deepset-ai:mainfrom
SyedShahmeerAli12:feat/tavily-fetcher-3559
Open

feat(tavily): add TavilyFetcher component using the Extract API#3561
SyedShahmeerAli12 wants to merge 1 commit into
deepset-ai:mainfrom
SyedShahmeerAli12:feat/tavily-fetcher-3559

Conversation

@SyedShahmeerAli12

@SyedShahmeerAli12 SyedShahmeerAli12 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Related Issues

Proposed Changes

Adds TavilyFetcher, a new component under components/fetchers/tavily/ that calls the Tavily Extract API to fetch and extract web page content from given URLs, returning results as Haystack Document objects.

fetcher = TavilyFetcher(api_key=Secret.from_env_var("TAVILY_API_KEY"))
result = fetcher.run(urls=["https://haystack.deepset.ai"])
  • Both sync (run) and async (run_async) supported
  • extract_depth: "basic" (default) or "advanced"
  • include_images: optionally include image URLs in Document metadata
  • extract_params: pass-through for extra API params (format, query, chunks_per_source, etc.)
  • meta output: response_time, usage, request_id, failed_results

How did you test it?

19 unit tests (mocked) + 2 integration tests run against the real Tavily Extract API all pass.

Checklist

@SyedShahmeerAli12 SyedShahmeerAli12 requested a review from a team as a code owner July 8, 2026 11:28
@SyedShahmeerAli12 SyedShahmeerAli12 requested review from sjrl and removed request for a team July 8, 2026 11:28
@github-actions github-actions Bot added integration:tavily type:documentation Improvements or additions to documentation labels Jul 8, 2026
Implements a new TavilyFetcher component that wraps the Tavily Extract
API endpoint to fetch and extract web page content from given URLs,
returning results as Haystack Documents.

- Supports sync and async (run/run_async)
- extract_depth: "basic" or "advanced"
- include_images: optionally include image URLs in Document metadata
- extract_params: pass-through for any extra API params (format, query, chunks_per_source, etc.)
- meta output contains response_time, usage, request_id, failed_results
- 19 unit tests + 2 integration tests, all verified against real API
@SyedShahmeerAli12 SyedShahmeerAli12 force-pushed the feat/tavily-fetcher-3559 branch from 744b1b4 to f501f6c Compare July 8, 2026 11:32
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Coverage report (tavily)

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  integrations/tavily/src/haystack_integrations/components/fetchers/tavily
  tavily_fetcher.py
Project Total  

This report was generated by python-coverage-comment-action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration:tavily type:documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement a TavilyFetcher that uses Tavily Extract API endpoint

1 participant