Run query through Tavily Search and return metadata.
results(
self,
query: str,
max_results: Optional[int] = 5,
search_depth: Optional[str] = 'advanced',
include_domains: Optional[List[str]] = [],
exclude_domains: Optional[List[str]] = [],
include_answer: Optional[bool] = False,
include_raw_content: Optional[bool] = False,
include_images: Optional[bool] = False
) -> List[Dict]Returns: query: The query that was searched for. follow_up_questions: A list of follow up questions. response_time: The response time of the query. answer: The answer to the query. images: A list of images. results: A list of dictionaries containing the results: title: The title of the result. url: The url of the result. content: The content of the result. score: The score of the result. raw_content: The raw content of the result.
| Name | Type | Description |
|---|---|---|
query* | str | The query to search for. |
max_results | Optional[int] | Default: 5The maximum number of results to return. |
search_depth | Optional[str] | Default: 'advanced'The depth of the search. Can be "basic" or "advanced". |
include_domains | Optional[List[str]] | Default: []A list of domains to include in the search. |
exclude_domains | Optional[List[str]] | Default: []A list of domains to exclude from the search. |
include_answer | Optional[bool] | Default: FalseWhether to include the answer in the results. |
include_raw_content | Optional[bool] | Default: FalseWhether to include the raw content in the results. |
include_images | Optional[bool] | Default: FalseWhether to include images in the results. |