Query

17 views
Skip to first unread message

Anthony White

unread,
Nov 23, 2009, 9:11:08 AM11/23/09
to opens...@googlegroups.com

Hi,

Does Google support the Opensearch standard? There are various blogs out there saying it does not…if it does, where can I find the URL syntax etc?

 

Regards

Anthony White

Ed Summers

unread,
Dec 7, 2009, 12:32:08 PM12/7/09
to opens...@googlegroups.com
Hi Anthony:

gdata (Google's API) supports OpenSearch:

http://code.google.com/apis/gdata/docs/2.0/reference.html

Just scan for 'opensearch' in that page.

It would be great to see some OpenSearch Descriptions and rel="search"
used more across Google's properties. Technically it would be trivial
since many of Google's APIs (Google Books for example) already support
search results in Atom using tags from the OpenSearch namespace.

I guess Dewitt is in a better position to say what has been done, and
what may be done in the future in this area. :-)

//Ed

Ross Singer

unread,
Dec 7, 2009, 1:01:54 PM12/7/09
to opens...@googlegroups.com
That being said, I don't think that "Google Search" is supported in GData.
http://code.google.com/apis/gdata/docs/directory.html

Instead, you have to use the AJAX API (which, unintuitively, doesn't
require being accessed via JS):
http://googlesystem.blogspot.com/2008/04/google-search-rest-api.html

-Ross.
> --
>
> You received this message because you are subscribed to the Google Groups "OpenSearch" group.
> To post to this group, send email to opens...@googlegroups.com.
> To unsubscribe from this group, send email to opensearch+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/opensearch?hl=en.
>
>
>

DeWitt Clinton

unread,
Dec 7, 2009, 4:54:09 PM12/7/09
to opens...@googlegroups.com
I agree that Google should publish rel="search" discovery elements and description documents for more properties.  Some properties do, but there's no reason not to do it on more.  Just a matter of getting it done, really.  (If you're interested, I'm happy to help start the interview process!)

If we (the industry) ever have a standard for JSON formatted search results, then it would be nice to see the Google Ajax APIs converge with it.  In the past none of the straightforward full-fidelity conversions of Atom to JSON have really felt quite right to me, and I've always wanted to find something that struck the balance of looking like idiomatic JSON, but carrying enough data to be useful.  We (Google) are actually getting close to something that I like enough to propose as a strawman for consideration here, but I don't have anything to show quite yet.   Soon, I hope.

-DeWitt

Andrew Turner

unread,
Dec 7, 2009, 11:16:08 PM12/7/09
to opens...@googlegroups.com
Anthony White wrote:

Hi,

Does Google support the Opensearch standard? There are various blogs out there saying it does not�if it does, where can I find the URL syntax etc?

I ran across this today:
http://mvinetwork.co.uk/opensearch/

not official, but works nonetheless and useful :)

�

Regards

Anthony White

--

You received this message because you are subscribed to the Google Groups "OpenSearch" group.
To post to this group, send email to opens...@googlegroups.com.
To unsubscribe from this group, send email to opensearch+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/opensearch?hl=en.

Tony Hammond

unread,
Dec 8, 2009, 6:12:13 AM12/8/09
to opens...@googlegroups.com
Hi:

I wanted to pick up on this point that DeWitt just made:

> If we (the industry) ever have a standard for JSON formatted search results, then it would
> be nice to see the Google Ajax APIs converge with it. In the past none of the
> straightforward full-fidelity conversions of Atom to JSON have really felt quite right to me,
> and I've always wanted to find something that struck the balance of looking like idiomatic
> JSON, but carrying enough data to be useful. We (Google) are actually getting close to

In fact I had been intending anyway to raise the matter here as I was
concerned about reconciling our service with the Google AJAX Feed API.

