# Discourse API: Get Categories Related to Posts

**URL:** <https://meta.discourse.org/t/discourse-api-get-categories-related-to-posts/131498>\
**Category:** Development\
**Created:** [October 20, 2019, 5:17pm UTC](https://meta.discourse.org/t/discourse-api-get-categories-related-to-posts/131498 "2019-10-20T17:17:08Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Magnetidog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/magnetidog/32/116910_2.png) [@Magnetidog](https://meta.discourse.org/u/Magnetidog)\
**Post date:** [October 22, 2019, 6:06pm UTC](https://meta.discourse.org/t/discourse-api-get-categories-related-to-posts/131498/3 "2019-10-22T18:06:27Z")

</div>

Blake, thanks for your reply. Indeed, this is the route I went - locally cached categories.

For people doing similar stuff to what I am doing: since in my case I needed all the categories and subcategories, I also ended up using the site.json API point instead of categories.json (which seems to return only top level categories).

---

_[View the full topic](https://meta.discourse.org/t/discourse-api-get-categories-related-to-posts/131498)._
