Overview

Sellers are often required to specify metadata information on a listing, depending on the eBay marketplace and category on which they are listing the item. The Selling Metadata APIs allow sellers to determine if certain features are supported or required on a specific marketplace or in a specific category. Sellers can then use these APIs to retrieve this information to add to their listings, helping them comply with various eBay policies and optimize their listings.

API Use Cases

Retrieving category taxonomy and desired listing category
Retrieving category-level metadata
Retrieving marketplace-level metadata
Retrieving Regulatory metadata
Retrieving eBay catalog products and charitable organizations
Retrieving category taxonomy and desired listing category
Every eBay listing must be listed in an eBay leaf category. Selecting the most appropriate category will increase chances of interested buyers finding your item in searches, and more views can lead to increased sales.

The API methods used to retrieve eBay taxonomy and leaf categories are discussed below:

  • Use getDefaultCategoryTreeId to retrieve the categoryTreeId (aka eBay site ID) for a specific eBay marketplace.
  • Referencing the retrieved categoryTreeId value, use one of the following methods:
    • Use getCategoryTree to retrieve the entire category taxonomy for an eBay marketplace, or use getCategorySubtree to retrieve a specific eBay category at any level and all of its descendants. Look for a leafCategoryTreeNode boolean field with a value of ‘true’ to confirm that the category you wish to use is a leaf category. 
    • Use getCategorySuggestions to retrieve the most relevant eBay leaf categories based on a provided product-related keyword. 
    • Use getExpiredCategories to retrieve expired category IDs and the new category IDs that these expired categories have been mapped to. 
Retrieving category-level metadata

Retrieving category-level metadata for a specific eBay category allows sellers to better understand the features or requirements that apply to a specific leaf category and apply them to their listings. Once retrieved, this metadata can be passed in when creating or revising a listing through the Trading or Inventory API.

The API methods to retrieve category-level metadata are discussed below: 

  • Retrieve standard and refurbished item conditions and condition descriptor metadata supported for one or more leaf categories on a specific eBay marketplace by using one of the following methods:
    • Use getItemConditionPolicies to retrieve supported conditionId values associated with one, multiple, or all eBay leaf categories on a specified eBay marketplace. Note that an OAuth user token is required to retrieve refurbished item conditions.
    • Use GetCategoryFeatures with the FeatureID value set to ConditionValues to retrieve supported standard and refurbished condition ID values on a specified eBay marketplace.
  • Retrieve item aspect name-value pairs associated with a specified leaf categories using one of the following methods: 
    • Use getItemAspectsForCategory to retrieve the required, recommended, and optional product aspects for a specified category. 
    • Use fetchItemAspects to retrieve the complete list of aspects for all leaf categories that belong to an eBay marketplace. The eBay Taxonomy SDK can then be used to compare the aspect metadata that is returned in this response. 
  • Retrieve metadata required for a Return Policy, such as return period or return shipping cost payer, by using getReturnPolicies or GetCategoryFeatures.
  • Retrieve motor vehicle listing metadata by using GetCategoryFeatures with the FeatureID filter to retrieve the following metadata for motor vehicle categories: 
    • Motors Local Market listings: Use LocalMarketAdFormatEnabled to determine whether the specified category supports Motor Local Market listings. 
    • eBay Motors Pro Listings: Use LocalMarketAdFormatEnabled to determine whether the specified category supports Motor Local Market listings. 
    • Vehicle Deposits: Use DepositSupported to determine if the specified category supports down payments for motor vehicle listings. 
  • Retrieve parts compatibility metadata by doing the following: 
  • Retrieve metadata for Classified Ad listings by doing the following: 
    • Use GetCategoryFeatures with the FeatureID filter set to AdFormatEnabled to determine if a category supports Classified Ad listings.
    • If supported, the following fields indicate if Best Offer and its features are available for Classified Ad listings in the specified category: 
      • ClassifiedAdBestOfferEnabled
      • ClassifiedAdCounterOfferEnabled
      • ClassifiedAdAutoAcceptEnabled
      • ClassifiedAdAutoDeclineEnabled
    • The following fields indicate if the specified category supports including a seller’s contact information on the listing: 
      • ClassifiedAdCompanyNameEnabled
      • ClassifiedAdContactByAddressEnabled
      • ClassifiedAdContactByEmailEnabled
      • ClassifiedAdContactByPhoneEnabled
  • Determine the categories that support Best Offer features by using one of the following methods: 
  • To determine if a category supports lot listings, use getCategories. If a category does not support lot listings, the CategoryArray.Category.LSD boolean will be returned as ‘true’.
  • To retrieve the supported CBT corridors for a category, use GetCategoryFeatures with FeatureID set to CrossBorderTradeEnabled. The following values are supported: 
    • CrossBorderTradeNorthAmericaEnabled 
    • CrossBorderTradeGBEnabled
    • CrossBorderTradeAustraliaEnabled
