<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" 
      xmlns:thr="http://purl.org/syndication/thread/1.0">
  <link rel="alternate" type="text/html" href="http://www.readwriteweb.com/archives/winecom_offers_rss-based_api.php" />
  <link rel="self" type="application/atom+xml" href="http://www.readwriteweb.com/atom.xml" />
  <id>tag:,2008:/1/tag:72.47.210.69,2007://1.2667-</id>
  <updated>2008-07-07T14:26:22Z</updated>
  <title>Comments for Wine.com Offers RSS-based API</title>
  
  <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.1</generator>
  <entry>
    <id>tag:72.47.210.69,2007://1.2667</id>
    <link rel="alternate" type="text/html" href="http://www.readwriteweb.com/archives/winecom_offers_rss-based_api.php" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.readwriteweb.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=2667" title="Wine.com Offers RSS-based API" />
    <published>2007-07-31T18:57:22Z</published>
    <updated>2007-12-16T23:07:45Z</updated>
    <title>Wine.com Offers RSS-based API</title>
    <summary> We have written here extensively about the rise of web services and the transformation of the web into a platform. In our post When Web Sites Become Web Services we argued that more and more web sites will open their information via an interface. In our post about Yahoo! Pipes we wrote about viewing...</summary>
    <author>
      <name>Alex Iskold</name>
      <uri>http://www.adaptiveblue.com</uri>
    </author>
    
    <category term="Analysis" />
    
    <content type="html" xml:lang="en" xml:base="http://www.readwriteweb.com/">
      <![CDATA[<p><a href="http://www.wine.com"><img src="http://www.readwriteweb.com/images/wine-logo.jpg" vspace="5" haspace="5" align="left"></a> We have written here extensively
about the rise of web services and the transformation of the web into a platform. In our post
<a href="http://www.readwriteweb.com/archives/web_30_when_web_sites_become_web_services.php">When Web Sites Become Web Services</a>
we argued that more and more web sites will open their information via an interface. In our <a href="http://www.readwriteweb.com/archives/yahoo_pipes_web_database.php">post about Yahoo! Pipes</a>
we wrote about viewing the web as a massive, and in essence relational, database. And finally in the post about
the <a href="http://www.readwriteweb.com/archives/the_future_of_rss.php">Future of RSS</a> we looked at the past, present and future uses of the really simple syndication protocol.
</p>

<p>Today we will look at an example of putting all of these elements together. <a href="http://www.wine.com">Wine.com</a> has
launched an innovative way to expose their catalog - via RSS with the API on top. </p>]]>
      <![CDATA[<h2>Evolving the Typical Online Catalog</h2>

<p>Until recently, Wine.com was just a basic wine catalog. It was well designed and easy to navigate,
but it was definitely a web 1.0 kind of site. As the winds of the new web started to blow, the company
realized that it needed to stay on top of the wave. With competitors like <a href="http://www.corkd.com">Corkd</a>,
<a href="http://www.snooth.com">Snooth</a> and the wildly entertaining <a href="http://tv.winelibrary.com">WineLibrary.tv</a> innovating
in the wine space, the Wine.com team knew that they would have to compete for wine lover's attention and dollars.</p>

<p><img src="http://www.readwriteweb.com/images/wine-shop.jpg" vspace="5" hspace="5"></p>

<p>As it turns out, the wine insdustry is highly regulated,
and users may not be able purchase a particular vintage depending on where they live.
Wine.com's catalog maps the vast number of wineries to geographies and ensures that the law is followed.
When the company looked to leverage their assets against the competition, they realized that exposing
the catalog by state to users, partners and third-party developers can help drive more traffic to the site.</p>

<h2>Wine.com's RSS API</h2>

<p>Not only did Wine.com open up its catalog, the company did it with elegance worthy of modern APIs like del.icio.us and Flickr.
The API is implemented via RSS, where each query returns a feed.  Here's a sample query (this is not exact query, it's just meant
to just give you the feel for the API):
</p>

<p><strong>http://www.wine.com/v6/rss/rss.aspx?Ntt=+Kendall%2DJackson&State=CA</strong></p>

<p>When you view the results in the browser you get this:</p>

<p><img src="http://www.readwriteweb.com/images/wine-rss.jpg" vspace="5" hspace="5"></p>    

<p>So to the end user the results look like a regular RSS feed. This means that the user can
add the feed to his or her favorite reader and get updates when the new Kendal Jackson wine comes out in California.
But if you look inside the source code of the feed, you will find that each item is augmented with
complete metadata about each wine.</p>

<p><img src="http://www.readwriteweb.com/images/wine-api-code.jpg" vspace="5" hspace="5"></p>

<p>The included metadata contains a description of the wine, price, winery, year as well as tags done as categories.
Note that it would probably be better to use a custom tag instead of overloading the meaning of the category tag.
For example, <em>&lt;year&gt;</em> would be better than having year listed as a category. Nevertheless, this feed
is essentially equivalent to a results of a query against the Wine.com catalog. Each item represents the matching
wine and contains all of the attributes of this wine.
</p>

<p>The interface is stateless or REST, since the entire resulting feed is returned at once. There is
flexibility in the query, since the query text can be any attribute of the wine, such as name, winery or grape.
That means that the query is performed against the entire catalog and is based on text matching. This makes
it really easy for the end users, but may present scalability challenges for larger databases. Putting it
all together, we get this diagram:</p>

<p><img src="http://www.readwriteweb.com/images/wine-api-chart.jpg" vspace="5" hspace="5"></p>

<h2>When an RSS API Makes Sense</h2>

<p>What Wine.com has done is simple and powerful. They leveraged existing technology -- RSS -- to deliver value
to both end users and developers. The reason this strategy worked for the wine retailer is because they needed to provide
a read-only interface to their catalog. Essentially, all the interface does is expose a way to search Wine.com's database.
Because this is the only requirement and there is no need to expose a way to manipulate the catalog by adding
or updating information, the RSS API works great.
</p>

<p>The only downside of using RSS is that all results must be returned at once. If the query is
broad, for example, get me all merlot wines, returning all results is too expensive.
In the case of Wine.com, the solution is to just return the most recent wines that match the results.
A more generic approach found in relational databases and in services like Amazon S3 is to page through
the results using a result set iterator.</p>

<p>It is clear that the RSS API approach would work for any catalog. It would not work for del.icio.us or Flickr
because these services offer a way to modify the information, not just query it. But coming back to the concept
of the Web as a database, if every retailer would offer this kind of RSS API, the web would be much more semantic,
interconnected and query-friendly.</p>

<h2>Conclusion</h2>

<p>What Wine.com has done is both simple and interesting and it certainly deserves consideration.
One might argue that there is nothing special about augmenting RSS with metadata, but there is nothing
special about any format. What is special is leveraging existing technologies and making things
compatible and interoperable.</p>

<p>The fact that RSS feed can channel metadata can lead to a lot of interesting applications
including, for example, richer widgets. We hope that these early iterations of web services and APIs will
give rise to a new, more connected and richer web where <a href="http://www.readwriteweb.com/archives/web_30_when_web_sites_become_web_services.php">web sites are also web services</a>.</p>]]>
    </content>
  </entry>

  <entry>
    <id>tag:72.47.210.69,2007://1.2667-comment:21613</id>
    <thr:in-reply-to ref="tag:72.47.210.69,2007://1.2667" type="text/html" href="http://www.readwriteweb.com/archives/winecom_offers_rss-based_api.php"/>
    <link rel="alternate" type="text/html" href="http://www.readwriteweb.com/archives/winecom_offers_rss-based_api.php#c21613" />
    <title>Comment from Girish on 2007-07-31</title>
    <author>
        <name>Girish</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>I love the idea of an RSS API so that you can create custom queries.  I think this would be great for the real estate market, so you can keep an eye on listings.</p>

