# API - Get Categories without Descriptions

**URL:** https://meta.discourse.org/t/api-get-categories-without-descriptions/231425
**Category:** Development
**Tags:** rest-api
**Created:** [June 29, 2022, 8:01am UTC](https://meta.discourse.org/t/api-get-categories-without-descriptions/231425 "2022-06-29T08:01:50Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Honeyxilia](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/honeyxilia/32/523830_2.png) [@Honeyxilia](https://meta.discourse.org/u/Honeyxilia)
#### Post date: [June 29, 2022, 8:01am UTC](https://meta.discourse.org/t/api-get-categories-without-descriptions/231425/1 "2022-06-29T08:01:50Z")

</div>

Hi, I want to use a GET Request as such to obtain all categories in my Discourse server.

```py
resp = requests.get(base_url + "/categories.json", headers={"Api-Key": clef_api, "Api-Username": "system"}, param={'include_subcategories': 'true'} ,auth=auth)
    assert(resp.status_code == 200)

```

Unfortunally, as they pull the descriptions of the categories, with all the current categories, I receive a 413 HTTP error (Payload Too Large). So, I’d like to be able to opt out of pulling Categories descriptions to pull less data.

Can you help me ? thx 🙂

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [June 29, 2022, 8:40am UTC](https://meta.discourse.org/t/api-get-categories-without-descriptions/231425/2 "2022-06-29T08:40:38Z")

</div>

I think you need to use `params` and not `data`..

> [@Discourse API docs mention a "request body" for a GET request](https://meta.discourse.org/t/discourse-api-docs-mention-a-request-body-for-a-get-request/231137/13):
>
> GET always has a query string and never has post data (that is why you are getting 413 payload too large, it does not expect any). When querying data from a server without making a change you’ll (almost) always use GET and not POST. So you should use params= instead of data=. I think the docs for this specific API call are badly phrased (“[Request Body schema](https://docs.discourse.org/#tag/Topics/operation/getSpecificPostsFromTopic)” really indicates POST data) so I am moving this to #bug and you don’t need to pay me anything. import requests import json def get\_post\_…

---

<div class="post-metadata">

### Author: ![Honeyxilia](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/honeyxilia/32/523830_2.png) [@Honeyxilia](https://meta.discourse.org/u/Honeyxilia)
#### Post date: [June 29, 2022, 8:47am UTC](https://meta.discourse.org/t/api-get-categories-without-descriptions/231425/3 "2022-06-29T08:47:12Z")

</div>

this worked lmao, thx !! 🤗

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [June 29, 2022, 12:41pm UTC](https://meta.discourse.org/t/api-get-categories-without-descriptions/231425/4 "2022-06-29T12:41:05Z")

</div>

Glad that did the trick! I’ve been confused by that myself. Thanks to @RGJ for his lucid explanation.

---

<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: [July 29, 2022, 12:41pm UTC](https://meta.discourse.org/t/api-get-categories-without-descriptions/231425/5 "2022-07-29T12:41:32Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
