eBay Merchandising APIVersion 1.5.0
 

getSimilarItems

Note: All calls in the Merchandising API have been deprecated as of July 29, 2024, and will be decommissioned on January 6, 2025.

Retrieves recommended similar items for a specified item. Items are considered similar if they can serve as a replacement for the specified item. Similar items from a catalog are associated with the same product. For items not associated with a product, similarity with other items is determined from keywords in the title and attribute value matches. This call can be used to recommend items to buyers who have lost items they were bidding on, or to recommend items as alternatives for watched items that have ended.

The recommended similar items returned can be restricted by category, maximum price, or end time for the listing.

The request must include itemId.

Note: Due to an eBay platform change in January 2015, the country code IN (India) is no longer supported for this call.



Input

See also Samples.

The box below lists all fields that could be included in the call request. To learn more about an individual field or its type, click its name in the box (or scroll down to find it in the table below the box).

<?xml version="1.0" encoding="utf-8"?>
<getSimilarItemsRequest xmlns="http://www.ebay.com/marketplace/services">
  <!-- Call-specific Input Fields -->
  <categoryId> string </categoryId>
  <!-- ... more categoryId values allowed here ... -->
  <categoryIdExclude> string </categoryIdExclude>
  <!-- ... more categoryIdExclude values allowed here ... -->
  <endTimeFrom> dateTime </endTimeFrom>
  <endTimeTo> dateTime </endTimeTo>
  <itemId> string </itemId>
  <listingType> token </listingType>
  <maxPrice> Amount (double) </maxPrice>
  <!-- Standard Input Fields -->
  <affiliate> Affiliate
    <customId> string </customId>
    <networkId> string </networkId>
    <trackingId> string </trackingId>
  </affiliate>
  <maxResults> int </maxResults>
</getSimilarItemsRequest>
Argument Type Occurrence Meaning
Call-specific Input Fields [Jump to standard fields]
categoryId string Optional,
repeatable: [0..*]
Results are limited to items from the specified category only. Up to three category IDs can be specified. You cannot specify both categoryId and categoryIdExclude in the same request.
categoryIdExclude string Optional,
repeatable: [0..*]
Items from the specified category are excluded from the results. Up to three category IDs can be specified. You cannot specify both categoryId and categoryIdExclude in the same request.
Max length: 19.
endTimeFrom dateTime Optional Limits the results to items ending after the specified time. Specify a time in the future. If you specify a time in the past, the current time is used. Specify the time in GMT.
endTimeTo dateTime Optional Limits the results to items ending before the specified time. within a time range. If you are specifying a time range with EndTimeFrom, EndTimeFrom must be specified (with a value equal to or earlier than EndTimeTo). Specify the time in GMT.
itemId string Required The ID of an active item listing or a listing that has ended less than two weeks ago.
Max length: 19.
listingType token Optional Filters items based on the format of the listing. If listingType is not specified, all listing types can be returned unless another relevant filter is specified.

Applicable values:
AdType
Advertisement to solicit inquiries on listings such as real estate. Permits no bidding on that item, service, or property. To express interest, a buyer fills out a contact form that eBay forwards to the seller as a lead. This format does not enable buyers and sellers to transact online through eBay, and eBay Feedback is not available for ad format listings.
Chinese
Single-quantity online auction format. A Chinese auction has a Quantity of 1. Buyers engage in competitive bidding, although Buy It Now may be offered as long as no bids have been placed. Online auctions are listed on eBay.com, and they are also listed in the seller's eBay Store if the seller is a Store owner.
Dutch
Multiple-quantity online auction format. A Dutch auction has a Quantity greater than 1. Buyers engage in competitive bidding. Some sites also offer Buy It Now for Dutch auctions. Online auctions are listed on eBay.com, and they are also listed in the seller's eBay Store if the seller is a Store owner.
FixedPriceItem
A basic fixed-price item format. Bids do not occur. The quantity of items is one or more. Also known as Buy It Now Only on some sites (not to be confused with the BuyItNow option that is available for Chinese auctions). Fixed-price listings are listed on eBay.com, and they are listed in the seller's eBay Store if the seller is a Store owner.
LeadGeneration
Lead Generation format (advertisement-style listing to solicit inquiries or offers, no bidding or fixed price, listed on eBay).
StoresFixedPrice
A fixed-price format for eBay Store sellers. Store Inventory listings appear after other listings in regular browse and search item lists on eBay. They have a lower Insertion Fee and longer listing durations. Only available to sellers who have an eBay Store. Store Inventory listings are listed on eBay.com, and they are also listed in the seller's eBay Store.

