|
|
|
|
|
|
|
|
|
|
|
| |
|
| |
The Google API help for Developers
The Google API for API developers: Lets go over some basics
first (yes I know most developers know this),however for the lesser mortals an
API stands for Application Programming Interface.
Google stopped giving out new SOAP API keys
http://code.google.com/apis/soapsearch/ some time ago and now they
offer a new service called the
AJAX Search API for developers.
More information on latest Google API
can be found on http://code.google.com/apis/ajaxsearch/
The google API is a very useful interface providing developers
the ability to create many useful tools, generate customized results and
control presentation of these results. The most popular tools created by the
Google API are as below:
Google API Tools
The market dynamics of each project varies and depends on various factors like
the target marget, the project goals etc and these are established in the
project elaboration phases.
-
The Index Status Tool : This tool checks the number of web pages indexed in the
google database for a given domain.
-
The Keyword Position Tool: This would check the position of a domain on the
SERPs for a given keyphrase for a particular domain.
-
Link Check Tool: This tools returns the total number of link for a domain.
The above is the most common implementation of the Google API, however the API
is quite powerful and can be used to create other tools as well. Without more
ado, lets gets started and see how we can use the API tool.
Google API Key
Before we can start using the API we need a key from google, please visit the
Google API
AJAX Search API page to apply for a key first.
Once you obtain the key it's always a good idea to know what you can do with
the API and what you cant. A great place to start is to read all about the API
in the Google API Documentation online
http://code.google.com/apis/ajaxsearch/documentation/
NOTE: If you have an older SOAP API then you can view their API terms of
service here
http://code.google.com/apis/soapsearch/api_terms.html
|
| |
Google API
Search Query Form Google API Supports many parameters and filters which
you can use to restrict and filter the results a complete list can be found
here
http://code.google.com/apis/soapsearch/reference.html#3_1
The form below is a advanced query form where you can filter and control what
you want returned from the Google API. |
| |
|
| |
|
|
|
The Google API CODE
Below we have a simple code to generate the search results for a query In this
example, we will be using the .NET Code that allow developers to create and
consume web services based on SOAP. You can download the script FREE : The
Google API Search Script.
<script runat="server">
public void Page_Load(object sender, EventArgs e)
{
if (Page.IsValid)
{
// Create a Google Search object
Google.GoogleSearchService s = new Google.GoogleSearchService();
// Invoke the search method
Google.GoogleSearchResult r = s.doGoogleSearch("licence key..",
"Text to search", 0, 1, false, "", false, "", "", "");
// Extract the estimated number of results for the search and display it
int estResults = r.estimatedTotalResultsCount;
// Display Search Result in a label
searchResultLabel.Text = Convert.ToString(estResults);
}
}
</script>
|
|
|
|