Global category registry with scope and includeI18n; use with category-groups for i18n filters.
Get category list
GET /api/open/categories
Returns categories from the global category registry:
- Filter by
scope:chain/twitter/youtube/item - Use
includeI18n=1for full i18n labels and optional descriptions - Align with GET /api/open/category-groups via
groupKey/moduleGroupKeys
Endpoint
GET /api/open/categories
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
locale | string | No | When not using includeI18n, used to resolve name (single locale) |
scope | string | No | Domain: chain / twitter / youtube / item; omit = all |
includeI18n | string | No | "1" or "true" returns full i18n and optional descriptionI18n |
Response (without includeI18n)
200 OK, application/json, CategoryItem:
| Field | Type | Description |
|---|---|---|
key | string | Stable category key |
name | string | Display name for locale |
parent | string | null | Parent key if any |
priority | number | Sort weight |
scopes | string[] | Domains this category applies to (when no scope filter) |
Response (includeI18n=1)
200 OK, application/json, CategoryItemFull:
| Field | Type | Description |
|---|---|---|
key | string | Category key |
i18n | object | Name per locale |
descriptionI18n | object | undefined | Description per locale |
parent | string | null | Parent category |
priority | number | Sort order |
scopes | string[] | Applicable domains |
moduleGroupKeys | object | undefined | When scope is empty, dimension group keys per module |
groupKey | string | undefined | When scope is set, dimension group key for this category |
With
scope(e.g.scope=chain), each item hasgroupKeymatchingcategory-groupsgroups[].key; withoutscopeyou getmoduleGroupKeysinstead.
Errors
| HTTP status | When |
|---|---|
400 | Invalid scope |
429 | Open API rate limit |
500 | Server error |
Example request
# Single locale: only need name for current locale
curl -s "https://www.web3base.ai/api/open/categories?locale=en&scope=chain" | jq '.categories[0]'
# Multi-locale: full i18n and dimension groups
curl -s "https://www.web3base.ai/api/open/categories?scope=twitter&includeI18n=1" | jq '.categories[0]'Example response (includeI18n=1)
{
"categories": [
{
"key": "l2",
"i18n": {
"en": "Layer 2",
"zh-hans": "二层网络"
},
"descriptionI18n": {
"en": "Layer 2 rollups and sidechains"
},
"parent": null,
"priority": 10,
"scopes": ["chain"],
"moduleGroupKeys": {
"chain": ["ecosystem", "layer"]
},
"groupKey": "ecosystem"
}
]
}