Max length: 19.
maxPrice Amount (double) Optional Specifies the maximum current price an item can have to be included in the response. The currencyId you specify must match the currency corresponding to the global ID value passed in the request. If no global ID is specified, you must specify USD.
Standard Input Fields
affiliate Affiliate Optional Container for affiliate details. eBay uses the specified affiliate details to build a View Item URL and Product URL string in the response that includes your affiliate tracking information in the correct format. When a user clicks through these URLs to eBay and performs certain tasks, you may get an affiliate commission.

See the eBay Partner Network for information about commissions.
affiliate.customId string Optional Need not be specified. You can define an AffiliateUserID (up to 256 characters) if you want to leverage it to better monitor your marketing efforts. If you are using the eBay Partner Network, and you provide an AffiliateUserID, the tracking URL returned by eBay Partner Network will contain the AffiliateUserID, but it will be referred to as a "customid".
affiliate.networkId string Optional Specifies your tracking partner for affiliate commissions. Affiliates earn money from eBay for driving traffic to eBay. Required if you specify a TrackingID. Depending on your tracking partner, specify one of the following values. Not all partners are valid for all sites. For PlaceOffer, only eBay Partner Network and Mediaplex are valid:
2 = Be Free
3 = Affilinet
4 = TradeDoubler
5 = Mediaplex
6 = DoubleClick
7 = Allyes
8 = BJMT
9 = eBay Partner Network For information about commissions, see the eBay Partner Network.
affiliate.trackingId string Optional The value you specify is obtained from your tracking partner. For eBay Partner Network, the TrackingID is the Campaign ID ("campid") provided by eBay Partner Network. A Campaign ID is a 10-digit, unique number to be used for associating traffic. A Campaign ID is valid across all programs to which you have been accepted. Another example is the Affiliate ID given to you by TradeDoubler.
maxResults int Optional Specifies the maximum number of entries to return in a single call. If the number of entries that can be returned is less than the value you specify, the lower number is returned. Values less than 1 or greater than 50 (or 20 in the case of getTopSellingProducts) will be ignored.
Min: 1. Max: 50. Default: 20.



Output

See also Samples.

The box below lists all fields that might be returned in the response. To learn more about an individual field or its type, click its name in the box (or scroll down to find it in the table below the box).

<?xml version="1.0" encoding="utf-8"?>
<getSimilarItemsResponse xmlns="http://www.ebay.com/marketplace/services">
  <!-- Call-specific Output Fields -->
  <itemRecommendations> ItemRecommendations
    <item> Item
      <bidCount> int </bidCount>
      <buyItNowPrice currencyId="string"> Amount (double) </buyItNowPrice>
      <country> string </country>
      <currentPrice currencyId="string"> Amount (double) </currentPrice>
      <discountPriceInfo> DiscountPriceInfo
        <originalRetailPrice currencyId="string"> Amount (double) </originalRetailPrice>
        <pricingTreatment> PriceTreatmentEnum </pricingTreatment>
        <soldOffEbay> boolean </soldOffEbay>
        <soldOnEbay> boolean </soldOnEbay>
      </discountPriceInfo>
      <globalId> string </globalId>
      <imageURL> anyURI </imageURL>
      <itemId> string </itemId>
      <originalPrice currencyId="string"> Amount (double) </originalPrice>
      <primaryCategoryId> string </primaryCategoryId>
      <primaryCategoryName> string </primaryCategoryName>
      <shippingCost currencyId="string"> Amount (double) </shippingCost>
      <shippingType> string </shippingType>
      <timeLeft> duration </timeLeft>
      <title> string </title>
      <viewItemURL> anyURI </viewItemURL>
    </item>
    <!-- ... more item nodes allowed here ... -->
  </itemRecommendations>
  <!-- Standard Output Fields -->
  <ack> AckValue </ack>
  <errorMessage> ErrorMessage
    <error> ErrorData
      <category> ErrorCategory </category>
      <domain> string </domain>
      <errorId> long </errorId>
      <exceptionId> token </exceptionId>
      <message> string </message>
      <parameter name="string"> ErrorParameter (string) </parameter>
      <!-- ... more parameter values allowed here ... -->
      <severity> ErrorSeverity </severity>
      <subdomain> string </subdomain>
    </error>
    <!-- ... more error nodes allowed here ... -->
  </errorMessage>
  <timestamp> dateTime </timestamp>
  <version> string </version>
