# Getting categories on your website via JS

**URL:** https://meta.discourse.org/t/getting-categories-on-your-website-via-js/206948
**Category:** Development
**Created:** [October 25, 2021, 8:41am UTC](https://meta.discourse.org/t/getting-categories-on-your-website-via-js/206948 "2021-10-25T08:41:46Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Akash\_Joshi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/akash_joshi/32/234392_2.png) [@Akash\_Joshi](https://meta.discourse.org/u/Akash_Joshi)
#### Post date: [October 25, 2021, 8:41am UTC](https://meta.discourse.org/t/getting-categories-on-your-website-via-js/206948/1 "2021-10-25T08:41:46Z")

</div>

Hey all! This is not a question post, just wanted to contribute something I had been searching for quite frequently, but figured out myself.

Basically, if you want to get any website-related data on the client side, you can get it from the `container` object.

For eg, the code to get categories is

```plaintext
const container = Discourse. __container__ ;
const categories = container.lookup("controller:navigation/categories").site.categories;

```

These features aren’t documented anywhere, but you can figure it out via trial and error.

If you want to do anything more complex, you can also have a look at this post: [Reverse engineer the Discourse API](https://meta.discourse.org/t/how-to-reverse-engineer-the-discourse-api/20576)
