---
title: "Categories"
description: "List AliExpress's category tree: the top level, or the children of one category."
---

> Every apinoa docs page as markdown: https://apinoa.com/llms.txt (all in one file: https://apinoa.com/llms-full.txt; this API family in one file: https://apinoa.com/docs/marketplace/llms.txt)

```http
GET | POST /v1/aliexpress/categories
```

Send parameters as a query string with `GET`, or as a JSON body with `POST`. Both are equivalent.

## Request

```bash tab="cURL"
curl "https://gateway.apinoa.com/v1/aliexpress/categories" \
  -H "x-api-key: $APINOA_API_KEY"
```

```js tab="JavaScript"
const res = await fetch("https://gateway.apinoa.com/v1/aliexpress/categories", {
  headers: { "x-api-key": process.env.APINOA_API_KEY },
});
const { success, data, error } = await res.json();
```

```python tab="Python"
import os

import requests

res = requests.get(
    "https://gateway.apinoa.com/v1/aliexpress/categories",
    headers={"x-api-key": os.environ["APINOA_API_KEY"]},
)
body = res.json()
```

## Parameters

| Parameter | Type | Required | Notes |
|---|---|---|---|
| `categoryId` | string |  | Parent category id. Omit for the top-level categories. |

The same parameters, and every response type, are in the OpenAPI document: https://apinoa.com/openapi.json

## Response

Returns [`CategoryList`](/docs/api-reference/marketplaces/response-schema#categorylist) in `data`. A real response, shortened: arrays keep their first entries and long text is cut.

```json
{
  "data": {
    "marketplace": "aliexpress",
    "path": [],
    "categories": [
      {
        "id": "2",
        "name": "Food"
      },
      {
        "id": "200183144",
        "name": "Canned Food1",
        "parentId": "2"
      }
    ]
  },
  "requestId": "45ca2062920949a5b5b888d7de5a812d",
  "success": true
}
```

## Errors

| Status | Code | Meaning |
|---|---|---|
| 400 | `INVALID_PARAMS` | A parameter is missing, unknown or out of range. The message names it. |
| 401 | `UNAUTHORIZED` | The `x-api-key` header is missing, or the key is revoked or unknown. |
| 402 | `INSUFFICIENT_BALANCE` | The balance does not cover this call. Top up in the dashboard. |
| 503 | `TOKEN_EXPIRED` | AliExpress is temporarily unavailable. Retry later. |

Every code is listed in [Errors](/docs/errors). Failed calls are not billed.

## Pricing

**Price** $0.001 per call. [List price](https://apinoa.com/en/pricing); the rate steps down above 1,000 calls a day.

## Notes

- **The whole taxonomy (564 categories) is behind one call,** so the roots and any category's children are both one request.
- **No paging or locale parameters.** Anything else is a 400 by name.