</getSimilarItemsResponse>
Return Value Type Occurrence Meaning
Call-specific Output Fields [Jump to standard fields]
itemRecommendations ItemRecommendations Always A list of items matching the given criteria. Item sort order is different for each call. Returned when there are items that match the search criteria.
itemRecommendations.item Item Conditionally,
repeatable: [0..*]
Contains details for a single recommended item. Returned when there is at least one item that matches the search criteria.
itemRecommendations.item
  .bidCount
int Conditionally The number of bids that have been placed on the item.
itemRecommendations.item
  .buyItNowPrice
Amount (double) Conditionally The Buy It Now Price of the item (if any), in the currency of the site on which the item was listed.

For Chinese auctions (Quantity=1, competitive bidding online auctions), Buy It Now lets a user purchase the item at a fixed price and end the auction immediately. On most sites, after a Chinese auction has bids, the listing is no longer eligible for Buy It Now. However, calls can still return the Buy It Now Price that the seller set for the listing. Use the item.bidCount field to determine whether an auction with Buy It Now has bids or not.

Some eBay sites also support Buy It Now for Dutch auctions (multi- quantity, competitive bidding), where you can buy multiple items from the same listing at a fixed price, instead of bidding. On some sites, the Buy It Now option remains available for Dutch auctions even after there are bids.

For fixed-price (FixedPriceItem) and Store Inventory listings (StoresFixedPrice), see currentPrice instead.

Only returned if an item was listed with Buy It Now.
itemRecommendations.item
  .buyItNowPrice
  [ attribute currencyId ]
string Always The Buy It Now Price of the item (if any), in the currency of the site on which the item was listed.

For Chinese auctions (Quantity=1, competitive bidding online auctions), Buy It Now lets a user purchase the item at a fixed price and end the auction immediately. On most sites, after a Chinese auction has bids, the listing is no longer eligible for Buy It Now. However, calls can still return the Buy It Now Price that the seller set for the listing. Use the item.bidCount field to determine whether an auction with Buy It Now has bids or not.

Some eBay sites also support Buy It Now for Dutch auctions (multi- quantity, competitive bidding), where you can buy multiple items from the same listing at a fixed price, instead of bidding. On some sites, the Buy It Now option remains available for Dutch auctions even after there are bids.

For fixed-price (FixedPriceItem) and Store Inventory listings (StoresFixedPrice), see currentPrice instead.

Only returned if an item was listed with Buy It Now.
itemRecommendations.item
  .country
string Conditionally Two-letter ISO 3166 country code to indicate the country where the item is located. For English names that correspond to each code (e.g., KY="Cayman Islands"), see the ISO site.
itemRecommendations.item
  .currentPrice
Amount (double) Conditionally For competitive-bidding listings (Chinese and Dutch auctions), current minimum asking price (start price) or the current highest bid for the item if bids have been placed. Shows minimum bid if no bids have been placed on the item. For Basic Fixed-Price, Store Inventory, or Ad type listings, this returns the original price specified when the item was listed/re-listed or the revised price if the item was revised.
itemRecommendations.item
  .currentPrice
  [ attribute currencyId ]
string Always For competitive-bidding listings (Chinese and Dutch auctions), current minimum asking price (start price) or the current highest bid for the item if bids have been placed. Shows minimum bid if no bids have been placed on the item. For Basic Fixed-Price, Store Inventory, or Ad type listings, this returns the original price specified when the item was listed/re-listed or the revised price if the item was revised.
itemRecommendations.item
  .discountPriceInfo
