WEBSERVICES TUTORIAL

Google Web Services Example

Google.com is a well-known web search engine. Google has made a web service available that allows developers to interface with their search engine within their own applications. A user can search for any topic on the web. A query will return data about the web pages that are found. This example demonstrates a Mathematica interface to the Google web service.

The Google web service provides a good demonstration of the use of web services to retrieve data. This example searches the Google database for web pages containing a certain keyword. The example code then places the results in the notebook.

To try this example, evaluate all the initialization cells. (You can do this using Evaluation Evaluate Initialization Cells.) Then go to the examples here.

Code
Click for copyable input
Click for copyable input
Click for copyable input
Click for copyable input
Click for copyable input
Click for copyable input
Click for copyable input
Click for copyable input
Click for copyable input
Click for copyable input
Click for copyable input
Click for copyable input
Click for copyable input
Click for copyable input

Example

Find the top 10 wolfram.com web pages containing all the given strings.

Click for copyable input

Search for pages containing all the given strings, and return only the top two results.

Click for copyable input

Display less verbose results and do not filter near-duplicate content and host crowding.

Click for copyable input
New to Mathematica? Find your learning path »
Have a question? Ask support »