Search
Search Answer
Generate AI-powered answers using search results (valyu provider only)
post/v1/search/answer
Request
- Base URL: https://apipie.ai
- URL: https://apipie.ai/v1/search/answer
- Auth: API key in header Authorization
Request body
Example request
{
"query": "What are the latest developments in quantum computing?",
"search_provider": "valyu",
"search": "all",
"results": 5,
"user": "user123",
"whitelist": [
"arxiv.org",
"reuters.com",
"valyu/valyu-arxiv"
],
"blacklist": [
"reddit.com",
"twitter.com",
"news.ycombinator.com"
],
"source_biases": {
"nasa.gov": 5,
"noaa.gov": 3,
"nih.gov": 1,
"example.com": -4
},
"max_price": 30,
"timeRange": "7d",
"geo": "us",
"system_instructions": "Focus on technical details and cite specific research papers"
}Response
Successful answer generation
Example response
{
"answer": "Recent quantum computing developments include...",
"usage": {
"search_id": "nai-123e4567-e89b-12d3-a456-426614174000",
"timestamp": 1711729795000,
"search_provider": "google",
"keywords": "latest AI developments",
"total_records": 1000000,
"requested_records": 20,
"returned_records": 20,
"cost": 0.03,
"latencyMs": 1200
}
}Changes
No recorded changes to this operation across all 1 revision of this API.