# Get category by slug

GET /api/v1/markets/categories/{slug}

## Get category by slug

> Returns a single category by its URL slug, including all nested subcategories and the topics within each subcategory.

```json
{"openapi":"3.1.1","info":{"title":"FortyTwo Read API","version":"1.0"},"tags":[{"description":"GET /api/v1/markets/categories/{slug}","name":"get-category-by-slug"}],"servers":[{"url":"https://rest.ft.42.space/"}],"paths":{"/api/v1/markets/categories/{slug}":{"get":{"description":"Returns a single category by its URL slug, including all nested subcategories and the topics within each subcategory.","tags":["get-category-by-slug"],"summary":"Get category by slug","parameters":[{"schema":{"type":"string"},"description":"Category slug","name":"slug","in":"path","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/handler.CategoryDetailResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api.ErrorResponse"}}}}}}}},"components":{"schemas":{"handler.CategoryDetailResponse":{"type":"object","properties":{"id":{"type":"integer"},"image":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"subcategories":{"type":"array","items":{"$ref":"#/components/schemas/handler.SubcategoryNested"}}}},"handler.SubcategoryNested":{"type":"object","properties":{"image":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"topics":{"type":"array","items":{"$ref":"#/components/schemas/handler.TopicNested"}}}},"handler.TopicNested":{"type":"object","properties":{"image":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}}},"api.ErrorResponse":{"type":"object","properties":{"code":{"type":"integer"},"error":{"type":"string"},"message":{"type":"string"}}}}}}
```
