web_search | R Documentation |
This function allows you to query different search engines (DuckDuckGo, Bing, Yahoo News), retrieve search results, and filter them based on predefined patterns.
web_search(
search_term,
search_engine,
num_pages = 1,
time_filter = NULL,
insite = NULL,
intitle = FALSE
)
search_term |
The search query as a string. |
search_engine |
The search engine to use: "DuckDuckGo", "Bing", or "Yahoo News". |
num_pages |
The number of result pages to retrieve (default: 1). |
time_filter |
Optional time filter ("week", "month", "year"). |
insite |
Restrict search to a specific domain (not supported for Yahoo). |
intitle |
Search within the title (relevant for DuckDuckGo and Bing). |
A 'data.table' containing search engine results with columns 'search_engine' and 'raw_url'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.