DiscountPriceInfo Conditionally This container provides information for an item that has a Strikethrough Price (STP) or a Minimum Advertised Price (MAP) discount pricing treatment. STP and MAP apply only to fixed-price listings and auction listings with the Buy It Now option. STP is available on the US, UK, and German (DE) sites, while MAP is available only on the US site.

Discount pricing is available to qualified sellers (and their associated developers) who participate in the Discount Pricing Program. Once qualified, sellers receive a "special account flag" (SAF) that allows them to apply Discount Pricing to both single-variation and multi-variation items. Sellers should contact their account manager or Customer Service to see if they qualify for the Strikethrough Pricing program.

As a seller listing Discount Price items, you are required to maintain records of your discount pricing in the event you are called upon to substantiate your item pricing. The following link details your legal obligations when you utilize Discount Pricing to sell items: Strikethrough Pricing Requirements

For AddFixedPriceItem, RelistFixedPriceItem, ReviseFixedPriceItem, and VerifyAddFixedPriceItem: If you are listing variations (MSKU items), use Variation.DiscountPriceInfo for each variation.

See Displaying Discount Pricing Information to Buyers.

itemRecommendations.item
  .discountPriceInfo
  .originalRetailPrice
Amount (double) Conditionally The actual retail price set by the manufacturer (OEM). eBay does not maintain or validate the OriginalRetailPrice supplied by the seller. OriginalRetailPrice should always be more than StartPrice. Compare the StartPrice/BuyItNowPrice to OriginalRetailPrice to determine the amount of savings to the buyer.
itemRecommendations.item
  .discountPriceInfo
  .originalRetailPrice
  [ attribute currencyId ]
string Always The actual retail price set by the manufacturer (OEM). eBay does not maintain or validate the OriginalRetailPrice supplied by the seller. OriginalRetailPrice should always be more than StartPrice. Compare the StartPrice/BuyItNowPrice to OriginalRetailPrice to determine the amount of savings to the buyer.
itemRecommendations.item
  .discountPriceInfo
  .pricingTreatment
PriceTreatmentEnum Conditionally Based on OriginalRetailPrice, MinimumAdvertisedPrice, and StartPrice values, eBay identifies whether the listing falls under MAP or STP (aka OriginalRetailPrice). GetItem returns this for items listed with one of these discount pricing treatments. GetSellerList returns the DiscountPriceInfo container. This field is not applicable for Add/Revise/Relist calls.

Applicable values:

MAP
Indicates that Minimum Advertised Price pricing treatment has been applied.
NONE
Indicates that there has no been any pricing treatment applied.
STP
Indicates that Strike Through Price pricing treatment has been applied.

Code so that your app gracefully handles any future changes to this list.
itemRecommendations.item
  .discountPriceInfo.soldOffEbay
boolean Conditionally Used by the eBay UK and eBay Germany (DE) sites, this flag indicates that the discount price (specified as StartPrice) is the price for which the seller offered the same (or similar) item for sale on a Web site or offline store other than eBay in the previous 30 days. The discount price is always in reference to the seller's own price for the item.

If this field is set to 'true', eBay displays 'Was*' in the UK and 'Ursprunglich*' in Germany, next to the discounted price of the item. In the event both SoldOffeBay and SoldOneBay fields are set, SoldOneBay takes precedence.
itemRecommendations.item
  .discountPriceInfo.soldOnEbay
boolean Conditionally Used by the eBay UK and eBay Germany (DE) sites, this flag indicates that the discount price (specified as StartPrice) is the price for which the seller offered the same (or similar) item for sale on a Web site or offline store other than eBay in the previous 30 days. The discount price is always in reference to the seller's own price for the item.

If this field is set to 'true', eBay displays 'Was*' in the UK and 'Ursprunglich*' in Germany, next to the discounted price of the item. In the event both SoldOffeBay and SoldOneBay fields are set, SoldOneBay takes precedence.
itemRecommendations.item
  .globalId
