GoSeach.NET - Google Custom Search .NET API

Last Update
30 June 2013
Regular License
$12
Extended License
$60
Sales
20

Google custom search is a powerful, yet simple search engine. It allows the searching and presentation of search results on you website with the minimum of fuss.

What is the Google custom search API?

The Google Custom Search API lets you develop websites and other applications to retrieve and display search results from Google Custom Search facility. With this API, you can use make requests to get either web search or image search results.

The power of Google custom search is now at your fingertips using a well built and powerful .NET API. Take advantage of the features of Google custom search using simple .NET calls. The component is written in C# and brings the power of custom search to all your .NET applications including:

Console Windows Forms WPF ASP.NET ASP.NET MVC Windows Services Web Services (XML/WCF) Silverlight All .NET applications

What features are available when searching?

The search features available within the component are:

Specify the search terms Specify page Turns on/off the translation between zh-CN and zh-TW Country restriction Specify linked custom search engine or use custom search engine ID Specify all search results from a time period Identify a phrase that all documents in the search results must contain Identify a word or phrase that should not appear in any documents in the search results Returns images of a specified type Controls turning on or off the duplicate content Specify geo-location of end user The local Google domain to use to perform the search Sets the user interface language Allows the addition of extra query terms Specify image colour Return images of a specific dominant colour Return images of a specified size Return images of a specific type Specify that all search results should contain a link to a particular URL Specify the language restriction for the search results Provide additional search terms to check for in a document, where each document in the search results must contain at least one of the additional search terms Specify that all search results should be pages that are related to the specified URL Specify filter based on licensing Search safety level Specify the search type (web pages or images) Specify all search results should be pages from a given site Controls whether to include or exclude results from a site

What do you get with your purchase?

.NET Assembly with Strong Name Signature Debug file (PDB) XML comments (Intellisense) 1 x ASP.NET MVC 3 demo application 1 x ASP.NET WebForm demo application 1 x Console demo application 1 x Live Demo (MVC 4) as seen here

A comprehensive help file documenting full usage API Documentation C# Source Code Visual Studio 2010 SP1 & 2012 Solution

Here is a simple example of how to take advantage of our Fluent & Standard API to perform and search using a search engine defined from your Google account. Learn more about creating search engines and getting API access to the Google services.

Create and Manage Google Custom Search engines Enable access to the Google API services

Fluent API

var authToken = new ApiKeyAuth([...Your GoogleApiKey...]); var searchEngine = new SearchEngineIdBased([...Your SearchEngineId...]);

// Use fluent API var searchResults = new GoogleFluentCustomSearch() .SetSearchTerms("codecanyon") .SetPage((new Page()) .SetPageNumber(1) .SetPageSize(10)) .SetAuthenticator(authToken) .SetSearchEngine(searchEngine) .Search();

Standard API

var authToken = new ApiKeyAuth([...Your GoogleApiKey...]); var searchEngine = new SearchEngineIdBased([...Your SearchEngineId...]);

// Use standard API var standardSearch = new GoogleCustomSearch(authToken, searchEngine); var query = new SearchQuery() { SearchTerms = searchTerms, Page = new Page(pageNumber, 5) }; searchResults = standardSearch.Search(query);

Fluent API & Asynchronous search

// Use fluent API & Asynchronous search void Search() { new GoogleFluentCustomSearch() .SetSearchTerms(searchTerms) .SetPage((new Page()) .SetPageNumber(pageNumber) .SetPageSize(5)) .SetAuthenticator(authToken) .SetSearchEngine(searchEngine) .OnSearchComplete(ProcessSearchResults) .SearchAsync(); }

void ProcessSearchResults(SearchResult searchResults) { ... }

Search results

The search results offer a comprehensive object from the data Google offers and contains the following parts:

Search results Current, Next and Previous page search queries Search spelling – Encapsulates a corrected query Search information – Encapsulates all information about the search Search URL – The OpenSearch URL element that defines the template for the API. Search kind – Unique identifier for the type of current object Search context – Metadata about the particular search engine that was used for performing the search query

What else do you get from this component?

Fully commented Excellent memory management Optimised for performance Supports ThreadPool and non-ThreadPool asynchronous/parallel searches. Necessary for ASP.NET applications to avoid the dreaded “service unavailable” when processing high volumes Strong name signed – Allows referencing in other application that are strong named signed & also can be installed to the Global Assembly Cache (GAC)

Technologies

This component is built using the .NET 3.5 Framework which means in can be used in all .NET applications that are using the 3.5 framework or newer. This includes .NET 3.5, 4.0, & 4.5+.

You can immediately use this within your application and is very simple. Ask any questions or suggest features at support.avantprime.com!