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

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

`GET /taxonomy/taxon/{tax_id}/related_ids`

## Request

- Base URL: `https://api.ncbi.nlm.nih.gov/datasets/v2`
- URL: `https://api.ncbi.nlm.nih.gov/datasets/v2/taxonomy/taxon/{tax_id}/related_ids`
- Auth: API key in header `api-key`

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

## Path parameters

- `tax_id` integer, required

## Query parameters

- `include_lineage` 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.

## Changes

- **2026-08-06** `e5d4400c8e5d`: 1 warning
  - deleted the `query` request parameter `include_subtree`
- **2025-04-28** `f08be9b66e16`: 4 info
  - added the enum value `ACELLULAR_ROOT` to the property `items/` of the `query` request parameter `ranks`
  - added the enum value `CELLULAR_ROOT` to the property `items/` of the `query` request parameter `ranks`
  - added the enum value `DOMAIN` to the property `items/` of the `query` request parameter `ranks`
  - added the enum value `REALM` to the property `items/` of the `query` request parameter `ranks`
- **2025-02-08** `00bdccfc6283`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/ncats/apis/ncbi-datasets-api/changes/taxonomy/taxon/:tax_id/related_ids/get.md)

---

[API](https://skmtc.dev/ncats/apis/ncbi-datasets-api.md) - [All operations](https://skmtc.dev/ncats/apis/ncbi-datasets-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ncats/apis/ncbi-datasets-api/revisions/b24db4bc7ca5?raw)
