---
title: Taxonomy API
description: "The Taxonomy API enables you to assist both sellers and buyers: * It helps sellers to determine the best eBay category under which to offer each inventory item for sale in a selected eBay marketplace. It helps sellers to select the categories of items to include in a campaign or promotion. It also provides information about the aspects to include when defining an inventory item in a given category. For more information, see the [Selling Integration Guide](/api-docs/sell/static/selling-ig-landing.html). * It helps buyers to determine the appropriate categories in which to browse or search for the items they're looking to purchase in a particular eBay marketplace. For more information, see the [Buying Integration Guide](/api-docs/buy/static/buying-ig-landing.html)."
api_version: 1.0
api_name: taxonomy_api
api_type: REST
api_group: sell/taxonomy_api
source_url:
  html: https://developer.ebay.com/develop/api/sell/taxonomy_api
  md: https://developer.ebay.com/develop/api/sell/taxonomy_api.md
---

# Taxonomy API API

The Taxonomy API enables you to assist both sellers and buyers:

*   It helps sellers to determine the best eBay category under which to offer each inventory item for sale in a selected eBay marketplace. It helps sellers to select the categories of items to include in a campaign or promotion. It also provides information about the aspects to include when defining an inventory item in a given category. For more information, see the [Selling Integration Guide](/api-docs/sell/static/selling-ig-landing.html).
*   It helps buyers to determine the appropriate categories in which to browse or search for the items they're looking to purchase in a particular eBay marketplace. For more information, see the [Buying Integration Guide](/api-docs/buy/static/buying-ig-landing.html).

## API Methods

The following API methods are available:

### fetchItemAspects

