LlamaIndex
LlamaIndex includes a You.com retriever integration through the llama-index-retrievers-you package. It uses You.com’s Web Search API to retrieve relevant web and news results, converting them into LlamaIndex’s standard NodeWithScore format for use with query engines, agents, and other components.
Getting Started
Usage
Basic
Async
News
Query engine
Set up the retriever and retrieve web results:
Each result includes the page text along with metadata such as url, title, description, page_age, thumbnail_url, and source_type (either "web" or "news").
The retriever also supports async operations:
The Web Search API automatically includes news results based on your query. You can control how many results are returned per type and filter by country:
Combine the retriever with an LLM to synthesize natural language answers from search results:
The query engine retrieves relevant search results from You.com, passes them as context to the LLM, and returns a synthesized answer.
Customizing Search Parameters
You can pass optional parameters to control the search behavior: