> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metriport.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Patients

> Lists all Patients receiving care.

This is a paginated endpoint. For more information see [pagination](/medical-api/handling-data/pagination).

## Query Params

<ParamField query="facilityId" type="string" Optional>
  The ID of the Facility where the patient is receiving care, optional. If not provided, Patients
  from all Facilities will be returned.
</ParamField>

<ParamField query="filters" type="string" Optional>
  How to filter patients. It uses Metriport's [filter/search criteria](/medical-api/handling-data/filters)
  based on the main properties of a Patient: first name, last name, date of birth, ID, external ID,
  facility ID, facility name, and additional identifiers.

  One can combine fields as needed, for example:

  * `john or doe` will return all patients with the first and/or last name equal to `john` or `doe`.
  * `john -doe` will return all patients with the first and/or last name equal to `john` but without any
    `doe` either on first or last names.
  * `john 2000` will return all patients with the first and/or last name equal to `john` and born in the
    year `2000`.
  * `2000-02-03` will return all patients born on `2020-02-03`.
  * `ABCD1234` will return all patients with that external ID.

  Date of birth should follow the format ISO 8601 (`YYYY-MM-DD`), but partial values are accepted (`YYYY`,
  `YYYY-MM`)
</ParamField>

## Response

All Patients receiving care at the specified Facility, or all Patients if no
Facility is specified.

<ResponseField name="patients" type="Patient[]">
  <Expandable title="Patient properties">
    <Snippet file="patient-response.mdx" />
  </Expandable>
</ResponseField>

<ResponseExample>
  ```javascript Metriport SDK theme={null}
  import { MetriportMedicalApi } from "@metriport/api-sdk";

  const metriport = new MetriportMedicalApi("YOUR_API_KEY");

  const facilityId = "018a80c4-292a-7486-a1234-9uiu76yhe234";
  const filters = "john doe";
  const { patients } = await metriport.listPatients(facilityId, filters);
  ```
</ResponseExample>

<Snippet file="patient-response-list-json.mdx" />
