> **For coding agents and LLMs:** This is one Social Fetch marketing page (markdown export). For API orientation start with [`/llms.txt`](https://www.socialfetch.dev/llms.txt); for auth and crawl rules use [`/agents.txt`](https://www.socialfetch.dev/agents.txt); for every operation use [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt).

## This page

- **On-site (HTML):** <https://www.socialfetch.dev/platforms/gumtree/categories>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/gumtree/categories.mdx>

---

# Gumtree Categories API

Walk the category tree from the top level to the leaves.

`GET /v1/gumtree/categories` returns `data.category` and its `children`, each with `id`, `name`, `slug` and `hasChildren`. Start with no `categoryId` for the top level (Motors, For Sale, Property, Jobs, Services, Pets, Community), then pass a child's id to go a level down. `hasChildren` is true when the site marks a category as a parent and null when it doesn't: some parents, such as Cars and its makes, go unmarked, so request a null one to find out. A leaf answers with no children.

The `slug` is what `GET /v1/gumtree/search` and `GET /v1/gumtree/filters` take as `category`. An unknown id answers `lookupStatus: not_found`.

## Request

- **Endpoint:** `GET /v1/gumtree/categories`
- **Credits:** 1 credit
Failed requests are free
Found, empty and not-found answers are all charged
- **Input:** by parent category id
- **Full reference:** [docs](https://www.socialfetch.dev/docs/api/v1/gumtree/categories/get)
- **Platform page:** [/platforms/gumtree](https://www.socialfetch.dev/platforms/gumtree)

## FAQ

### How do I get every category?

Start at the top level and request every child whose hasChildren is true or null, until the answers have no children.

### Which value goes into search?

The slug, for example cars or bicycles, goes into the category parameter of search and filters.

### Do categories change?

Rarely; responses are cached for a day.

### How many credits does a request cost?

Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth.