string Conditionally The site upon which the item is listed. Returns a Global ID, which is a unique identifier for combinations of site, language, and territory.

For a list of possible enumeration values and how they map to eBay sites, see Global ID Values.
itemRecommendations.item
  .imageURL
anyURI Conditionally URL for a picture used as the Gallery thumbnail, if any. The image uses one of the following graphics formats: JPEG, BMP, TIF, or GIF. Only returned if the seller chose to show a gallery image.
itemRecommendations.item
  .itemId
string Always The ID that uniquely identifies the item listing. The ID is generated by eBay after an item is listed. You cannot choose or revise this value.
Max length: 19.
itemRecommendations.item
  .originalPrice
Amount (double) Conditionally Original price of an item whose price a seller has reduced with the Promotional Price Display feature. Only returned if the price has been revised.
itemRecommendations.item
  .originalPrice
  [ attribute currencyId ]
string Always Original price of an item whose price a seller has reduced with the Promotional Price Display feature. Only returned if the price has been revised.
itemRecommendations.item
  .primaryCategoryId
string Conditionally Numeric ID of the first (or only) category in which the item is listed. (Listings can appear in more than one category.)
Note: Currently, the Merchandising API calls do not return a listing's secondary category, if any.
Max length: 10.
itemRecommendations.item
  .primaryCategoryName
string Conditionally Display name of the first (or only) category in which the item is listed. This is a fully qualified category breadcrumb (e.g., Computers & Networking:Laptops, Notebooks).
Max length: 30.
itemRecommendations.item
  .shippingCost
Amount (double) Conditionally The shipping cost associated with the first shipping service. Only returned when shipping type is flat.
itemRecommendations.item
  .shippingCost
  [ attribute currencyId ]
string Always The shipping cost associated with the first shipping service. Only returned when shipping type is flat.
itemRecommendations.item
  .shippingType
string Conditionally The shipping cost model offered by the seller.

Applicable values:
Calculated
Calculated shipping model: the cost of shipping is determined in large part by the seller-offered and buyer-selected shipping service. The seller might assess an additional fee via PackagingHandlingCosts.
CalculatedDomesticFlatInternational
The seller specified one or more calculated domestic shipping services and one or more flat international shipping services.
Flat
Flat shipping model: the seller establishes the cost of shipping and cost of shipping insurance, regardless of what any buyer-selected shipping service might charge the seller.
FlatDomesticCalculatedInternational
The seller specified one or more flat domestic shipping services and one or more calculated international shipping services.
Free
Free shipping: Seller has specified free shipping for the item. The cost of shipping is zero for the first domestic shipping service (for flat or calculated shipping).
Freight
Freight shipping model: The cost of shipping is determined by a third party, FreightQuote.com, based on the item location (zip code).
NotSpecified
The seller did not specify the shipping type.
itemRecommendations.item
  .timeLeft
duration Conditionally Time left before the item listing ends. The duration is represented in the ISO 8601 duration format (PnDTnHnMnS). For ended listings, the time left is P0DT0H0M0S (zero days, zero hours, zero minutes, and zero seconds).
itemRecommendations.item.title string Always Name of the item as it appears in the listing or search results.
Max length: 55.
itemRecommendations.item
  .viewItemURL
anyURI Always The URL of the web page where a user can view the listing. On the US site, this is called the "View Item" page. If you enabled affiliate tracking in the call, viewItemURL contains a string that includes affiliate tracking information (see the eBay Partner Network).
Standard Output Fields
ack AckValue Always Indicates whether there are any errors or warnings associated with the processing of the request.

Applicable values:

Failure
Errors occurred that prevented the request from being processed successfully.
PartialFailure
Reserved for future use.
Success
The request was processed successfully without errors or warnings.
Warning
The request was processed successfully, but some warnings were returned.

Code so that your app gracefully handles any future changes to this list.
errorMessage ErrorMessage Conditionally Information for an error or warning that occurred when eBay processed the request. Not returned when responseStatus is Success. See Errors by Number for a list of errors and warnings that can be returned by Merchandising API calls.
errorMessage.error ErrorData Conditionally,
repeatable: [0..*]
Details about a single error.
errorMessage.error.category ErrorCategory Conditionally There are three categories of errors: request errors, application errors, and system errors.

