Introducing the AJAX Patent Search API

June 10, 2008

We are pleased to announce the newest member in the AJAX Search API family - the Patent Search API. This API uses the Google Patent Search service and gives you the ability to search over 7 million patents.

Using the API is easy. First load the API into your page using the AJAX API Loader

google.load("search", "1");

Now schedule your startup code to run once the DOM is ready. This is easy to do by using the google.setOnLoadCallback() method. This will call the function you specified once the DOM is ready.

google.setOnLoadCallback(onLoad, true);
You are now ready to use the Patent Search API methods. If you are using the basic search control you would need to do the following:
var searchControl = new GSearchControl();
var ps = new GpatentSearch()
searchControl.addSearcher(ps);
The API returns a collection of GpatentResult objects. Each result object contains information about a patent - including - title of the patent, snippet style description, application filing date, patent status, patent number, patent assignees, thumbnail image URL for the patent, etc.

By default the API returns a mix of filed as well as issued patents in the result set. However you can restrict the API to return just filed or just issued patents for your search results. Say you want to see only issued patents in your search results, then you would do the following:
ps.setRestriction(GSearch.RESTRICT_TYPE, GpatentSearch.TYPE_ISSUED_PATENTS);
The default behavior of this searcher is to return results ordered by their relevance. In some cases, it is useful to see results ordered by date. You can use the following method to change the result order.
// order by date, newest first
patentSearch.setResultOrder(GSearch.ORDER_BY_DATE);

// order by date, oldest first
patentSearch.setResultOrder(GSearch.ORDER_BY_ASCENDING_DATE);
Now for some examples. Here are two basic sample applications that have the Patent Search built into them.
Here is another example that uses the raw patent searcher:
For more information on how to use the Patent Search API in your code, please refer to the documentation here.

We would love to hear from you. Let us know what you think in the developer forum.