---
title: "Get gene counts by taxon"
method: GET
path: "/gene/taxon/{taxon}/counts"
tags: ["Gene"]
---

# Get gene counts by taxon

`GET /gene/taxon/{taxon}/counts`

## Request

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

Get gene counts by taxon in JSON format.

## Path parameters

- `taxon` string, required

## Response `200`

A successful response

- V2GeneCountsByTaxonReply
  - `report` V2GeneCountsByTaxonReplyGeneTypeAndCount[]
    - `gene_type` string
    - `count` integer

## Other responses

- `default`: An unexpected error response.

## Changes

- **2025-02-08** `00bdccfc6283`: 1 breaking, 1 info
  - removed the media type `application/json` for the response with the status `default`
  - added the media type `text/plain` for the response with the status `default`
- **2023-11-14** `b4da81b65e0a`: 14 info
  - the `gene_type` response's property default value `UNKNOWN` was removed for the status `200`
  - removed the `BIOLOGICAL_REGION` enum value from the `report/items/gene_type` response property for the response status `200`
  - removed the `OTHER` enum value from the `report/items/gene_type` response property for the response status `200`
  - removed the `PROTEIN_CODING` enum value from the `report/items/gene_type` response property for the response status `200`
  - …10 more

[Operation history](https://skmtc.dev/ncats/apis/ncbi-datasets-api/changes/gene/taxon/:taxon/counts/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)
