Wine-Searcher.com
 
 
 
 
One of our sponsors is:
Canal's Wine & Liquors Pennsauken
 
 

Wine-Searcher Wine API Documentation

The API documentation in this page is intended for IT developers or programmers. Please contact us if you wish to start using the Wine-Searcher Wine API.

Description

The Wine-Searcher Wine API enables integration of our comprehensive wine search engine with your applications, for free.

Queries are passed to the Wine API via URLs constructed and submitted using the HTTP protocol, just like a web page. Results are returned in XML or JSON, allowing you to format the information as you wish.

Use this API if you wish to:

  • Show the average or min/max prices (ex-tax) for wines within your own website or application.
  • Value the wines in your private cellar.
  • Allow your users to see where they can buy a wine.

Potential users of Wine-Searcher's Wine API are: wine websites, blogs, wine content providers, mobile solution providers, market research companies and anyone interested in wine information.

If an API is too technical or complicated for your needs, you can still integrate with Wine-Searcher by using our web widgets or search box.

The Wine API provides three outputs (a vintage list, a wine names list and a wine list), depending on the parameters supplied. A description of the parameters and outputs follows.

Use of the Wine-Searcher Wine API is subject to the Wine-Searcher API Terms of Use. You may only use the API if you agree to, and abide by, the Terms of Use.

URL Encoding

Wine-Searcher accepts Latin1 (ISO-8859-1) encoding for API requests. 8-bit characters are NOT allowed – they must be represented using % notation (often called URL escaping). For a technical explanation please view the Wikipedia document on percent encoding. Failure to URL escape special characters (such as European characters common in wine names) when querying the Wine-Searcher API will most likely result in 0 wines being returned because our server does not interpret the query correctly.

Parameter explanation
Parameters are passed as querystrings to our base API URL (contact us for this URL).
Parameters are case sensitive.

Required parameters:

Xaffiliate
Required. If this parameter is not supplied with a value you will not receive any results. Please contact us to be assigned an Xaffiliate value to pass with each API request.

Xwinename
Either this or Xvintage is required. If this is not supplied you will receive a list of all the wine names that match the specified vintage.

Xvintage
Either this or Xwinename is required. If this is not supplied you will receive a list of all vintages for the wine (unless there is only one vintage found for the wine phrase).

Wine-Searcher API Outputs
The following provides a description of the XML fields included in each of the three sets of results, starting with a list of the fields common to all.
Common fields across outputs:
Header fields:
return-code
0 – success, wines found
1 – no wines found
2 – input values error
3 – error, database timeout
4 – invalid access code
5 – invalid version, version not supported
99 – unknown error
list-version
list-comment
list-location
list-state
list-currency-code

1. Vintage list:

A list of all the available vintages we find (if more than one vintage is found) for a given wine search phrase. A vintage list is returned if no value is passed in the Xvintage parameter where more than one vintage exists for the wine.

2. Wine Names list (use this list to find the average price ex-tax for a wine – useful for valuations):

A list of the distinct wines found for your search phrase (and vintage and location, if included). By default we will return a single result for the closest match wine. If we cannot find a single match OR Xwidesearch=Y is specified, we will widen the search to include all other matches. If we cannot find a single match AND Xwidesearch=V is specified, no results will be returned (important for valuations to ensure you don't get an incorrect value for your wine).

3. Wine list:

A list of merchants, their contact details, their wine descriptions and their prices for the wines matching your search criteria.
The link URL allows you to browse directly to the merchant's wine detail page (or home page if a detail page does not exist).
Wine-Searcher API Release Notes

Version 4: Released June 2011.

Version 3: Released October 2010.

Version 2: Released October 2009.

Issues? Need more help?

We are always interested to hear of any issues you have or to provide additional help to integrate our API into your application.



 
     

Search for any wine here.

 
Wine Name:
Vintage:
Show:
Merchant State:
Zip Code
proximity

 

   

 

 


Become a Wine-Searcher sponsor and drive traffic to your website

Upgrade your free version to access a wider range of services and discover better deals!