Retrieving marketplace-level metadata

Retrieving marketplace-level metadata for a specific eBay site allows sellers to better understand the features and values that are supported by a specific site and apply them to their listings. The GeteBayDetails call of the Trading API has a variety of DetailName filters that allow sellers to retrieve specific information, such as supported features, requirements, and/or values of a specific marketplace. Once retrieved, this metadata can be passed in when creating or revising a listing through the Trading or Inventory API.

The DetailName filters used to retrieve marketplace-level metadata are discussed below: 

  • Use SiteDetails to retrieve the names and identifiers of all supported eBay sites.
  • Use CurrencyDetails to retrieve the list of three-letter currency codes supported by eBay.
  • Use CountryDetails to retrieve the list of two-letter country codes supported by eBay
  • Use ShippingServiceDetails to retrieve supported shipping service information for the specified eBay site. The following information will be returned for each shipping service option: 
  • Use the RegionOfOriginDetails and ExcludeShippingLocationDetails filters to retrieve the geographical regions and countries that can be specified as ship-to location and excluded shipping locations, respectively.
  • Use DispatchTimeMaxDetails to retrieve the supported number of business days an eBay site allows for handling time.
  • Use ItemSpecificDetails, VariationDetails, and ListingStartPriceDetails to retrieve the minimum and maximum threshold data for Item specifics, variations, and listing start prices.
  • Use ShippingCarrierDetails to retrieve a list of shipping carriers supported by the specified site.
  • Use ProductDetails to retrieve the ProductIdentifierUnavailableText that should be passed into relevant product identifier fields (EAN, ISBN, UPC, Brand/MPN) if one is required by an eBay leaf category, but does not exist or apply to the product. 
  • Use ListingFeatureDetails to retrieve the listing features that are supported for the specified eBay site. If a feature is supported, its corresponding enum value can be used in listing calls to enable that feature on the listing.
  • Use TimeZoneDetails to retrieve a list of all global time zones, as well as detailed information about each time zone.
Retrieving Regulatory metadata
Any sellers doing business within an EU country or Northern Ireland, or any seller based elsewhere but shipping into these areas are subject to providing regulatory information in their eBay listings. eBay has APIs that help sellers determine if a category supports, recommends, or requires different types of regulatory information. If supported or required, regulatory metadata can be passed in when creating or revising a listing through the Trading or Inventory API.

The API methods to retrieve regulatory metadata are discussed below: 

  • Use getRegulatoryPolicies to determine if a category supports, recommends, or requires any regulatory policies. 
    • If hazmat information is required, use getHazardousMaterialLabels to retrieve the numeric IDs for applicable hazardous material pictograms, statements, or signal words in a specific marketplace. 
    • If product safety label information is required, use getProductSafetyLabels to retrieve the numeric IDs for applicable Product Safety pictograms and statements for a specific marketplace. 
  • Use getExtendedPolicyProducerResponsibilityPolicies to determine if a category supports, recommends, or requires any Extender Producer Responsibility policies.
    • If takeback policies are required, use getCustomPolicies to retrieve the IDs of the takeback policies defined for a seller’s account.
    • To see if an eco-participation fee can be applied at the variation level of a multi-variation listing, look for the enabledForVariations boolean field with a value of ‘true’.
