search-web
ai-research-agent / search/search-web
Search
searchWeb()
function searchWeb(query, options?): Promise<object[]>
Search Web via SearXNG metasearch of all major search engines. Options are 10 search categories, recency, and how many times to retry other domains if first time fails. SearXNG is a free internet metasearch engine which aggregates results from more than 180+ search sources.
Searxng Overview Searxng Installation Guide
Parameters
Parameter | Type | Description |
---|---|---|
|
| The search query string. |
| { | |
|
| default=general - ["general", "news", "videos", "images", "science","it", "files", "social+media", "map", "music"] |
|
| default=3 - Maximum number of retry attempts if the initial search fails. |
|
| default=1 - The page number to retrieve. |
|
| default=null - Use your custom domain SearXNG |
|
| default=false - Use corsproxy.io to access in frontend JS |
|
| default=0 - ["", "day", "week", "month", "year"] |
Returns
Promise
<object
[]>
An array of search result objects.
Example
const advancedResults = await searchWeb('Node.js', {
category: 2,
recency: 1,
maxRetries: 5
});
Author
ai-research-agent (2024) Heiser, M., Tauber, A., Flament, A., et al. (2014-)