Developer Network Home - Help

Documentation for Yahoo! Shopping Web Services: Product Search

Version 1Shopping Web Services : Product Search

Submitting Product Search Queries

The Product Search service allows you to search the Internet for product offerings from Yahoo! Shopping. See also the Merchant Search, Catalog Specs, Catalog Listing and User Product Review services.

Support & Community

The Product Search service is discussed on the yws-shopping mailing list.

Request URL

http://api.shopping.yahoo.com/ShoppingService/V1/productSearch

Request parameters

See information on constructing REST queries

Parameter Value Description
appid string (required) The application ID. See Application IDs for more information.
query string (required) The query to search for.
results integer: default 10, max 50 The number of results to return.
start integer: default 1 The starting result position to return (1-based). The finishing position (start + results - 1) cannot exceed 300.
merchantid integer: default no value If specified, the service will only return results offered by that merchant.
highestprice floating point number: default no value The maximum price for returned results (in US dollars).
lowestprice floating point number: default no value The minimum price for returned results (in US dollars).
sort relevance (default), or price If price is specified, the results will be returned in ascending order of price. Otherwise, the most relevant results will be displayed first.
department integer: default no value The specific department of Yahoo! Shopping to search in. See Supported Department Codes.

Sample Request Url: http://api.shopping.yahoo.com/ShoppingService/v1/productSearch?appid=YahooDemo&query=ipod+shuffle

Response fields

The schema document for this service response is located at http://api.shopping.yahoo.com/shoppingservice/v1/productsearch.xsd

Field Description
ResultSet Contains all of the query responses. Has attributes:
  • totalResultsAvailable: The number of query matches in the database.
  • totalResultsReturned: The number of query matches returned. This may be lower than the number of results requested if there were fewer total results available.
  • firstResultPosition: The position of the first result in the overall search.
  • spellSuggestion: This optional attribute is returned when common spelling mistakes are detected in the query (i.e. digital camera, which would prompt a suggested query of digital camera).
Result Contains each individual product offering. A Result will either contain a Catalog or an Offer. Details for each of these types are listed below.

Catalog response fields

Field Description
Catalog Contains the data for a Yahoo! Shopping OfferCatalog Buyer's Guide. Has attributes:
Url The URL for the corresponding catalog page on Yahoo! Shopping.
ProductName The name of the product.
PriceFrom The lowest price (in US dollars) for the product in this catalog.
PriceTo The highest price (in US dollars) for the product in this catalog.
Thumbnail The URL of a product thumbnail image and its height and width in pixels.
Summary A short description of the product.
Description A longer description of the product.
UserRating An enclosing tag for user rating information for this product.
MaxRating A value from 1 (worst) to 5 (best) representing the maximum rating given to this product by a user.
NumRatings The number of users who have rated this product.
AverageRating A value from 1 (worst) to 5 (best) representing the average rating given to this product by a user.
RatingUrl The Url to the ratings page for this product on Yahoo! Shopping.
CreateRatingUrl The Url to the page for posting reviews of this product on Yahoo! Shopping.
SpecificationList Contains product specifications in key/value pairs
Specification Contains an individual key/value specification pair
SpecificationLabel Contains the label for the specification.
SpecificationValue Contains the value for the specification.

Offer response fields

Field Description
Offer Contains the data for an individual merchant offering of a product.
Url The URL for the product page on the merchant site.
ProductName The name of the product.
Price Price of the product in US dollars.
Thumbnail The URL of a product thumbnail image and its height and width in pixels.
Summary A short description of the product.
Merchant Contains the name of the merchant making this offer. Has attributes:

Sample response

The following is a sample response for the query iPod Shuffle:

Additional Terms of Service

When calling the shopping APIs, you must set the HTTP user agent to a valid web browser string. Bot and spider strings are not valid. The user agent can be set to some default value - it does not have to be changed based on the user's browser. Some examples are as follows:

More information on user agents can be found at http://en.wikipedia.org/wiki/user_agent.

For all Web sites and applications that present data from the Yahoo! Shopping API, the attribution text "Powered by Yahoo! Shopping" must be presented.

Rate Limit

The Product Search service is a part of the Yahoo! Shopping Web Services, which are limited to 5,000 queries per appid per day. See information on rate limiting.

Errors

The Product Search service returns the standard errors. A 999 error is returned if the query limit has been exceeded.

Copyright © 2008 Yahoo! Inc. All rights reserved.

Privacy Policy - Terms of Service - Copyright Policy - Job Openings