Applicable values:

Application
An error occurred due to a problem with the request, such as missing or invalid fields. The problem must be corrected before the request can be made again. If the problem is due to something in the application (such as a missing required field), the application must be changed. Once the problem in the application or data is resolved, resend the corrected request to eBay.
Request
An error occurred due to a problem with the request, such as invalid or missing data. The problem must be corrected before the request can be made again. If the problem is a result of end-user data, the application must alert the end-user to the problem and provide the means for the end-user to correct the data. Once the problem in the data is resolved, resend the request to eBay with the corrected data.
System
Indicates that an error has occurred on the eBay system side, such as a database or server down. An application can retry the request as-is a reasonable number of times (eBay recommends twice). If the error persists, contact Developer Technical Support. Once the problem has been resolved, the request may be resent in its original form.

Code so that your app gracefully handles any future changes to this list.
errorMessage.error.domain string Conditionally Name of the domain upon which the error occurred.

Domains include:

Marketplace
A business or validation error occurred for the Merchandising Service.
SOA
An exception occurred in the framework.
errorMessage.error.errorId long Conditionally A unique code that identifies the particular error condition that occurred. Your application can use error codes as identifiers in your customized error-handling algorithms.
errorMessage.error.exceptionId token Conditionally Unique identifier for an exception associated with an error.
errorMessage.error.message string Conditionally A detailed description of the condition that resulted in the error.
errorMessage.error.parameter ErrorParameter (string) Conditionally,
repeatable: [0..*]
Some warning and error messages return one or more variables that contain contextual information about the error. This is often the field or value that triggered the error.
errorMessage.error.parameter
  [ attribute name ]
string Conditionally Some warning and error messages return one or more variables that contain contextual information about the error. This is often the field or value that triggered the error.
errorMessage.error.severity ErrorSeverity Conditionally Indicates whether the error caused the request to fail (Error) or not (Warning).

If the request fails and the source of the problem is within the application (such as a missing required element), please change the application before you retry the request. If the problem is due to end- user input data, please alert the end-user to the problem and provide the means for them to correct the data. Once the problem in the application or data is resolved, you can attempt to re- send the request to eBay.

If the source of the problem is on eBay's side, you can retry the request as-is a reasonable number of times (eBay recommends twice). If the error persists, contact Developer Technical Support. Once the problem has been resolved, the request may be resent in its original form.

When a warning occurs, the error is returned in addition to the business data. In this case, you do not need to retry the request (as the original request was successful). However, depending on the cause or nature of the warning, you might need to contact either the end user or eBay to effect a long term solution to the problem to prevent it from reoccurring in the future.

Applicable values:

Error
The request that triggered the error was not processed successfully. When a serious application-level error occurs, the error is returned instead of the business data.
Warning
The request was processed successfully, but something occurred that may affect your application or the user. For example, eBay may have changed a value the user sent in. In this case, eBay returns a normal, successful response and also returns the warning.

Code so that your app gracefully handles any future changes to this list.
errorMessage.error.subdomain string Conditionally Name of the subdomain upon which the error occurred.

Subdomains include:

Merchandising
The error is specific to the Merchandising service.
MarketplaceCommon
The error is common to all Marketplace services.
timestamp dateTime Always This value represents the date and time when eBay processed the request. The time zone of this value is GMT and the format is the ISO 8601 date and time format (YYYY-MM-DDTHH:MM:SS.SSSZ). See the "dateTime" type for information about this time format and converting to and from the GMT time zone.
version string Always The version of the response payload schema. Indicates the version of the schema that eBay used to process the request. Developer Technical Support may ask you for the version value when you work with them to troubleshoot issues.



Samples

New to making API calls? Please see Making a Call.

Note: Some item IDs, user IDs, or other data in these samples might no longer be active on eBay. If necessary, you can substitute current eBay data in your requests.

Available samples:

Sample: Basic Call

Retrieves items that are similar to the specified item.

Description

The user b*********r has been bidding on an collectible clock, but he was outbid and did not win the auction. He would like to see if there are similar items on eBay that he could buy or bid on.

