# Get Many Users

Use this method to get multiple users' metadata simultaneously, such as the name, bio, social link, etc.&#x20;

### Usage in your script

{% tabs %}
{% tab title="JavaScript" %}

```javascript
const response = await altura.getUsers();

// customize options
const options = {
  perPage: 20,
  page: 1,
  sortBy: 'name',
  sortDir: 'asc'
}
const response = await altura.getUsers(options);

// filter documents by any properties
const response = await altura.getUsers(
  {}, // default options
  {
    name: 'AlturaNFT'
  } //fetching users with name AlturaNFT
)

const users = response.users;
const userCount = response.count;
```

{% endtab %}

{% tab title="TypeScript" %}

```typescript
const response: { users: IAlturaUser[], count: number } = await altura.getUsers();

// customize options
const options = {
  perPage: 20,
  page: 1,
  sortBy: 'name',
  sortDir: 'asc'
}
const response: { users: IAlturaUser[], count: number } = await altura.getUsers(options);

// filter documents by any properties
const response: {users: IAlturaUser[], count: number} = await altura.getUsers(
  {}, // default options
  {
    name: 'AlturaNFT'
  } //fetching users with name AlturaNFT
)

const users = response.users;
const userCount = response.count;
```

{% endtab %}
{% endtabs %}

### **Parameters**

<table><thead><tr><th width="193.33333333333331">Parameter</th><th width="88">Type</th><th width="109">Required</th><th>Description</th></tr></thead><tbody><tr><td>perPage</td><td><strong>String</strong></td><td><strong>Yes</strong></td><td>Amount of users per page.</td></tr><tr><td>page</td><td><strong>String</strong></td><td><strong>Yes</strong></td><td>Amount of pages</td></tr><tr><td>sortBy</td><td><strong>String</strong></td><td><strong>Yes</strong></td><td>The field to sort the users by (any field in the user schema may be used)</td></tr><tr><td>sortDir</td><td><strong>String</strong></td><td><strong>Yes</strong></td><td>Choose to sort in ascending (asc) or descending (desc) order</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.altura.com/altura-documentation/js-sdk-reference/get-methods/get-many-users.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