#### GET /category_tree/{category_tree_id}/fetch_item_aspects
**Description:** This method 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](<https://github.com/eBay/taxonomy-sdk >) can be used to compare the aspect metadata that is returned in this response. The **Taxonomy SDK** uses this call to surface changes (new, modified, and removed entities) between an updated version of a bulk downloaded file relative to a previous version.
**Parameters:**
- **category_tree_id** (string) *required*
  - The unique identifier of the eBay category tree. The category tree ID for an eBay marketplace can be retrieved using the [getDefaultCategoryTreeId](/develop/api/sell/taxonomy_api#sell-taxonomy_api-category_tree-getdefaultcategorytreeid) method.

### getDefaultCategoryTreeId

#### GET /get_default_category_tree_id
**Description:** 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.
**Parameters:**
- **marketplace_id** (string) *required*
  - The unique identifier of the eBay marketplace for which the category tree ID is requested. For a list of supported marketplace IDs, see [Marketplaces with Default Category Trees](/api-docs/commerce/taxonomy/static/supportedmarketplaces.html).

### getCategoryTree

#### GET /category_tree/{category_tree_id}
**Description:** This method 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](/develop/api/sell/taxonomy_api#sell-taxonomy_api-category_tree-getdefaultcategorytreeid) method 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 method can return a very large payload, so gzip compression is supported. To enable gzip compression, include the `Accept-Encoding` header and set its value to `gzip` as shown below:  
  
`Accept-Encoding: gzip`
**Parameters:**
- **category_tree_id** (string) *required*
  - The unique identifier of the eBay category tree. The category tree ID for an eBay marketplace can be retrieved using the [getDefaultCategoryTreeId](/develop/api/sell/taxonomy_api#sell-taxonomy_api-category_tree-getdefaultcategorytreeid) method.
- **Accept-Encoding** (string)
  - This header indicates the compression-encoding algorithms the client accepts for the response. This value should be set to `gzip`.  
  
For more information, refer to [Request Headers](/develop/api/sell/request_headers).

### getCategorySubtree

#### GET /category_tree/{category_tree_id}/get_category_subtree
**Description:** 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](/develop/api/sell/taxonomy_api#sell-taxonomy_api-category_tree-getdefaultcategorytreeid) call in the **categoryTreeId** field.  
  
**Note:** This method can return a very large payload, so gzip compression is supported. To enable gzip compression, include the `Accept-Encoding` header and set its value to `gzip` as shown below:  
  
`Accept-Encoding: gzip`
**Parameters:**
- **category_id** (string) *required*
  - The unique identifier of the category at the top of the subtree being requested. Metadata on this category and all its descendant categories are retrieved.  
  
**Note:** If the **category\_id** submitted identifies a leaf node of the tree, the call response will contain information about only that leaf node, which is a valid subtree.
- **category_tree_id** (string) *required*
  - The unique identifier of the eBay category tree. The category tree ID for an eBay marketplace can be retrieved using the [getDefaultCategoryTreeId](/develop/api/sell/taxonomy_api#sell-taxonomy_api-category_tree-getdefaultcategorytreeid) method.
- **Accept-Encoding** (string)
  - This header indicates the compression-encoding algorithms the client accepts for the response. This value should be set to `gzip`.  
  
For more information, refer to [Request Headers](/develop/api/sell/request_headers).

### getCategorySuggestions

#### GET /category_tree/{category_tree_id}/get_category_suggestions
**Description:** 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.  
  
You identify the tree using the **category\_tree\_id** parameter, which was returned by the [getDefaultCategoryTreeId](/develop/api/sell/taxonomy_api#sell-taxonomy_api-category_tree-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.

  
**Note:** Category suggestions returned by this method are partially determined by live inventory data on the eBay platform. In cases where items with similar titles are miscategorized, this may influence the recommendations returned and cause a less accurate category to rank higher. Suggestions should be treated as recommendations rather than authoritative classifications.
**Parameters:**
- **category_tree_id** (string) *required*
  - The unique identifier of the eBay category tree. The category tree ID for an eBay marketplace can be retrieved using the [getDefaultCategoryTreeId](/develop/api/sell/taxonomy_api#sell-taxonomy_api-category_tree-getdefaultcategorytreeid) method.
- **q** (string) *required*
  - 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.

### getItemAspectsForCategory

#### GET /category_tree/{category_tree_id}/get_item_aspects_for_category
**Description:** 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, this method provides complete metadata, including:

*   The aspect's data type, format, and entry mode
*   Whether the aspect is required in listings
*   Whether the aspect can be used for item variations
*   Whether the aspect accepts multiple values for an item
*   Allowed values for the aspect

Use this information to construct an interface through which sellers can enter or select the appropriate values for their items or item variations. Once you collect those values, include them as product aspects when creating inventory items using the Inventory API.
**Parameters:**
- **category_id** (string) *required*
  - The unique identifier of the leaf category for which aspects are being requested.  
  
**Note:** If the **category\_id** submitted does not identify a leaf node of the tree, this call returns an error.
- **category_tree_id** (string) *required*
  - The unique identifier of the eBay category tree. The category tree ID for an eBay marketplace can be retrieved using the [getDefaultCategoryTreeId](/develop/api/sell/taxonomy_api#sell-taxonomy_api-category_tree-getdefaultcategorytreeid) method.

### getCompatibilityProperties

#### GET /category_tree/{category_tree_id}/get_compatibility_properties
**Description:** 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:

*   eBay US (Motors and non-Motors categories)
*   eBay Canada (Motors and non-Motors categories)
*   eBay UK
*   eBay Germany
*   eBay Australia
*   eBay France
*   eBay Italy
*   eBay Spain
**Parameters:**
- **category_tree_id** (string) *required*
  - 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 motorcycles.  
  

*   eBay US: 0
*   eBay Motors US: 100
*   eBay Canada: 2
*   eBay UK: 3
*   eBay Germany: 77
*   eBay Australia: 15
*   eBay France: 71
*   eBay Italy: 101
*   eBay Spain: 186
- **category_id** (string) *required*
  - 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 motorcycles.  
  
The [getAutomotivePartsCompatibilityPolicies](/api-docs/sell/metadata/resources/marketplace/methods/getAutomotivePartsCompatibilityPolicies) method of the Selling Metadata API can be used to retrieve all eBay categories for an eBay marketplace that support parts compatibility for vehicles.

### getCompatibilityPropertyValues

#### GET /category_tree/{category_tree_id}/get_compatibility_property_values
**Description:** 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](/develop/api/sell/taxonomy_api#sell-taxonomy_api-category_tree-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.
**Parameters:**
- **category_tree_id** (string) *required*
  - 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 motorcycles.  
  

*   eBay US: 0
*   eBay Motors US: 100
*   eBay Canada: 2
*   eBay UK: 3
*   eBay Germany: 77
*   eBay Australia: 15
*   eBay France: 71
*   eBay Italy: 101
*   eBay Spain: 186
- **compatibility_property** (string) *required*
  - 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](/develop/api/sell/taxonomy_api#sell-taxonomy_api-category_tree-getcompatibilityproperties) response.  
  
For example, if you wanted to retrieve all vehicle trims for a 2018 Toyota Camry, you would set this filter as follows: `compatibility_property=Trim` and then include the following three name/value filters through one **filter** parameter: `filter=Year:2018,Make:Toyota,Model:Camry`.  
  
So, putting this all together, the URI would look something like this:  
  

```
GET https://api.ebay.com/commerce/taxonomy/v1/category_tree/100/get_compatibility_property_values?category_id=6016&compatibility_property=Trim&filter=Year:2018,Make:Toyota,Model:Camry
```
- **category_id** (string) *required*
  - 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 motorcycles.  
  
The [getAutomotivePartsCompatibilityPolicies](/api-docs/sell/metadata/resources/marketplace/methods/getAutomotivePartsCompatibilityPolicies) method of the Selling Metadata API can be used to retrieve all eBay categories for an eBay marketplace that support parts compatibility for vehicles.
- **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 `filter=Year:2018`, and multiple compatible vehicle property name/value pairs are delimited with a comma (,).  
  
**Note:** Commas are used as delimiters between filter values. If a value includes a comma (e.g., `BodyStyle:AWD B9 8W5**,**C8WD`) you **must** include a backslash (**\\**) immediately before the comma to prevent it from being evaluated as a delimiter.  
  
As with all query parameter values, the filter parameters must be URL encoded. For more information about encoding request parameters, refer to [URL encoding query parameter values](/api-docs/static/rest-request-components.html#parameters).  
For example, to retrieve all vehicle trims for a 2022 Audi A4:

*   Set the **compatibility\_property** filter to `compatibility_property=Trim`
*   Include the following name/value filters using one **filter** parameter:
    *   `Year:2022`
    *   `Make:Audi`
    *   `Model:A4`
    *   `BodyStyle:AWD B9 8W5\,8WD`

The resulting comma-separated filter query parameter is:

```
filter=Year:2022,Make:Audi,Model:A4,BodyStyle:AWD B9 8W5\,8WD
```

  
The following sample shows the same filter but with URL encoding for the blank spaces.  

```
GET https://api.ebay.com/commerce/taxonomy/v1/category_tree/100/get_compatibility_property_values?category_id=6016&compatibility_property=Trim&filter=Year:2022,Make:Audi,Model:A4,BodyStyle:AWD%20B9%208W5%5C%2C8WD
```

  
**Note:** While not required, it is strongly recommended that users limit the size of the result set by using the **filter** query parameter. Failure to do so may result in a timeout error if too much data is attempted to be returned.

### getExpiredCategories

#### GET /category_tree/{category_tree_id}/get_expired_categories
**Description:** This method retrieves the mappings of expired leaf categories in the specified category tree to their corresponding active leaf categories. Note that in some cases, several expired categories are mapped to a single active category.  
  
**Note:** This method only returns information about categories that have been mapped (i.e., combined categories and split categories). It does not return information about expired categories that have no corresponding active categories. When a category expires in this manner, any completed items that were listed in the expired category can still be found, but new listings cannot be created in the category.
**Parameters:**
- **category_tree_id** (string) *required*
  - The unique identifier of the eBay category tree.  
  
The category tree ID for an eBay marketplace can be retrieved using the [getDefaultCategoryTreeId](/develop/api/sell/taxonomy_api#sell-taxonomy_api-category_tree-getdefaultcategorytreeid) method.

## Error Codes

The following error codes may be returned by this API:

### REQUEST Errors

#### 62004 - API_TAXONOMY
**Description:** The specified category tree ID was not found.

#### 62002 - API_TAXONOMY
**Description:** Missing marketplace ID.

#### 62003 - API_TAXONOMY
**Description:** The specified marketplace ID was not found.

#### 62005 - API_TAXONOMY
**Description:** The specified category ID does not belong to the specified category tree.

#### 62006 - API_TAXONOMY
**Description:** Missing category ID.

#### 62008 - API_TAXONOMY
**Description:** The specified category ID is the root for the category tree. Please use `{categoryTreeHref}` to retrieve the entire tree.

#### 62007 - API_TAXONOMY
**Description:** Missing keyword 'q'. Please specify a valid set of keywords that best describes your item.

#### 62009 - API_TAXONOMY
**Description:** The specified category ID must be a leaf category.

#### 62101 - API_TAXONOMY
**Description:** This category ID is disabled for parts compatibility.

#### 62103 - API_TAXONOMY
**Description:** The CategoryTreeId is not supported.

#### 62100 - API_TAXONOMY
**Description:** The filter format is invalid. For more information, see the API call reference documentation.

#### 62102 - API_TAXONOMY
**Description:** The compatibility property is invalid.

#### 62104 - API_TAXONOMY
**Description:** Missing compatibility property.

### APPLICATION Errors

#### 62000 - API_TAXONOMY
**Description:** There was a problem with an eBay internal system or process. Contact eBay developer support for assistance.

## Rate Limits

See [API Call Limits](https://developer.ebay.com/develop/get-started/api-call-limits) on the eBay Developer Program.

## Resources

### Documentation

- [eBay Developer Program](https://developer.ebay.com/)
- [API Documentation](https://developer.ebay.com/develop/api/)
- [SDKs and Widgets](https://developer.ebay.com/develop/sdks-and-widgets)
- [Developer Community Forum](https://community.ebay.com/t5/Developer-Groups/ct-p/developergroup)

### Tools

- [API Explorer](https://developer.ebay.com/my/api_test_tool)
- [GraphQL Explorer](https://developer.ebay.com/my/graphql_explorer)

### Support

- [Developer Support](https://developer.ebay.com/support/)
- [API Status](https://developer.ebay.com/support/api-status)
- [Release Notes](https://developer.ebay.com/develop/api/release_notes/)

---
*Generated on 2026-07-07T22:24:50.352Z*