Gumtree categories API
Gumtree’s category tree, one level at a time.
GET /v1/gumtree/categories1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/gumtree/categories",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "id": 1, "name": "All Categories", "seoName": "all", "children": false, "selected": true, "childrenItems": [ { "id": 2551, "name": "Motors", "seoName": "cars-vans-motorbikes", "children": true, "selected": false, "childrenItems": [], "drilled": false }, { "id": 2526, "name": "Pets", "seoName": "pets", "children": true, "selected": false, "childrenItems": [], "drilled": false }, "… 5 more" ], "drilled": true}Parameters
| Name | Type | Description |
|---|---|---|
category_idquery | string |
Response fields
200 with a GumtreeCategories, in the labels Gumtree’s own listing and ad pages show.
| Field | Type | Description |
|---|---|---|
id | number | |
name | string | |
childrenItems | object[] |
Status codes
| Status | Meaning |
|---|---|
200 | The category and its children. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | The ad, category or location does not exist. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Gumtree is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Gumtree is a trademark of Gumtree.com Limited. We are not affiliated with or endorsed by Gumtree.