# Is there an api call to get a Group by id

**URL:** https://meta.discourse.org/t/is-there-an-api-call-to-get-a-group-by-id/122072
**Category:** Support
**Created:** [July 4, 2019, 7:02am UTC](https://meta.discourse.org/t/is-there-an-api-call-to-get-a-group-by-id/122072 "2019-07-04T07:02:22Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Nikki\_Locke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nikki_locke/32/146184_2.png) [@Nikki\_Locke](https://meta.discourse.org/u/Nikki_Locke)
#### Post date: [July 4, 2019, 7:02am UTC](https://meta.discourse.org/t/is-there-an-api-call-to-get-a-group-by-id/122072/1 "2019-07-04T07:02:22Z")

</div>

I can see an api call to get a Group by name, but not one to get by id.

With categories, you can get the category by id by calling /c/{id}/show, but I haven’t been able to find something similar for groups. I tried /g/{id}/show and /groups/{id}/show, but neither worked.

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [July 4, 2019, 7:07pm UTC](https://meta.discourse.org/t/is-there-an-api-call-to-get-a-group-by-id/122072/2 "2019-07-04T19:07:53Z")

</div>

I took a quick look and it seems you are right. We generally use the group name in URLs which is also a unique identifier for the group.

What you can do is retrieve a list of groups via `/groups.json` and then find the group by `id` in the JSON that is returned.

---

<div class="post-metadata">

### Author: ![Nikki\_Locke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nikki_locke/32/146184_2.png) [@Nikki\_Locke](https://meta.discourse.org/u/Nikki_Locke)
#### Post date: [July 5, 2019, 7:15am UTC](https://meta.discourse.org/t/is-there-an-api-call-to-get-a-group-by-id/122072/3 "2019-07-05T07:15:39Z")

</div>

But I already have the id!

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [December 25, 2022, 11:36pm UTC](https://meta.discourse.org/t/is-there-an-api-call-to-get-a-group-by-id/122072/4 "2022-12-25T23:36:51Z")

</div>



---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [December 26, 2022, 1:15am UTC](https://meta.discourse.org/t/is-there-an-api-call-to-get-a-group-by-id/122072/5 "2022-12-26T01:15:19Z")

</div>


