List and Search
GET /categories
The Categories API exposes just one endpoint /categories . You can use this endpoint to list or search for categories on a given Amazon domain .
Categories are expressed in a hierarchical structure, each category may have one or more child categories as-determined by the has_children property. You can retrieve the child categories of a given category by passing the parent category ID in the parent_id parameter.
To retrieve the top-level categories make a request without any parent_id . Top-level categories have their is_root=true property set to true.
The following querystring (HTTP GET) parameters allow you to refine the results returned by the Categories API.
Parameter | Required | Description |
---|---|---|
api_key | required | The API key for your account. |
domain | required | Filters the Categories returned to only those from the Amazon Domain i.e. domain=amazon.de . |
type | optional | Determines the type of Category to search for. Valid values are: standard - for regular Amazon categories compatible with the category_id parameter on type=search or type=category requests. bestsellers , gift_ideas , most_wished_for , movers_and_shakers or new_releases - for Bestseller Amazon categories compatible with the category_id parameter on type=bestseller requests. deals - for Deals Amazon categories compatible with the category_id parameter on type=deals requests. Defaults to standard when the type parameter is not specified. |
id | optional | A single ID of the category to retrieve. Note that id cannot be used when parent_id or search_term are used. |
parent_id | optional | The ID of the parent category to retrieve child categories for. Note that parent_id cannot be used when id or search_term are used. |
search_term | optional | Searches the entire category hierarchy for categories containing the search_term i.e. search_term=appliances (to return only categories containing the string appliances ). Note that search_term cannot be used when id or parent_id are used. |
The Categories API returns the following properties:
Property | Type | Description |
---|---|---|
categories | array | An array of Category objects containing details of a given category. The categories array is present when either the parent_id or search_term request parameters are used.
|
current_category | object | An object with the same properties as the category objects in the categories array showing details of the current category. Note that current_category is only present when a request is made using the parent_id request parameter (i.e. when retrieving child categories for a given parent_id ). |
parent_category | object | An object with the same properties as the category objects in the categories array showing details of the parent category. Note that parent_category is only present when a request is made using the parent_id request parameter (i.e. when retrieving child categories for a given parent_id ). parent_category shows details of the category that is the parent of the category specified in parent_id . Note parent_category is not returned if the category specified in the parent_id request parameter is is_root=true . |
category | object | An object with the same properties as the category objects in the categories array showing details of the single category requested by the id parameter. Note that category is only present when a request is made using the id request parameter (i.e. when retrieving details of a single category). |
In the example below we retrieve all top-level (root) categories for the amazon.com domain:
The Categories API responds with the top-level (root) categories for amazon.com in the categories property.
In the example below we retrieve child categories for a parent category with ID 2619526011 on amazon.com :
The Categories API responds with the child categories for parent category with ID 2619526011 on amazon.com in the categories property.
Next Steps Categories API Overview