GET

Fetch one or more Encyclopedia Categories.

Categories are in a tree structure and so each one has zero or more parents and children.

Each Category contains zero or more Topics.

Add the page to get further pages of results, e.g.:

  • categories?page=2

Fetch more data about a single Category using its slug, e.g.:

  • categories/london
GET /api/v1/categories/fooddrink
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Cookie, Accept

{
  "slug": "fooddrink",
  "title": "Food and drink",
  "topicCount": 0,
  "depth": 1,
  "parents": [],
  "children": [
    "https://www.pepysdiary.com/api/v1/categories/drink",
    "https://www.pepysdiary.com/api/v1/categories/food"
  ],
  "topics": [],
  "apiURL": "https://www.pepysdiary.com/api/v1/categories/fooddrink",
  "webURL": "https://www.pepysdiary.com/encyclopedia/fooddrink/"
}