With nature.com OpenSearch (http://www.nature.com/opensearch) we offer
three OpenSearch type responses: RSS 1.0, ATOM and JSON. We aimed to
make our JSON a faithful rendition of the ATOM feed with some obvious
changes in respect of JSON limitations on repeated keys, etc. All of
our feeds carry rich metadata properties. All of our feeds are
OpenSearch (and SRU) compliant.

By contrast, the Google AJAX Feed API seems to have a JSON format that
is a sort of lowest common denominator between ATOM and RSS (which is
nonetheless a useful thing). As far as I can see though it does not
preserve any additional metadata properties. And as one example of
that it does not preserve even the OpenSearch properties or the
OpenSearch navigational links (next, previous, etc.)

See below for a comparison of the JSON returned from the Google AJAX
Feed API with our nature.com native JSON (ATOM profile) feed. First
the entries, second the feed elements, and third the root elements.

(Note also this earlier post [1] to CrossTech about OpenSearch
response formats.)

I am less sure now of the utility of the Google AJAX Feed API in
handling rich metadata result sets. I remain interested though in
reconciliation.

Cheers,

Tony

[1] http://www.crossref.org/CrossTech/2009/07/opensearch_formats_for_review.html

==

1a. Google - Entry

{
"title": "Gene frequency clines for host races of
Rhagoletis pomonella in the…",
"link": "http://dx.doi.org/10.1038/hdy.1989.98",
"author": "",
"publishedDate": "Tue, 08 Dec 2009 02:28:59 -0800",
"contentSnippet": " \n Gene frequency clines for host
races of Rhagoletis pomonella in…",
"content": "<div> <p>\n <b>Gene frequency clines for
host races of Rhagoletis p…",
"categories": [ ]
},

1b. Nature - Entry

{
"title": "Gene frequency clines for host races of
Rhagoletis pomonella in the Midwestern United States",
"link": "http://dx.doi.org/10.1038/hdy.1989.98",
"id": "http://dx.doi.org/10.1038/hdy.1989.98",
"updated": "2009-12-08T10:37:07+00:00",
"content": null,
"dc:identifier": "doi:10.1038/hdy.1989.98",
"dc:title": "Gene frequency clines for host races of
Rhagoletis pomonella in the Midwestern United States",
"dc:creator": [
"Jeffrey L Feder",
"Guy L Bush"
],
"prism:publicationName": "Heredity",
"prism:issn": "0018-067X",
"prism:eIssn": "1365-2540",
"prism:doi": "10.1038/hdy.1989.98",
"dc:publisher": "Nature Publishing Group",
"prism:publicationDate": null,
"prism:volume": "63",
"prism:number": "2",
"prism:startingPage": "245",
"prism:url": "http://dx.doi.org/10.1038/hdy.1989.98",
"prism:copyright": "© 1989 The Genetical Society of
Great Britain",
"prism:alternateTitle": "hdy",
"sru:recordSchema": "info:srw/schema/11/pam-v2.1",
"sru:recordPacking": "unpacked",
"sru:recordData": {
"pam:message": {
"pam:article": {
"xhtml:head": {

}
}
}
},
"sru:recordPosition": 1
},

2a. Google - Feed

"feed": {
"title": "nature.com OpenSearch: apple",
"link":
"http://www.nature.com/opensearch/request?version=1.1&amp;operation=…",
"author": "Nature Publishing Group",
"description": "The nature.com OpenSearch service provides a
structured resource di…",
"type": "atom10",
"entries": [
...
]
}

2b. Nature - Feed

"feed": {
"title": "nature.com OpenSearch: apple",
"subtitle": "The nature.com OpenSearch service provides a
structured resource discovery facility for content hosted on
nature.com.",
"id": "urn:uuid:96a2b87a-bbf7-4a1a-a73b-3ee619ed3951",
"author": {
"name": "Nature Publishing Group",
"uri": "http://www.nature.com",
"email": "inter...@nature.com"
},
"updated": "2009-12-08T10:37:07+00:00",
"rights": "© 2009 Nature Publication Group",
"icon": "http://www.nature.com/opensearch/common/imgs/npg_icon.jpg",
"link": [
{
"rel": "self",
"href":
"http://www.nature.com/opensearch/request?version=1.1&operation=searchRetrieve&query=apple&httpAccept=application/json&recordPacking=unpacked&sortKeys=&maximumRecords=25&startRecord=1",
"type": "application/json"
},
{
"rel": "first",
"href":
"http://www.nature.com/opensearch/request?version=1.1&operation=searchRetrieve&query=apple&httpAccept=application/json&recordPacking=unpacked&sortKeys=&maximumRecords=25&startRecord=1",
"type": "application/json"
},
{
"rel": "next",
"href":
"http://www.nature.com/opensearch/request?version=1.1&operation=searchRetrieve&query=apple&httpAccept=application/json&recordPacking=unpacked&sortKeys=&maximumRecords=25&startRecord=26",
"type": "application/json"
},
{
"rel": "last",
"href":
"http://www.nature.com/opensearch/request?version=1.1&operation=searchRetrieve&query=apple&httpAccept=application/json&recordPacking=unpacked&sortKeys=&maximumRecords=25&startRecord=4352",
"type": "application/json"
},
{
"rel": "search",
"href": "http://www.nature.com/opensearch/opensearch.xml",
"type": "application/opensearchdescription+xml"
}
],
"dc:publisher": "Nature Publishing Group",
"dc:language": "en",
"dc:rights": "© 2009 Nature Publication Group",
"prism:copyright": "© 2009 Nature Publication Group",
"prism:rightsAgent": "permi...@nature.com",
"opensearch:totalResults": 4352,
"opensearch:startIndex": 1,
"opensearch:itemsPerPage": 25,
"opensearch:Query": [
{
"opensearch:role": "request",
"opensearch:searchTerms": "apple"
}
],
"sru:numberOfRecords": 4352,
"sru:resultSetId": "16038157-09d5-43fd-907c-a993fbb2912d",
"sru:nextRecordPosition": "26",
"sru:echoedSearchRetrieveRequest": {
"sru:version": "1.1",
"sru:query": "apple",
"sru:startRecord": null,
"sru:maximumRecords": null,
"sru:recordPacking": "unpacked",
"sru:recordSchema": "default",
"sru:sortKeys": null
},
"sru:extraResponseData": {
"npg:databaseTitle": "nature.com OpenSearch",
"npg:copyright": "© 2009 Nature Publication Group",
"npg:datetime": "2009-12-08T10:37:07+00:00",
"npg:responseId": "96a2b87a-bbf7-4a1a-a73b-3ee619ed3951",
"npg:httpAccept": "application/json"
},
"entry": [
...
]
}

3a. Google - Root Element

{
"n": "json",
"status": {
"code": 200
},
"feed": {
...
}
}

3b. Nature - Root Element

{
"comment": "nature.com OpenSearch:
urn:uuid:96a2b87a-bbf7-4a1a-a73b-3ee619ed3951",
"namespaces": {
"_": "http://www.w3.org/2005/Atom",
"dc": "http://purl.org/dc/elements/1.1/",
"diag": "http://www.loc.gov/zing/srw/diagnostic/",
"npg": "http://www.nature.com/opensearch/ns/sru/",
"opensearch": "http://a9.com/-/spec/opensearch/1.1/",
"pam": "http://prismstandard.org/namespaces/pam/2.0/",
"prism": "http://prismstandard.org/namespaces/basic/2.0/",
"sru": "info:srw/xmlns/1/sru-2-0-v1",
"xhtml": "http://www.w3.org/1999/xhtml"
},
"feed": {
...
}
}

DeWitt Clinton

unread,
Dec 8, 2009, 1:53:17 PM12/8/09
to opens...@googlegroups.com
Right on.  This is exactly what I hoped to capture at http://www.opensearch.org/Community/JSON_Formats (which includes the CrossTech discussion).  Please add any additional ones we discover.

As far as the Ajax Feed API goes, I'd agree that it is a fine point of reference, but we can do better for a generic format.  As mentioned above, Google currently can emit full-fidelity JSON formatted data for its Atom-based feeds, as documented here: http://code.google.com/apis/gdata/docs/json.html.  For example:


However, we're finding that even this format is too heavyweight, and not idiomatic enough, for in-browser applications.  Hence we're working on something that fits in the middle a bit better, called JSONC.  We talked a bit about JSONC at Google I/O last year: http://code.google.com/events/io/2009/sessions/EvolutionGoogleDataProtocol.html.

We haven't officially documented the new format yet and things might still change, but as a preview for people here, you can take a look at a live JSONC feed from YouTube:


I'd be very interested in your feedback, as of all the formats I've seen, JSONC has felt the most natural and json-like, but still offers the potential for carrying enough data to be useful beyond plain content feeds.  However since lossless round-tripping with Atom is an explicit non-goal, I wonder if people here will find it rich enough.  (My personal feeling is that if you want full fidelity, you should use XML and Atom -- if you want search results consumable by JSON parsers, make it look like JSON.)

Thoughts?

-DeWitt

   }
}

Jo Walsh

unread,
Jan 14, 2010, 7:43:30 PM1/14/10
to opens...@googlegroups.com, Tony Hammond
dear Tony, thanks for the link.

On 08/12/2009 11:12, Tony Hammond wrote:
> With nature.com OpenSearch (http://www.nature.com/opensearch) we offer
> three OpenSearch type responses: RSS 1.0, ATOM and JSON. We aimed to
> make our JSON a faithful rendition of the ATOM feed with some obvious
> changes in respect of JSON limitations on repeated keys, etc. All of
> our feeds carry rich metadata properties. All of our feeds are
> OpenSearch (and SRU) compliant.

I have heard that at Nature you've also done a lot of work making
resources available in RDF.

I wonder if your OpenSearch effort has any connection to it, and whether
the RSS result feed re-uses any of that RDF work.

Also wondering if you have used GeoJSON/GeoRSS and the OpenSearch Geo
extensions for content which has some kind of spatial reference -
http://geojson.org/

cheers,


jo
--


Reply all
Reply to author
Forward
0 new messages