web3baseweb3base

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=1 for full i18n labels and optional descriptions
  • Align with GET /api/open/category-groups via groupKey / moduleGroupKeys

Endpoint

GET /api/open/categories

Query parameters

ParameterTypeRequiredDescription
localestringNoWhen not using includeI18n, used to resolve name (single locale)
scopestringNoDomain: chain / twitter / youtube / item; omit = all
includeI18nstringNo"1" or "true" returns full i18n and optional descriptionI18n

Response (without includeI18n)

200 OK, application/json, CategoryItem:

FieldTypeDescription
keystringStable category key
namestringDisplay name for locale
parentstring | nullParent key if any
prioritynumberSort weight
scopesstring[]Domains this category applies to (when no scope filter)

Response (includeI18n=1)

200 OK, application/json, CategoryItemFull:

FieldTypeDescription
keystringCategory key
i18nobjectName per locale
descriptionI18nobject | undefinedDescription per locale
parentstring | nullParent category
prioritynumberSort order
scopesstring[]Applicable domains
moduleGroupKeysobject | undefinedWhen scope is empty, dimension group keys per module
groupKeystring | undefinedWhen scope is set, dimension group key for this category

With scope (e.g. scope=chain), each item has groupKey matching category-groups groups[].key; without scope you get moduleGroupKeys instead.

Errors

HTTP statusWhen
400Invalid scope
429Open API rate limit
500Server 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"
    }
  ]
}

← Back to API overview