({{, (RefLink[WebSearch, paclet:ref/WebSearch])["string"] 
gives a dataset of the top web search results for the specified literal string.}, {, (RefLink[WebSearch, paclet:ref/WebSearch])[form]
gives the top results obtained by doing the web search specified by form.}, {, (RefLink[WebSearch, paclet:ref/WebSearch])[form,elems]
gives the elements of the web search specified by elems.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[WebSearch, paclet:ref/WebSearch]) requires internet connectivity and uses external services that require (WebLink[Service Credits, http://www.wolfram.com/service-credits/]).

(RefLink[WebSearch, paclet:ref/WebSearch]) supports the following basic search forms, which can be combined arbitrarily:

Possible fields include:

File formats can be specified either by strings as used by (RefLink[Import, paclet:ref/Import]) or by entities of type (StringTypeLink["FileFormat", paclet:ref/interpreter/FileFormat]).

Possible options include:

Languages can be specified using entities of type (StringTypeLink["Language", paclet:ref/interpreter/Language]) or strings corresponding to standard names of languages.

Possible settings for (RefLink[Method, paclet:ref/Method]) include "Google" and "Bing".

Possible elements that can be specified by elems include:

OpenersPrimaryExamplesSection(Spacer1)Examples  (10)

OpenersExampleSection0(Spacer1)Basic Examples  (4)

Perform a basic web search:

WebSearch["tigers"]

Search using alternatives:

WebSearch["tigers"|"lions"]

Search for pages containing all specified terms:

WebSearch[{"tigers","lions"}]

Create a word cloud from web search snippets:

WordCloud[DeleteStopwords[Join@@TextWords/@WebSearch["Fourth of July","Snippets",MaxItems->100]]]

OpenersExampleSection1(Spacer1)Scope  (3)

OpenersExampleSubsection0(Spacer1)Search Fields  (2)

Filter results by country:

WebSearch["ceviche","Country"->(Entity["Peru", Entity["Country","Peru"], "Entity[\"Country\", \"Peru\"]", "country"])]

Filter results by file format:

WebSearch["alice in wonderland","FileFormat"->(Entity["Portable Document Format", Entity["FileFormat","PDF-1"], "Entity[\"FileFormat\", \"PDF-1\"]", "file format"]),Method-> "Google"]

OpenersExampleSubsection1(Spacer1)Elements  (1)

Retrieve only textual snippets for all search results:

WebSearch["alan turing","Snippets"]//TableForm

OpenersExampleSection2(Spacer1)Options  (3)

OpenersExampleSubsection2(Spacer1)Language  (1)

Search for pages in a specified language:

WebSearch["alan turing",Language->(Entity["Spanish", Entity["Language","Spanish"], "Entity[\"Language\", \"Spanish\"]", "language"])]

OpenersExampleSubsection3(Spacer1)MaxItems  (1)

Specify the maximum number of results to retrieve:

WebSearch["andes mountains" ,MaxItems-> 7]

OpenersExampleSubsection4(Spacer1)Method  (1)

Specify a search engine:

WebSearch["proxima centauri",Method-> "Google"]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[WebImageSearch, paclet:ref/WebImageSearch])  ▪  (RefLink[WikipediaData, paclet:ref/WikipediaData])  ▪  (RefLink[WikipediaSearch, paclet:ref/WikipediaSearch])  ▪  (RefLink[TextSearch, paclet:ref/TextSearch])  ▪  (RefLink[ServiceExecute, paclet:ref/ServiceExecute])  ▪  (RefLink[$ServiceCreditsAvailable, paclet:ref/$ServiceCreditsAvailable])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Knowledge Representation & Access, paclet:guide/KnowledgeRepresentationAndAccess])}, {▪(RefLinkPlain[Listing of Supported External Services, paclet:guide/ListingOfSupportedExternalServices])}, {▪(RefLinkPlain[Web Operations, paclet:guide/WebOperations])}, {▪(RefLinkPlain[Linguistic Data, paclet:guide/LinguisticData])}, {▪(RefLinkPlain[Accessing External Services & APIs, paclet:guide/AccessingExternalServicesAndAPIs])}, {▪(RefLinkPlain[People & History, paclet:guide/PeopleAndHistory])}, {▪(RefLinkPlain[Cultural Data, paclet:guide/CulturalData])}, {▪(RefLinkPlain[Computation with Structured Datasets, paclet:guide/ComputationWithStructuredDatasets])}})}})