Visual Basic 2008 Tutorials


Back | Index

Google Search API

For this tutorial, you need to Download GoogleSearchAPI.dll

Add a Form, textbox, listbox and a button

Add GoogleSearchApi reference to your project: Click on Project menu then Add Reference

Then click on Browse TAB, then locate GoogleSearchApi.dll file that you download it earlier.

Then click ok.

Add the following code to the top of the page:

Imports Google.API.Search

Then add the following code to event:

Dim search As New GwebSearchClient("")

Dim results As IList(Of IWebResult) = search.Search(TextBox1.Text, 64, Nothing, Nothing, Nothing, Nothing, Nothing)


For Each result As IWebResult In results

ListBox1.Items.Add(result.Title & result.Content & result.Url)