Download OpenAPI specification:Download
Use the Taxonomy API to discover the most appropriate eBay categories under which sellers can offer inventory items for sale, and the most likely categories under which buyers can browse or search for items to purchase. In addition, the Taxonomy API provides metadata about the required and recommended category aspects to include in listings, and also has two operations to retrieve parts compatibility information.
This call returns a complete list of aspects for all of the leaf categories that belong to an eBay marketplace. The eBay marketplace is specified through the category_tree_id URI parameter.
Note: A successful call returns a payload as a gzipped JSON file sent as a binary file using the content-type:application/octet-stream in the response. This file may be large (over 100 MB, compressed). Extract the JSON file from the compressed file with a utility that handles .gz or .gzip. The open source Taxonomy SDK can be used to compare the aspect metadata that is returned in this response. The Taxonomy SDK uses this method to surface changes (new, modified, and removed entities) between an updated version of a bulk downloaded file relative to a previous version.
| category_tree_id required | string The unique identifier of the eBay category tree being requested. |
{- "categoryTreeId": "string",
- "categoryTreeVersion": "string",
- "categoryAspects": [
- {
- "category": {
- "categoryId": "string",
- "categoryName": "string"
}, - "aspects": [
- {
- "aspectConstraint": {
- "aspectApplicableTo": [
- "string"
], - "aspectDataType": "string",
- "aspectEnabledForVariations": true,
- "aspectFormat": "string",
- "aspectMaxLength": 0,
- "aspectMode": "string",
- "aspectRequired": true,
- "aspectUsage": "string",
- "expectedRequiredByDate": "string",
- "itemToAspectCardinality": "string"
}, - "aspectValues": [
- {
- "localizedValue": "string",
- "valueConstraints": [
- {
- "applicableForLocalizedAspectName": "string",
- "applicableForLocalizedAspectValues": [
- null
]
}
]
}
], - "localizedAspectName": "string",
- "relevanceIndicator": {
- "searchCount": 0
}
}
]
}
]
}A given eBay marketplace might use multiple category trees, but one of those trees is considered to be the default for that marketplace. This call retrieves a reference to the default category tree associated with the specified eBay marketplace ID. The response includes only the tree's unique identifier and version, which you can use to retrieve more details about the tree, its structure, and its individual category nodes.
| marketplace_id required | string The ID of the eBay marketplace for which the category tree ID is being requested. For a list of supported marketplace IDs, see Marketplaces with Default Category Trees. |
| Accept-Language | string A header used to indicate the natural language the seller prefers for the response.
|
{- "categoryTreeId": "string",
- "categoryTreeVersion": "string"
}This call retrieves the complete category tree that is identified by the category_tree_id parameter. The value of category_tree_id was returned by the getDefaultCategoryTreeId call in the categoryTreeId field. The response contains details of all nodes of the specified eBay category tree, as well as the eBay marketplaces that use this category tree.
Note: This call can return a very large payload, so you are strongly advised to submit the request with the following HTTP header:
Accept-Encoding: application/gzip
With this header (in addition to the required headers described under HTTP Request Headers), the call returns the response with gzip compression.
| category_tree_id required | string The unique identifier of the eBay category tree being requested. |
{- "applicableMarketplaceIds": [
- "string"
], - "categoryTreeId": "string",
- "categoryTreeVersion": "string",
- "rootCategoryNode": {
- "category": {
- "categoryId": "string",
- "categoryName": "string"
}, - "categoryTreeNodeLevel": 0,
- "childCategoryTreeNodes": [
- { }
], - "leafCategoryTreeNode": true,
- "parentCategoryTreeNodeHref": "string"
}
}This call retrieves the details of all nodes of the category tree hierarchy (the subtree) below a specified category of a category tree. You identify the tree using the category_tree_id parameter, which was returned by the getDefaultCategoryTreeId call in the categoryTreeId field.
Note: This call can return a very large payload, so you are strongly advised to submit the request with the following HTTP header: Accept-Encoding: application/gzip
With this header (in addition to the required headers described under HTTP Request Headers), the call returns the response with gzip compression.
| category_tree_id required | string The unique identifier of the eBay category tree from which a category subtree is being requested. |
| category_id required | string The unique identifier of the category at the top of the subtree being requested. |
{- "categorySubtreeNode": {
- "category": {
- "categoryId": "string",
- "categoryName": "string"
}, - "categoryTreeNodeLevel": 0,
- "childCategoryTreeNodes": [
- { }
], - "leafCategoryTreeNode": true,
- "parentCategoryTreeNodeHref": "string"
}, - "categoryTreeId": "string",
- "categoryTreeVersion": "string"
}This call returns an array of category tree leaf nodes in the specified category tree that are considered by eBay to most closely correspond to the query string q. Returned with each suggested node is a localized name for that category (based on the Accept-Language header specified for the call), and details about each of the category's ancestor nodes, extending from its immediate parent up to the root of the category tree.
Note: This call can return a large payload, so you are advised to submit the request with the following HTTP header: Accept-Encoding: application/gzip
With this header (in addition to the required headers described under HTTP Request Headers), the call returns the response with gzip compression.
You identify the tree using the category_tree_id parameter, which was returned by the getDefaultCategoryTreeId call in the categoryTreeId field.
Important: This call is not supported in the Sandbox environment. It will return a response payload in which the categoryName fields contain random or boilerplate text regardless of the query submitted.
| category_tree_id required | string The unique identifier of the eBay category tree for which suggested nodes are being requested. |
| q required | string A quoted string that describes or characterizes the item being offered for sale. The string format is free form, and can contain any combination of phrases or keywords. eBay will parse the string and return suggested categories for the item. |
{- "categorySuggestions": [
- {
- "category": {
- "categoryId": "string",
- "categoryName": "string"
}, - "categoryTreeNodeAncestors": [
- {
- "categoryId": "string",
- "categoryName": "string",
- "categorySubtreeNodeHref": "string",
- "categoryTreeNodeLevel": 0
}
], - "categoryTreeNodeLevel": 0,
- "relevancy": "string"
}
], - "categoryTreeId": "string",
- "categoryTreeVersion": "string"
}This call returns a list of aspects that are appropriate or necessary for accurately describing items in the specified leaf category. Each aspect identifies an item attribute (for example, color) for which the seller will be required or encouraged to provide a value (or variation values) when offering an item in that category on eBay.
For each aspect, getItemAspectsForCategory provides complete metadata, including:
| category_tree_id required | string The unique identifier of the eBay category tree from which the specified category's aspects are being requested. |
| category_id required | string The unique identifier of the leaf category for which aspects are being requested. |
{- "aspects": [
- {
- "aspectConstraint": {
- "aspectApplicableTo": [
- "string"
], - "aspectDataType": "string",
- "aspectEnabledForVariations": true,
- "aspectFormat": "string",
- "aspectMaxLength": 0,
- "aspectMode": "string",
- "aspectRequired": true,
- "aspectUsage": "string",
- "expectedRequiredByDate": "string",
- "itemToAspectCardinality": "string"
}, - "aspectValues": [
- {
- "localizedValue": "string",
- "valueConstraints": [
- {
- "applicableForLocalizedAspectName": "string",
- "applicableForLocalizedAspectValues": [
- "string"
]
}
]
}
], - "localizedAspectName": "string",
- "relevanceIndicator": {
- "searchCount": 0
}
}
]
}This call retrieves the compatible vehicle aspects that are used to define a motor vehicle that is compatible with a motor vehicle part or accessory. The values that are retrieved here might include motor vehicle aspects such as 'Make', 'Model', 'Year', 'Engine', and 'Trim', and each of these aspects are localized for the eBay marketplace.
The category_tree_id value is passed in as a path parameter, and this value identifies the eBay category tree. The category_id value is passed in as a query parameter, as this parameter is also required. The specified category must be a category that supports parts compatibility.
At this time, this operation only supports parts and accessories listings for cars, trucks, and motorcycles (not boats, power sports, or any other vehicle types). Only the following eBay marketplaces support parts compatibility:
| category_tree_id required | string This is the unique identifier of category tree. The following is the list of category_tree_id values and the eBay marketplaces that they represent. One of these ID values must be passed in as a path parameter, and the category_id value, that is passed in as query parameter, must be a valid eBay category on that eBay marketplace that supports parts compatibility for cars, trucks, or motorcyles.
|
| category_id required | string The unique identifier of an eBay category. This eBay category must be a valid eBay category on the specified eBay marketplace, and the category must support parts compatibility for cars, trucks, or motorcyles. The getAutomotivePartsCompatibilityPolicies method of the Selling Metadata API can be used to retrieve all eBay categories for an eBay marketplace that supports parts compatibility cars, trucks, or motorcyles. The getAutomotivePartsCompatibilityPolicies method can also be used to see if one or more specific eBay categories support parts compatibility. |
{- "compatibilityProperties": [
- {
- "name": "string",
- "localizedName": "string"
}
]
}This call retrieves applicable compatible vehicle property values based on the specified eBay marketplace, specified eBay category, and filters used in the request. Compatible vehicle properties are returned in the compatibilityProperties.name field of a getCompatibilityProperties response.
One compatible vehicle property applicable to the specified eBay marketplace and eBay category is specified through the required compatibility_property filter. Then, the user has the option of further restricting the compatible vehicle property values that are returned in the response by specifying one or more compatible vehicle property name/value pairs through the filter query parameter.
See the documentation in URI parameters section for more information on using the compatibility_property and filter query parameters together to customize the data that is retrieved.
| category_tree_id required | string This is the unique identifier of the category tree. The following is the list of category_tree_id values and the eBay marketplaces that they represent. One of these ID values must be passed in as a path parameter, and the category_id value, that is passed in as query parameter, must be a valid eBay category on that eBay marketplace that supports parts compatibility for cars, trucks, or motorcyles.
|
| compatibility_property required | string One compatible vehicle property applicable to the specified eBay marketplace and eBay category is specified in this required filter. Compatible vehicle properties are returned in the compatibilityProperties.name field of a getCompatibilityProperties response.
|
| category_id required | string The unique identifier of an eBay category. This eBay category must be a valid eBay category on the specified eBay marketplace, and the category must support parts compatibility for cars, trucks, or motorcyles. The getAutomotivePartsCompatibilityPolicies method of the Selling Metadata API can be used to retrieve all eBay categories for an eBay marketplace that supports parts compatibility cars, trucks, or motorcyles. The getAutomotivePartsCompatibilityPolicies method can also be used to see if one or more specific eBay categories support parts compatibility. |
| filter | string One or more compatible vehicle property name/value pairs are passed in through this query parameter. The compatible vehicle property name and corresponding value are delimited with a colon (:), such as For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/commerce/taxonomy/types/txn:ConstraintFilter
|
{- "compatibilityPropertyValues": [
- {
- "value": "string"
}
]
}