> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/api-reference/database/taxonomies/get-database-merged-term-tree.md).

# Get Database Merged Term Tree

Hub — one term tree across a taxonomy and its child taxonomies.

Returns one **merged** term tree that glues related taxonomies together: the requested taxonomy's terms are the roots, and the terms of its child taxonomies (taxonomies whose **Parent** is this one) nest under them through their parent term — for example `Countries` with each country's `Cities` inside. One call instead of walking the children level by level.

`GET /{version}/database/taxonomies/{TaxonomyName}/merged-tree`

| Field                     | Meaning                                                |
| ------------------------- | ------------------------------------------------------ |
| `taxonomyName` (required) | The root taxonomy's name, e.g. `Countries`.            |
| `databaseIntegrationId`   | Optional; the project's default integration otherwise. |

The answer's `tree` is a list of term nodes with their children.

Permission: `database:read` on the taxonomy's terms. AI tool: `get_database_merged_term_tree`. The data-plane twin for apps is [Find Merged Term Tree](/codemash/api-reference/database/taxonomies/find-merged-term-tree.md).

{% openapi src="/files/0gOkqzp7kyziG9XPpCBy" path="/{version}/database/taxonomies/{TaxonomyName}/merged-tree" method="get" %}
[norbix-hub-swagger.json](https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-7c7445e68689b62620e59cb01a3523deb46b865b%2Fnorbix-hub-swagger.json?alt=media)
{% endopenapi %}

## In Cloud

See [Terms](/codemash/cloud/database/taxonomies/terms.md).

## Use it from code

TS `norbix.hub.database.getDatabaseMergedTermTree({ taxonomyName: 'Countries' })` · Python `hub.database.get_database_merged_term_tree("Countries")` · Go `c.Hub.Database.GetDatabaseMergedTermTree(ctx, "Countries", nil, &out)` · .NET `GetDatabaseMergedTermTreeAsync(new GetDatabaseMergedTermTreeRequest { TaxonomyName = "Countries" })` · CLI `norbix db term tree Countries --merged`.
