# Getting participants of a group/channel

GramJS provides two friendly methods to get a list of participants from a channel a group.&#x20;

The interface looks like this. you can read more about filters here <https://core.telegram.org/type/ChannelParticipantsFilter>

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

```typescript
export interface IterParticipantsParams {
    limit?: number,
    search?: string,
    filter?: Api.TypeChannelParticipantsFilter,
}
```

{% endtab %}
{% endtabs %}

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

```typescript
getParticipants(entity: EntityLike, params: chatMethods.IterParticipantsParams);
```

{% endtab %}

{% tab title="Javascript" %}

```
getParticipants(entity, params);
```

{% endtab %}
{% endtabs %}

which returns an array with a `.total` attribute returning the real number of users in the group.

you can also use an iterator with `iterParticipants`

## Examples:

#### Using `iterParticipants`

```javascript
const participants = client.iterParticipants("your_entity_here", {
    limit: 10,
});
for await (const participant of participants) {
    //console.log("participant is", participant); // this line is very verbose but helpful for debugging
    console.log("username text is : ", participant.username);
}
```

#### Using `getParticipants`

```javascript
const result = await client.getParticipants("gramjs",{
    limit:10
});
console.log(result);
```
