eBay Taxonomy API
The eBay Taxonomy API exposes the category trees and item-aspect metadata that govern how items are classified across eBay marketplaces.
The eBay Taxonomy API exposes the category trees and item-aspect metadata that govern how items are classified across eBay marketplaces.
openapi: 3.0.0
info:
title: eBay Taxonomy API
description: 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.
contact:
name: eBay Inc,
license:
name: eBay API License Agreement
url: https://go.developer.ebay.com/api-license-agreement
version: v1.0.1
servers:
- url: https://api.ebay.com{basePath}
description: Production
variables:
basePath:
default: /commerce/taxonomy/v1
paths:
/category_tree/{category_tree_id}/fetch_item_aspects:
get:
tags:
- Category_tree
summary: eBay Get Aspects for All Leaf Categories in a Marketplace
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 <b>category_tree_id</b> URI parameter.<br><br><span class="tablenote"> <strong>Note:</strong> 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 <a href="https://github.com/eBay/taxonomy-sdk " target="_blank">Taxonomy SDK</a> can be used to compare the aspect metadata that is returned in this response. The <b>Taxonomy SDK</b> 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.</span>
operationId: fetchItemAspects
parameters:
- name: category_tree_id
in: path
description: The unique identifier of the eBay category tree. The category tree ID for an eBay marketplace can be retrieved using the <b>getDefaultCategoryTreeId</b> method.
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/GetCategoriesAspectResponse'
'400':
description: Bad Request
x-response-codes:
errors:
'62004':
domain: API_TAXONOMY
category: REQUEST
description: The specified category tree ID was not found.
'404':
description: Not found
'500':
description: Internal Server Error
x-response-codes:
errors:
'62000':
domain: API_TAXONOMY
category: APPLICATION
description: There was a problem with an eBay internal system or process. Contact eBay developer support for assistance.
security:
- api_auth:
- https://api.ebay.com/oauth/api_scope
- https://api.ebay.com/oauth/api_scope/metadata.insights
/get_default_category_tree_id:
get:
tags:
- Category_tree
summary: eBay Get a 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.
operationId: getDefaultCategoryTreeId
parameters:
- name: marketplace_id
in: query
description: The unique identifier of the eBay marketplace for which the category tree ID is requested. For a list of supported marketplace IDs, see <a href="/api-docs/commerce/taxonomy/static/supportedmarketplaces.html">Marketplaces with Default Category Trees</a>.
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/BaseCategoryTree'
'204':
description: No content
'400':
description: Bad Request
x-response-codes:
errors:
'62002':
domain: API_TAXONOMY
category: REQUEST
description: Missing marketplace ID.
'62003':
domain: API_TAXONOMY
category: REQUEST
description: The specified marketplace ID was not found.
'500':
description: Internal Server Error
x-response-codes:
errors:
'62000':
domain: API_TAXONOMY
category: APPLICATION
description: There was a problem with an eBay internal system or process. Contact eBay developer support for assistance.
security:
- api_auth:
- https://api.ebay.com/oauth/api_scope
/category_tree/{category_tree_id}:
get:
tags:
- Category_tree
summary: eBay Get a Category Tree
description: 'This method retrieves the complete category tree that is identified by the <b>category_tree_id</b> parameter. The value of <b>category_tree_id</b> was returned by the <b>getDefaultCategoryTreeId</b> method in the <b>categoryTreeId</b> 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.<br><br><span class="tablenote"> <strong>Note:</strong> This method can return a very large payload, so gzip compression is supported. To enable gzip compression, include the <code>Accept-Encoding</code> header and set its value to <code>gzip</code> as shown below: <br><br><code> Accept-Encoding: gzip</code></span>'
operationId: getCategoryTree
parameters:
- name: category_tree_id
in: path
description: The unique identifier of the eBay category tree. The category tree ID for an eBay marketplace can be retrieved using the <b>getDefaultCategoryTreeId</b> method.
required: true
schema:
type: string
- name: Accept-Encoding
in: header
description: This header indicates the compression-encoding algorithms the client accepts for the response. This value should be set to <code>gzip</code>. <br><br> For more information, refer to <a href="/api-docs/static/rest-request-components.html#HTTP" target="_blank ">HTTP request headers</a>.
required: false
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/CategoryTree'
'400':
description: Bad Request
x-response-codes:
errors:
'62004':
domain: API_TAXONOMY
category: REQUEST
description: The specified category tree ID was not found.
'404':
description: Not Found
'500':
description: Internal Server Error
x-response-codes:
errors:
'62000':
domain: API_TAXONOMY
category: APPLICATION
description: There was a problem with an eBay internal system or process. Contact eBay developer support for assistance.
security:
- api_auth:
- https://api.ebay.com/oauth/api_scope
/category_tree/{category_tree_id}/get_category_subtree:
get:
tags:
- Category_tree
summary: eBay Get a 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 <b>category_tree_id</b> parameter, which was returned by the <b>getDefaultCategoryTreeId</b> call in the <b>categoryTreeId</b> field.<br><br><span class="tablenote"> <strong>Note:</strong> This method can return a very large payload, so gzip compression is supported. To enable gzip compression, include the <code>Accept-Encoding</code> header and set its value to <code>gzip</code> as shown below: <br><br><code> Accept-Encoding: gzip</code></span>'
operationId: getCategorySubtree
parameters:
- name: category_id
in: query
description: 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.<br><br><span class="tablenote"><strong>Note:</strong> If the <b>category_id</b> submitted identifies a leaf node of the tree, the call response will contain information about only that leaf node, which is a valid subtree.<!-- <br><br> This call also returns an error if <b>category_id</b> identifies a deprecated category. This can occur if you routinely cache your category trees. Use the <b>Get Deprecated Categories and Mapping</b> call to determine which current category should be used in place of the deprecated category, and use the <b>getCategoryTree</b> call to update your cached copy of the tree. --> </span>
required: true
schema:
type: string
- name: category_tree_id
in: path
description: The unique identifier of the eBay category tree. The category tree ID for an eBay marketplace can be retrieved using the <b>getDefaultCategoryTreeId</b> method.
required: true
schema:
type: string
- name: Accept-Encoding
in: header
description: This header indicates the compression-encoding algorithms the client accepts for the response. This value should be set to <code>gzip</code>. <br><br> For more information, refer to <a href="/api-docs/static/rest-request-components.html#HTTP" target="_blank ">HTTP request headers</a>.
required: false
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/CategorySubtree'
'400':
description: Bad Request
x-response-codes:
errors:
'62004':
domain: API_TAXONOMY
category: REQUEST
description: The specified category tree ID was not found.
'62005':
domain: API_TAXONOMY
category: REQUEST
description: The specified category ID does not belong to the specified category tree.
'62006':
domain: API_TAXONOMY
category: REQUEST
description: Missing category ID.
'62008':
domain: API_TAXONOMY
category: REQUEST
description: The specified category ID is the root for the category tree. Please use <code>{categoryTreeHref}</code> to retrieve the entire tree.
'404':
description: Not Found
'500':
description: Internal Server Error
x-response-codes:
errors:
'62000':
domain: API_TAXONOMY
category: APPLICATION
description: There was a problem with an eBay internal system or process. Contact eBay developer support for assistance.
security:
- api_auth:
- https://api.ebay.com/oauth/api_scope
/category_tree/{category_tree_id}/get_category_suggestions:
get:
tags:
- Category_tree
summary: eBay Get Suggested Categories
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 <b>q</b>. Returned with each suggested node is a localized name for that category (based on the <b>Accept-Language</b> 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.<br><br>You identify the tree using the <b>category_tree_id</b> parameter, which was returned by the <b>getDefaultCategoryTreeId</b> call in the <b>categoryTreeId</b> field.<br><br><span class="tablenote"> <strong><span style="color:red">Important:</span></strong> This call is not supported in the Sandbox environment. It will return a response payload in which the <b>categoryName</b> fields contain random or boilerplate text regardless of the query submitted.</span>
operationId: getCategorySuggestions
parameters:
- name: category_tree_id
in: path
description: The unique identifier of the eBay category tree. The category tree ID for an eBay marketplace can be retrieved using the <b>getDefaultCategoryTreeId</b> method.
required: true
schema:
type: string
- name: q
in: query
description: 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.
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/CategorySuggestionResponse'
'204':
description: No content
'400':
description: Bad Request
x-response-codes:
errors:
'62004':
domain: API_TAXONOMY
category: REQUEST
description: The specified category tree ID was not found.
'62007':
domain: API_TAXONOMY
category: REQUEST
description: Missing keyword 'q'. Please specify a valid set of keywords that best describes your item.
'404':
description: Not found
'500':
description: Internal Server Error
x-response-codes:
errors:
'62000':
domain: API_TAXONOMY
category: APPLICATION
description: There was a problem with an eBay internal system or process. Contact eBay developer support for assistance.
security:
- api_auth:
- https://api.ebay.com/oauth/api_scope
/category_tree/{category_tree_id}/get_item_aspects_for_category:
get:
tags:
- Category_tree
description: 'This call returns a list of <i>aspects</i> 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.<br><br>For each aspect, <b>getItemAspectsForCategory</b> provides complete metadata, including: <ul><li>The aspect''s data type, format, and entry mode</li><li>Whether the aspect is required in listings</li><li>Whether the aspect can be used for item variations</li><li>Whether the aspect accepts multiple values for an item</li><li>Allowed values for the aspect</li></ul> 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.'
operationId: getItemAspectsForCategory
parameters:
- name: category_id
in: query
description: The unique identifier of the leaf category for which aspects are being requested.<br><br><span class="tablenote"> <strong>Note:</strong> If the <b>category_id</b> submitted does not identify a leaf node of the tree, this call returns an error. </span>
required: true
schema:
type: string
- name: category_tree_id
in: path
description: The unique identifier of the eBay category tree. The category tree ID for an eBay marketplace can be retrieved using the <b>getDefaultCategoryTreeId</b> method.
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/AspectMetadata'
'204':
description: No Content
'400':
description: Bad Request
x-response-codes:
errors:
'62004':
domain: API_TAXONOMY
category: REQUEST
description: The specified category tree ID was not found.
'62005':
domain: API_TAXONOMY
category: REQUEST
description: The specified category ID does not belong to specified category tree.
'62006':
domain: API_TAXONOMY
category: REQUEST
description: Missing category ID.
'62008':
domain: API_TAXONOMY
category: REQUEST
description: The specified category ID is the root for the category tree.
'62009':
domain: API_TAXONOMY
category: REQUEST
description: The specified category ID must be a leaf category.
'404':
description: Not found
'500':
description: Internal Server Error
x-response-codes:
errors:
'62000':
domain: API_TAXONOMY
category: APPLICATION
description: There was a problem with an eBay internal system or process. Contact eBay developer support for assistance.
security:
- api_auth:
- https://api.ebay.com/oauth/api_scope
- https://api.ebay.com/oauth/api_scope/metadata.insights
/category_tree/{category_tree_id}/get_compatibility_properties:
get:
tags:
- Category_tree
summary: eBay 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.<br><br> The <strong>category_tree_id</strong> value is passed in as a path parameter, and this value identifies the eBay category tree. The <strong>category_id</strong> 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.<br><br> 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:<ul><li>eBay US (Motors and non-Motors categories)</li><li>eBay Canada (Motors and non-Motors categories)</li><li>eBay UK</li><li>eBay Germany</li><li>eBay Australia</li><li>eBay France</li><li>eBay Italy</li><li>eBay Spain</li></ul>
operationId: getCompatibilityProperties
parameters:
- name: category_tree_id
in: path
description: 'This is the unique identifier of category tree. The following is the list of <strong>category_tree_id</strong> values and the eBay marketplaces that they represent. One of these ID values must be passed in as a path parameter, and the <strong>category_id</strong> 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.<br><br><ul><li>eBay US: 0</li><li>eBay Motors US: 100</li><li>eBay Canada: 2</li><li>eBay UK: 3</li><li>eBay Germany: 77</li><li>eBay Australia: 15</li><li>eBay France: 71</li><li>eBay Italy: 101</li><li>eBay Spain: 186</li></ul>'
required: true
schema:
type: string
- name: category_id
in: query
description: 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.<br><br> The <b>getAutomotivePartsCompatibilityPolicies</b> method of the Selling Metadata API can be used to retrieve all eBay categories for an eBay marketplace that support parts compatibility for vehicles.
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/GetCompatibilityMetadataResponse'
'204':
description: No content
'400':
description: Bad Request
x-response-codes:
errors:
'62004':
domain: API_TAXONOMY
category: REQUEST
description: The specified category tree ID was not found.
'62005':
domain: API_TAXONOMY
category: REQUEST
description: The specified category ID does not belong to specified category tree.
'62006':
domain: API_TAXONOMY
category: REQUEST
description: Missing category ID.
'62101':
domain: API_TAXONOMY
category: REQUEST
description: This category ID is disabled for parts compatibility.
'62103':
domain: API_TAXONOMY
category: REQUEST
description: The CategoryTreeId is not supported.
'404':
description: Not found
'500':
description: Internal Server Error
x-response-codes:
errors:
'62000':
domain: API_TAXONOMY
category: APPLICATION
description: There was a problem with an eBay internal system or process. Contact eBay developer support for assistance.
security:
- api_auth:
- https://api.ebay.com/oauth/api_scope
/category_tree/{category_tree_id}/get_compatibility_property_values:
get:
tags:
- Category_tree
summary: eBay 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 <strong>compatibilityProperties.name</strong> field of a <strong>getCompatibilityProperties</strong> response. <br><br> One compatible vehicle property applicable to the specified eBay marketplace and eBay category is specified through the required <strong>compatibility_property</strong> 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 <strong>filter</strong> query parameter.<br><br>See the documentation in <strong>URI parameters</strong> section for more information on using the <strong>compatibility_property</strong> and <strong>filter</strong> query parameters together to customize the data that is retrieved.
operationId: getCompatibilityPropertyValues
parameters:
- name: category_tree_id
in: path
description: 'This is the unique identifier of the category tree. The following is the list of <strong>category_tree_id</strong> values and the eBay marketplaces that they represent. One of these ID values must be passed in as a path parameter, and the <strong>category_id</strong> 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.<br><br><ul><li>eBay US: 0</li><li>eBay Motors US: 100</li><li>eBay Canada: 2</li><li>eBay UK: 3</li><li>eBay Germany: 77</li><li>eBay Australia: 15</li><li>eBay France: 71</li><li>eBay Italy: 101</li><li>eBay Spain: 186</li></ul>'
required: true
schema:
type: string
- name: compatibility_property
in: query
description: '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 <strong>compatibilityProperties.name</strong> field of a <strong>getCompatibilityProperties</strong> response. <br><br> For example, if you wanted to retrieve all vehicle trims for a 2018 Toyota Camry, you would set this filter as follows: <code>compatibility_property=Trim</code> and then include the following three name/value filters through one <strong>filter</strong> parameter: <code>filter=Year:2018,Make:Toyota,Model:Camry</code>.<br><br>So, putting this all together, the URI would look something like this:<br><br><pre><code>GET https://api.ebay.com/commerce/<br>taxonomy/v1/category_tree/100/<br>get_compatibility_property_values?<br><strong>category_id</strong>=6016&<strong>compatibility_property</strong>=Trim<br>&<strong>filter</strong>=Year:2018,Make:Toyota,Model:Camry</code></pre>'
required: true
schema:
type: string
- name: category_id
in: query
description: 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.<br><br> The <strong>getAutomotivePartsCompatibilityPolicies</strong> method of the Selling Metadata API can be used to retrieve all eBay categories for an eBay marketplace that support parts compatibility for vehicles.
required: true
schema:
type: string
- name: filter
in: query
description: 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 <code>filter=Year:2018</code>, and multiple compatible vehicle property name/value pairs are delimited with a comma (,).<br><br><span class="tablenote"><b>Note:</b> Commas are used as delimiters between filter values. If a value includes a comma (e.g., <code>BodyStyle:AWD B9 8W5<b>,</b>C8WD</code>) you <b>must</b> include a backslash (<b>\</b>) immediately before the comma to prevent it from being evaluated as a delimiter.<br><br>As with all query parameter values, the filter parameters must be URL encoded. For more information about encoding request parameters, refer to <a href="/api-docs/static/rest-request-components.html#parameters" target="_blank">URL encoding query parameter values</a>.</span><br>For example, to retrieve all vehicle trims for a 2022 Audi A4:<ul><li>Set the <strong>compatibility_property</strong> filter to <code>compatibility_property=Trim</code></li><li>Include the following name/value filters using one <strong>filter</strong> parameter:<ul><li><code>Year:2022</code></li><li><code>Make:Audi</code></li><li><code>Model:A4</code></li><li><code>BodyStyle:AWD B9 8W5\,8WD</code></li></ul></li></ul>The resulting comma-separated filter query parameter is:<pre><code>filter=Year:2022,Make:Audi,Model:A4,BodyStyle:AWD B9 8W5\,8WD</code></pre><br>The following sample shows the same filter but with URL encoding for the blank spaces.<br><pre><code>GET https://api.ebay.com/commerce/<br>taxonomy/v1/category_tree/100/<br>get_compatibility_property_values?<b>category_id</b>=6016&<b>compatibility_property</b>=Trim&<b>filter</b>=Year:2022,Make:Audi,Model:A4,BodyStyle:AWD%20B9%208W5%5C%2C8WD</code></pre> For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/commerce/taxonomy/types/txn:ConstraintFilter
required: false
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/GetCompatibilityPropertyValuesResponse'
'204':
description: No content
'400':
description: Bad Request
x-response-codes:
errors:
'62004':
domain: API_TAXONOMY
category: REQUEST
description: The specified category tree ID was not found.
'62005':
domain: API_TAXONOMY
category: REQUEST
description: The specified category ID does not belong to specified category tree.
'62006':
domain: API_TAXONOMY
category: REQUEST
description: Missing category ID.
'62100':
domain: API_TAXONOMY
category: REQUEST
description: The filter format is invalid. For more information, see the API call reference documentation.
'62101':
domain: API_TAXONOMY
category: REQUEST
description: This category ID is disabled for parts compatibility.
'62102':
domain: API_TAXONOMY
category: REQUEST
description: The compatibility property is invalid.
'62103':
domain: API_TAXONOMY
category: REQUEST
description: The CategoryTreeId is not supported.
'62104':
domain: API_TAXONOMY
category: REQUEST
description: Missing compatibility property.
'404':
description: Not found
'500':
description: Internal Server Error
x-response-codes:
errors:
'62000':
domain: API_TAXONOMY
category: APPLICATION
description: There was a problem with an eBay internal system or process. Contact eBay developer support for assistance.
security:
- api_auth:
- https://api.ebay.com/oauth/api_scope
components:
schemas:
AncestorReference:
type: object
properties:
categoryId:
type: string
description: The unique identifier of the eBay ancestor category.<br><br><span class="tablenote"> <strong>Note:</strong> The root node of a full default category tree includes the <b>categoryId</b> field, but its value should not be relied upon. It provides no useful information for application development.</span>
categoryName:
type: string
description: The name of the ancestor category identified by <b>categoryId</b>.
categorySubtreeNodeHref:
type: string
description: The href portion of the <b>getCategorySubtree</b> call that retrieves the subtree below the ancestor category node.
categoryTreeNodeLevel:
type: integer
description: The absolute level of the ancestor category node in the hierarchy of its category tree.<br><br><span class="tablenote"> <strong>Note:</strong> The root node of any full category tree is always at level <code><b>0</b></code>. </span>
format: int32
description: This type contains information about one of the ancestors of a suggested category. An ordered list of these references describes the path from the suggested category to the root of the category tree it belongs to.
Aspect:
type: object
properties:
aspectConstraint:
description: Information about the formatting, occurrence, and support of this aspect.
$ref: '#/components/schemas/AspectConstrain
# --- truncated at 32 KB (56 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/ebay/refs/heads/main/openapi/ebay-taxonomy-openapi-original.yml