Workflow Demo
The Workflow
7 steps · click a step number to mark it done
Open Tavily AI and have it ready before you start
Install the Tavily Python client by running "pip install tavily-python"
Create an environment variable named TAVILY_API_KEY and paste your API key into it
Import the client in your script with from tavily import TavilyClient and instantiate it using client = TavilyClient()
Write your search query as a text string, e.g., query = "Who is Lionel Messi?"
Call the search API: response = client.search(query)
Iterate over response["results"] and print each result["title"] and result["content"]
To also fetch images, add include_images=True in the search call and then loop over response["images"] to display the image URLs