Search
Web Search
Perform a web search and return results
post/v1/search
Request
- Base URL: https://apipie.ai
- URL: https://apipie.ai/v1/search
- Auth: API key in header Authorization
Request body
Example request
{
"query": "latest AI developments",
"search_provider": "google",
"geo": "us",
"lang": "en",
"results": 20,
"user": "user123",
"whitelist": [
"arxiv.org",
"reuters.com",
"valyu/valyu-arxiv"
],
"blacklist": [
"reddit.com",
"twitter.com",
"news.ycombinator.com"
],
"max_price": 30,
"start_date": "2024-01-01",
"end_date": "2024-12-31",
"instructions": "Focus on peer-reviewed research from the last 2 years",
"relevance_threshold": 0.5,
"fast_mode": true,
"source_biases": {
"nasa.gov": 5,
"noaa.gov": 3,
"nih.gov": 1,
"example.com": -4
},
"response_length": "medium"
}Response
Successful search with results
Example response
{
"results": {
"result1": {
"url": "https://example.com/page1",
"title": "Example Page 1",
"description": "Description of page 1"
},
"result2": {
"url": "https://example.com/page2",
"title": "Example Page 2",
"description": "Description of page 2"
}
},
"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.