---
title: "Category"
method: GET
path: "/api/category/{category_path}"
tags: ["Misc"]
---

# Category

`GET /api/category/{category_path}`

GET requests take a full category path in the request, e.g. `/api/category/Tanakh/Torah/Genesis`, and return the full category object found. 

If the category is not found, the returned object will have an error attribute. If any element of the path is found, the API will return the closest parent in an attribute called `closest_parent`. This is useful for proactively looking up a category before posting an `Index` to it.

## Response `200`

GET requests take a full category path in the request, e.g. `/api/category/Tanakh/Torah/Genesis`, and return the full category object found. 

If the category is not found, the returned object will have an error attribute. If any element of the path is found, the API will return the closest parent in an attribute called `closest_parent`. This is useful for proactively looking up a category before posting an `Index` to it.

- CatJSON — JSON response for a Category GET request
  - `path` string[] — The full path of the category
  - `titles` TitlesJSON[] — The titles for the category, in Hebrew and English.
    - `text` string — The text of the title
    - `lang` string — The language of the title, either `en` or `he`.
    - `Primary` boolean — A field depicting whether or not the title is the primary title. Note: For any given topics, one should expect two titles with this field present and set to `true`, an English and a Hebrew primary title. The English value with `primary` set to `true` will match the string value of the `primaryTitle` field on topic.
  - `lastPath` string — The immediate parent of the current category. So for example, with the category `Tanakh/Torah/Genesis`, the `lastPath` is `Torah`.

---

[API](https://skmtc.dev/sefaria/apis/sefaria-api.md) · [All operations](https://skmtc.dev/sefaria/apis/sefaria-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sefaria/sefaria-api/revisions/d29296717011/schema)
