---
title: "Get child nodes, and optionally parent nodes, for a given taxon by Taxonomy ID"
method: POST
path: "/taxonomy/related_ids"
tags: ["Taxonomy"]
---

# Get child nodes, and optionally parent nodes, for a given taxon by Taxonomy ID

`POST /taxonomy/related_ids`

Get child nodes, and optionally parent nodes, in JSON format.

## Request body

- V2TaxonomyRelatedIdRequest
  - `tax_id` integer
  - `include_lineage` boolean
  - `include_subtree` boolean
  - `ranks` V2reportsRankType[]
  - `page_size` integer
  - `page_token` string

## Response `200`

A successful response

- V2TaxonomyTaxIdsPage
  - `tax_ids` integer[]
  - `next_page_token` string

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/ncats/apis/ncbi-datasets-api.md) · [All operations](https://skmtc.net/ncats/apis/ncbi-datasets-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ncats/ncbi-datasets-api/revisions/c6fcf8559d4a/schema)