Input

The itemId field specifies the item b*********r was outbid on. Similar items can be retrieved for ended items up to two weeks after it was ended.

URL format. See also the non-wrapped version of this URL. For results in a format other than XML, 
specify a different value for responseencoding.
https://svcs.ebay.com/MerchandisingService?
   OPERATION-NAME=getSimilarItems&
   SERVICE-NAME=MerchandisingService&
   SERVICE-VERSION=1.1.0&
   CONSUMER-ID=YourAppID&
   RESPONSE-DATA-FORMAT=XML&
   REST-PAYLOAD&
   itemId=2**********2&
   maxResults=3

   Here is the same input in XML format. Note that this does not include standard values.

XML format.

<?xml version="1.0" encoding="UTF-8"?>
<getSimilarItemsRequest xmlns="https://www.ebay.com/marketplace/services">
  <itemId>2**********2</itemId>
  <maxResults>3</maxResults>
</getSimilarItemsRequest>

Output

The response contains a list of recommended items from which b*********r can choose. The current price and shipping costs are returned for each item, along with basic information about the listing, such as itemId, title, and time left. The viewItemURL links to the View Item page.

XML format.
<?xml version="1.0" encoding="UTF-8"?>
<getSimilarItemsResponse xmlns:sct="https://www.ebay.com/soaframework/common/types" xmlns="https://www.ebay.com/marketplace/services">
  <ack>Success</ack>
  <version>1.1.0</version>
  <timestamp>2008-08-15T15:13:32.994-07:00</timestamp>
  <itemRecommendations>
    <item>
      <itemId>2**********6</itemId>
      <title>SETH THOMAS SONORA CHIME 57-1911 ANTIQUE CABINET CLOCK </title>
      <viewItemURL>
        https://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=2**********6&category=13853&_
        trksid=m263&_trkparms=algo
      </viewItemURL>
      <currentPrice currencyId="USD">69.12</currentPrice>
      <globalId>EBAY-US</globalId>
      <timeLeft>P9DT0H46M28S</timeLeft>
      <subtitle></subtitle>
      <country>US</country>
      <imageURL>https://thumbs.ebaystatic.com/pict/2**********6_1.jpg</imageURL>
      <shippingType>Calculated</shippingType>
    </item>
    <item>
      <itemId>2**********6</itemId>
      <title>SETH THOMAS SONORA CHIME 57-1911 ANTIQUE CABINET CLOCK </title>
      <viewItemURL>
        https://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=2**********6&category=13853&_
        trksid=m263&_trkparms=algo
      </viewItemURL>
      <currentPrice currencyId="USD">69.12</currentPrice>
      <globalId>EBAY-US</globalId>
      <timeLeft>P9DT0H46M28S</timeLeft>
      <subtitle></subtitle>
      <country>US</country>
      <imageURL>https://thumbs.ebaystatic.com/pict/2**********6_1.jpg</imageURL>
      <shippingType>Calculated</shippingType>
    </item>
    <item>
      <itemId>3**********7</itemId>
      <title>SETH THOMAS SONORA CHIME WESTMINSTER 4 BELL MANTEL CLOC</title>
      <viewItemURL>
        https://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=3**********7&category=13853&_
        trksid=m263&_trkparms=algo
      </viewItemURL>
      <currentPrice currencyId="USD">550.0</currentPrice>
      <globalId>EBAY-US</globalId>
      <timeLeft>P6DT5H5M3S</timeLeft>
      <buyItNowPrice currencyId="USD">750.0</buyItNowPrice>
      <country>US</country>
      <imageURL>https://thumbs.ebaystatic.com/pict/3**********7_1.jpg</imageURL>
      <shippingType>NotSpecified</shippingType>
    </item>
  </itemRecommendations>
</getSimilarItemsResponse>


Back to list of samples

Sample: Similar Items Listed as Auctions and Ending Soon

Retrieves items listed with the auction format (Chinese) that are similar to the specified item. Restricts results to only items that are ending soon (i.e., before the specified end time).

Description

