![]() |
University Research Program for Google Search |
|
Google Research Other Google Resources |
DocumentationBelow you will find documentation outlining how to use the University Research Program for Google Search. Please remember that this service is only available for authorized researchers. If you are interested in applying to use this service, please visit the registration page. Also note that in order to provide a reliable service, for each approved application, researchers may use this service for 2 years. After that period, researchers are certainly welcome to reapply. If you have questions or trouble using the service, please visit the forum. RequestProtocolRequests to the search service are performed over HTTP using a GET request. Base URLThe base URL of the search service is: http://research.google.com/university/search/service Request parametersEach search request contains the following parameters. Parameters are appended to the base URL as url-encoded query string arguments as "key=value" pairs, delimited by "&" characters. All of the following parameters are required.
ThrottlingRequests to the service MUST be throttled, otherwise access to the service may be blocked, either temporarily, or permanently. A time period of at least one second must be allowed between requests. Example requestsThe following is an example search query for the term [google], starting with the first search result, with 10 results in the response: http://research.google.com/university/search/service?clid=program-university.edu&start=0&rsz=small&q=google The following is an example search query for the quoted term ["university research"], starting with the 21st search result, with 20 results in the response: http://research.google.com/university/search/service?clid=program-university.edu&start=20&rsz=large&q=%22university+research%22 ResponseResponse codes200 OKThe service will return an HTTP 200 OK status code on a successful request. The search results will follow in the body of the response. 400 Bad RequestThe service will return an HTTP 400 Bad Request status code on invalid requests, such as when one or more of the required query parameters is missing or can not be parsed. The request should not be retried. 403 ForbiddenThe service will return an HTTP 403 Forbidden status code if the specified "clid" and the client IP address do not match those required for access to the service. The request should not be retried with this clid from this client IP address. 500 Internal Server ErrorThe service will return an HTTP 500 Internal Server Error status code if the server can not handle the request for unanticipated reasons. The request may be retried after a delay of at least one second. 503 Service UnavailableThe service will return an HTTP 503 Service Unavailable status code if the server is busy or if the client has sent too many requests within a given time interval. The request may be retried after a delay of at least one second. NamespaceThe XML namespace of the search response elements is: http://research.google.com/university/search Response ElementsSuccessful search queries will return an XML document containing the search results, with the following RELAX NG schema:
default namespace = "http://research.google.com/university/search"
element GSP { # Root element.
element Q { text }, # The original query.
# PARAM[@name='num'] contains the number of results requested.
# PARAM[@name='start'] contains the start position requested.
element PARAM {
attribute name { "num" | "start" },
attribute value { xsd:integer }
}+,
# The resultset. Will not be returned if there are no matches.
element RES {
# The position of the first element returned (1-based).
attribute SN { xsd:integer },
# The position of the last element returned (1-based).
attribute EN { xsd:integer },
# Estimated total matches.
element M { xsd:integer },
# A single result.
element R {
# Position of this result in the total resultset (1-based).
attribute N { xsd:integer },
# The URL of the result.
element U { text },
# The escaped URL of the result.
element UE { text },
# The title of the result.
element T { text },
# The title of the result with bold tags stripped out.
element TNB { text }
}+
}?
}
The "GSP" elementThe root element of the search response. Children: The "Q" elementContains the search terms specified in the search request. Parent: The "PARAM" elementEchoes the request parameters. When the When the Parent: Attributes: The "RES" elementThe result set. Contains the search result elements. Will not be returned if there are zero matching search results. The value of the The value of the Parent: Attributes: Children: The "M" elementThe estimated total matches. Parent: The "R" elementA single search result. The value of the Parent: Attributes: Children: The "U" elementThe URL of this search result. Parent: The "UE" elementThe url-escaped URL of this search result. Parent: The "T" elementThe title of this search result, with the search terms enclosed in XML-encoded <b></b> tags. Parent: The "TNB" elementThe title of this search result. Parent: Example response
<?xml version="1.0" encoding="utf-8"?>
<GSP xmlns="http://research.google.com/university/search">
<Q>google</Q>
<PARAM name="num" value="10"/>
<PARAM name="start" value="0"/>
<RES SN="1" EN="10">
<M>74400000</M>
<R N="1">
<U>http://www.google.com/</U>
<UE>http://www.google.com/</UE>
<T><b>Google</b></T>
<TNB>Google</TNB>
</R>
<R N="2">
<U>http://www.google.com/addurl/</U>
<UE>http://www.google.com/addurl/</UE>
<T>Add your URL to <b>Google</b></T>
<TNB>Add your URL to Google</TNB>
</R>
<R N="3">
<U>http://maps.google.com/</U>
<UE>http://maps.google.com/</UE>
<T><b>Google</b> Maps</T>
<TNB>Google Maps</TNB>
</R>
<R N="4">
<U>http://news.google.com/</U>
<UE>http://news.google.com/</UE>
<T><b>Google</b> News</T>
<TNB>Google News</TNB>
</R>
<R N="5">
<U>http://video.google.com/</U>
<UE>http://video.google.com/</UE>
<T><b>Google</b> Video</T>
<TNB>Google Video</TNB>
</R>
<R N="6">
<U>http://groups.google.com/</U>
<UE>http://groups.google.com/</UE>
<T><b>Google</b> Groups</T>
<TNB>Google Groups</TNB>
</R>
<R N="7">
<U>http://images.google.com/</U>
<UE>http://images.google.com/</UE>
<T><b>Google</b> Image Search</T>
<TNB>Google Image Search</TNB>
</R>
<R N="8">
<U>http://www.google.org/</U>
<UE>http://www.google.org/</UE>
<T><b>Google</b>.org</T>
<TNB>Google.org</TNB>
</R>
<R N="9">
<U>http://directory.google.com/</U>
<UE>http://directory.google.com/</UE>
<T><b>Google</b> Directory</T>
<TNB>Google Directory</TNB>
</R>
<R N="10">
<U>http://earth.google.com/</U>
<UE>http://earth.google.com/</UE>
<T><b>Google</b> Earth</T>
<TNB>Google Earth</TNB>
</R>
</RES>
</GSP>
Example CodeTo see some sample code, click here. |