---
title: "Gets a list of Topics filtered by 'Topic Short Name' or 'Topic Id'"
method: GET
path: "/api/v1/topics/{codes}"
tags: ["Topics"]
---

# Gets a list of Topics filtered by 'Topic Short Name' or 'Topic Id'

`GET /api/v1/topics/{codes}`

## Request

- Base URL: `https://population.un.org/dataportalapi`
- URL: `https://population.un.org/dataportalapi/api/v1/topics/{codes}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/united-nations/apis/data-portal-api/docs/api/v1/topics/:codes/get.ts> (a function with typed inputs; its response is checked against the schema)

<br>Filters Topics based on 'param' which can be either 'Topic Short Name' or 'Topic Id'

## Path parameters

- `codes` string, required

## Query parameters

- `sort` string
- `format` string

## Response `200`

Returns Status 200 OK

- TopicDto[]
  - `id` integer
  - `name` string, nullable
  - `shortName` string, nullable
  - `sortOrder` integer

## Other responses

- `400`: Returns Status 404 NotFound if 'ShortName' or 'Id' does not exist
- `401`: Unauthorized
- `404`: Returns Status 404 NotFound if 'ShortName' or 'Id' does not exist
- `406`: Not Acceptable
- `500`: Returns Status 500 Internal Server Error if an exception is thrown from the Web API code

---

[API](https://skmtc.dev/united-nations/apis/data-portal-api.md) - [All operations](https://skmtc.dev/united-nations/apis/data-portal-api/llms.txt) - [OpenAPI document](https://skmtc.dev/united-nations/apis/data-portal-api/revisions/2f5f5b77ad0d?raw)