Retrieving eBay catalog products and charitable organizations

The eBay Product Catalog is a structured database of product information that eBay uses to standardize listings. Each product in the eBay catalog is uniquely identified by an eBay product ID (ePID). When creating a listing through the eBay APIs, sellers can use a product's ePID value to automatically populate a listing with all of eBay's catalog details about the product. The more sellers adopt catalog information for their listings, the more consistent and reliable their listings will be. 

The API methods to retrieve eBay catalog products are discussed below: 

  • Use the search method of the Catalog API to search for and retrieve the eBay catalog product (and its associated ePID value) that best matches an inventory item.
  • Use getProduct to retrieve the full details of the product to confirm that it fully matches your product. 

By using the eBay Charity API, sellers can integrate charitable giving directly into their business processes, allowing them to donate a percentage of their sales to a specified nonprofit organization. In addition to helping those in need, this can enhance a seller’s reputation and appeal to buyers who are interested in supporting the specified nonprofit organization.

Sellers can use the getCharityOrgs method of the Charity API to retrieve the unique identifier of a supported charity organization. This charity ID value, as well as the percentage of the purchase price that the seller chooses to donate, can then be passed in when creating or revising a listing through the Trading or Inventory API.

Workflow Overview

Code Samples

Retrieve Category Tree ID for US Marketplace

curl -X GET "https://api.ebay.com/commerce/taxonomy/v1/get_default_category_tree_id?marketplace_id=EBAY_US"
-H "Authorization: Bearer OAUTH_token"

Retrieve Category Subtree for Books & Magazines Categories on US Marketplace

curl -X GET "https://api.ebay.com/commerce/taxonomy/v1/category_tree/0/get_category_subtree?category_id=267"
-H "Authorization: Bearer OAUTH_token"

Error Handling

  • If a Taxonomy API call is failing due to an invalid category tree ID, use the getDefaultCategoryTreeId endpoint to retrieve the correct tree ID for the marketplace. 
  • If you receive an invalid category error, verify the value of the category ID. Some metadata endpoints only accept leaf categories. The category ID could also come from getCategorySuggestions or even from GetCategories in the Trading API. If necessary, use the getCategorySubtree method to confirm the category is a leaf category by checking the leafCategoryTreeNode field for a boolean value of true.
  • If the API call is failing due to an invalid marketplaceId, refer to the eBay Marketplace Ids list for the correct values and ensure you pass the appropriate marketplaceId in the API request.
  • If the referenced category has been deprecated or replaced, use the getExpiredCategories endpoint to map the old category ID to the new one. Update your listings with the new category ID returned by the API.
  • If you get an invalid format error for the getCompatibilityPropertyValues method, check your compatibility_property and/or filter query parameters and check for valid syntax. 
  • For the Metadata API methods that support one or more leaf category IDs as filters, those categories must belong to the specified marketplace or no metadata will be returned.
  • If you get an invalid format error for the search method in Catalog API, check your query parameters and check for valid syntax.

Best Practices

  • Use categoryTreeVersion to monitor changes in the category tree. If a new version is detected, call getCategoryTree or getCategorySubTree to fetch the updated categories.
  • Use fetchItemAspects to download all aspect metadata of leaf categories for a marketplace. This is particularly useful when managing large inventories or multiple categories. Note that the fetch call returns a very large gzipped binary file, which should be handled appropriately to ensure efficient processing and storage.
  • Regularly refresh category metadata such as item conditions, return policies, and compatibility aspects using methods like getItemConditionPolicies, getReturnPolicies, or getAutomotivePartsCompatibilityPolicies to ensure compliance with marketplace requirements.
  • Use the Taxonomy SDK to compare and validate aspect metadata retrieved from methods like fetchItemAspects or getItemAspectsForCategory.
  • We suggest reading reference documentation for each method before using to discover things like OAuth token type to use, OAuth scopes required to use method, required/supported HTTP headers, and errors that may be triggered.
  • The getItemConditionPolicies method typically requires just an application token, but a user token must be used to retrieve Refurbished item conditions.