The user b*********r is trying to get a really good deal on items similar to the clock he is interested in, so he is retrieving only items listed with the auction format that are ending soon.

Input

The added Chinese field specifies that item recommendations include only auctions and the endTimeTo field restricts results to include only auctions ending on or before noon UTC (endTimeTo=2008-08-16T12:00:00.000Z) on August 16.

URL format. See also the non-wrapped version of this URL. For results in a format other than XML, 
specify a different value for responseencoding.
https://svcs.ebay.com/MerchandisingService?
   OPERATION-NAME=getSimilarItems&
   SERVICE-NAME=MerchandisingService&
   SERVICE-VERSION=1.1.0&
   CONSUMER-ID=YourAppID&
   RESPONSE-DATA-FORMAT=XML&
   REST-PAYLOAD&
   itemId=2**********2&
   maxResults=3&
   listingType=Chinese&
   endTimeTo=2008-08-16T12:00:00.000Z

   Here is the same input in XML format. Note that this does not include standard values.

XML format.

<?xml version="1.0" encoding="UTF-8"?>
<getSimilarItemsRequest xmlns="https://www.ebay.com/marketplace/services">
  <itemId>2**********2</itemId>
  <maxResults>3</maxResults>
  <listingType>Chinese</listingType>
  <endTimeTo>2008-08-16T12:00:00.000Z</endTimeTo>
</getSimilarItemsRequest>

Output

The response contains a list of recommended items from which b*********r can choose. The timeLeft indicates when the auction will be ending.

XML format.
<?xml version="1.0" encoding="UTF-8"?>
<getSimilarItemsResponse xmlns:sct="https://www.ebay.com/soaframework/common/types" xmlns="https://www.ebay.com/marketplace/services">
  <ack>Success</ack>
  <version>1.1.0</version>
  <timestamp>2008-08-15T19:23:00.680-07:00</timestamp>
  <itemRecommendations>
    <item>
      <itemId>2**********9</itemId>
      <title>Antique Seth Thomas Eight Day Spring Clock</title>
      <viewItemURL>
        https://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=2**********9&category=13853&_
        trksid=m263&_trkparms=algo
      </viewItemURL>
      <currentPrice currencyId="USD">110.0</currentPrice>
      <globalId>EBAY-US</globalId>
      <timeLeft>P0DT1H10M33S</timeLeft>
      <country>US</country>
      <imageURL>https://thumbs.ebaystatic.com/pict/2**********9_1.jpg</imageURL>
      <shippingType>NotSpecified</shippingType>
    </item>
    <item>
      <itemId>3**********3</itemId>
      <title>Vintage Seth Thomas Shelf/Mantle/Desk Clock Works READ</title>
      <viewItemURL>
        https://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=3**********3&category=13858&_
        trksid=m263&_trkparms=algo
      </viewItemURL>
      <currentPrice currencyId="USD">8.99</currentPrice>
      <globalId>EBAY-US</globalId>
      <timeLeft>P0DT1H9M47S</timeLeft>
      <country>US</country>
      <imageURL>https://thumbs.ebaystatic.com/pict/3**********3_1.jpg</imageURL>
      <shippingType>Freight</shippingType>
    </item>
    <item>
      <itemId>3**********9</itemId>
      <title>Unique Silver Seth Thomas Mantel Clock </title>
      <viewItemURL>
        https://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=3**********9&category=10021&_
        trksid=m263&_trkparms=algo
      </viewItemURL>
      <currentPrice currencyId="USD">22.5</currentPrice>
      <globalId>EBAY-US</globalId>
      <timeLeft>P0DT2H33M39S</timeLeft>
      <country>US</country>
      <imageURL>https://thumbs.ebaystatic.com/pict/3**********9_1.jpg</imageURL>
      <shippingType>NotSpecified</shippingType>
    </item>
  </itemRecommendations>
</getSimilarItemsResponse>

Back to list of samples



Change History

Change Date Description
1.4.0
2010-03-03
  • maxResults (modified): Increased maximum allowed results from 20 to 50.
  • itemFilter (added): Lets you restrict results to only items available in the World of Good marketplace.
1.1.0
2008-08-12
  • (added) New call