---
title: "Returns a list of Sources filtered by single or multiple Source Id"
method: GET
path: "/api/v1/sources/{codes}"
tags: ["Sources"]
---

# Returns a list of Sources filtered by single or multiple Source Id

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

## Request

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

<br>Gets all Sources if no 'ids' parameter is supplied.
<br>Otherwise, it filters Sources based on 'ids' parameter.
<br>Multiple 'ids' parameters can be passed in, separated by semi-column (i.e. '1;2;3').

## Path parameters

- `codes` string, required

## Query parameters

- `sort` string
- `format` string

## Response `200`

Returns Status 200 OK

- SourceDto[]
  - `id` integer, nullable
  - `name` string, nullable
  - `sourceYear` integer, nullable
  - `startYear` integer, nullable
  - `endYear` integer, nullable
  - `citation` string, nullable
  - `url` string, nullable
  - `author` string, nullable

## Other responses

- `400`: Returns Status 400 BadRequest if 'sort' parameters is wrong and does not exist on the Model
- `401`: Unauthorized
- `404`: Returns Status 404 NotFound if 'SourceId' 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)
