Python Integration Operations Guide
preliminary
Three necessary steps need to be completed:
- Register an account and get an API key (generated in the "API Keys" module of the Dashboard).
- Ensure Python version ≥ 3.6
- pass (a bill or inspection etc)
pip install tavily-pythonInstall the official SDK
Example of a basic call
Below is a code template that implements a basic search:
from tavily import TavilyClient
client = TavilyClient(api_key="你的API密钥")
response = client.search("查询关键词")
Configuration of key parameters
- Proxy Settings: By
proxiesParameter Configuration Web Agent - Domain Restrictions: Use
include_domainsSpecify the domain name of the prioritized website to be crawled - deep search: Settings
include_answer=TrueTurn on smart Q&A mode
The JSON data returned after the call contains structured information such as the 'results' array (sorted search results), the 'answer' field (direct answers generated by the AI), and so on.
This answer comes from the articleTavily: Real-Time Information Search API Service for AIThe
































