Pro Version | USD Change Currency | Help | Mobile Site
Advertisements

Wine-Searcher API Documentation

This page is intended for IT developers or programmers. If you have consulted the information below and are happy to comply with our API Terms of Use please complete this simple online form.

Description

Our free API enables you to integrate your application with our comprehensive wine search engine. It generates three key outputs:

  • the list of vintages available for a wine (from our full data).
  • the ex-tax average, min. and max. prices for a wine (from our full data).
  • a list of suppliers and prices for a particular wine (from our restricted free-for-use data).

The principal users of the Wine-Searcher API are wine websites, blogs, wine content providers, mobile solution providers and market research companies. Access is free for up to 5000 requests per day. If an API is too complicated for your needs, here are some simple (but effective) ways to integrate with Wine-Searcher.

The Wine-Searcher API is a RESTful web service. Queries are passed to the API via URLs constructed and submitted using the HTTP protocol (specifically the HTTP GET method), just like a web page. Results are returned as XML or JSON data, allowing you to format the information as you wish.

URL Encoding & Prohibited Characters
  • Wine-Searcher accepts Latin1 (ISO-8859-1) encoding for API requests.
  • 8-bit characters must be represented using the appropriate percent encoding (or 'URL escaping').
  • Percent encoding must be used for all special characters (e.g. accented characters like â, é, í, ò and ü).
  • Percent ‘%’ and forward slash ‘/’ symbols used in any way other than percent encoding will cause API requests to fail.

Parameter explanation

Parameters are passed as querystrings to our base API URL. The URL will be supplied when you are assigned an API key.
Parameters are case sensitive.

Required parameters:

Xkey
Required. If this parameter is not supplied with a value you will not receive any results. Please Submit an online request to be assigned a Xkey value (API Key) 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 for a given wine search phrase. A vintage list is returned if no value is passed in the Xvintage parameter, and if more than one vintage exists for the wine.

2. Wine Names list:

This is useful for valuations as it shows ex-tax average prices

A list of the distinct wines matching your search phrase (and vintage and location, if included). By default we 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).

List Selection:

The Xwinename, Xvintage and Xkeyword_mode together determine which kind of output list is returned in response to an API call.

Wine-Searcher API Release Notes

Version 5: Released June 2012.

Version 4: Released June 2011.

Version 3: Released October 2010.

Version 2: Released October 2009.



Issues? Need more help? Contact us.

Advertisements