<p>Also, with the use of something like <a href="http://www.kirix.com" rel="nofollow">Kirix Strata</a>, which can open up an RSS feed as a database and do dynamic manipulations and analysis, you would be able to analyze all sorts of data on the web.</p>]]>
    </content>
    <published>2007-07-31T20:00:36Z</published>
  </entry>

  <entry>
    <id>tag:72.47.210.69,2007://1.2667-comment:21614</id>
    <thr:in-reply-to ref="tag:72.47.210.69,2007://1.2667" type="text/html" href="http://www.readwriteweb.com/archives/winecom_offers_rss-based_api.php"/>
    <link rel="alternate" type="text/html" href="http://www.readwriteweb.com/archives/winecom_offers_rss-based_api.php#c21614" />
    <title>Comment from fletcher on 2007-07-31</title>
    <author>
        <name>fletcher</name>
        <uri>http://www.winefetch.com/webmaster-tools.html</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.winefetch.com/webmaster-tools.html">
        <![CDATA[<p>Great post and I agree that Wine.com had to do something, but this seems a bit minor.  Like you said, they basically are taking their search results and making an RSS feed, which is nothing new.  Winefetch.com has been offering this for a while now and they seem to have a much more extensive api.  You can even search all their shops or a single retailer like Wine.com.  I think wine.com needs something more if they are going to try to compete with the non-retailer wine websites.</p>]]>
    </content>
    <published>2007-08-01T05:30:17Z</published>
  </entry>

  <entry>
    <id>tag:72.47.210.69,2007://1.2667-comment:21615</id>
    <thr:in-reply-to ref="tag:72.47.210.69,2007://1.2667" type="text/html" href="http://www.readwriteweb.com/archives/winecom_offers_rss-based_api.php"/>
    <link rel="alternate" type="text/html" href="http://www.readwriteweb.com/archives/winecom_offers_rss-based_api.php#c21615" />
    <title>Comment from beaman on 2007-08-01</title>
    <author>
        <name>beaman</name>
        <uri>http://www.coreybeaman.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.coreybeaman.com">
        <![CDATA[<p>Very nice read. Now where the beer guys doing this? ;)</p>

<p>@girish - thanks for the link. Will look at that later.</p>]]>
    </content>
    <published>2007-08-01T13:44:28Z</published>
  </entry>

  <entry>
    <id>tag:72.47.210.69,2007://1.2667-comment:21616</id>
    <thr:in-reply-to ref="tag:72.47.210.69,2007://1.2667" type="text/html" href="http://www.readwriteweb.com/archives/winecom_offers_rss-based_api.php"/>
    <link rel="alternate" type="text/html" href="http://www.readwriteweb.com/archives/winecom_offers_rss-based_api.php#c21616" />
    <title>Comment from Andr√© Ribeirinho on 2007-08-02</title>
    <author>
        <name>Andr√© Ribeirinho</name>
        <uri>http://www.adegga.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.adegga.com">
        <![CDATA[<p>Very interesting article. I'm trying to add wine.com to Adegga via their RSS API but cannot find any documentation!</p>

<p>The link <a href="http://www.wine.com/v6/rss/product/" rel="nofollow"><a href="http://www.wine.com/v6/rss/product/" rel="nofollow">http://www.wine.com/v6/rss/product/</a></a> is good because it describes the RSS namespace, but where's the API query documentation ?</p>]]>
    </content>
    <published>2007-08-02T17:34:00Z</published>
  </entry>

</feed>