API Routes

For your convenience, this site provides a simple JSON API that lets you fetch blog posts and project data programmatically. You'll find endpoints under /api/blog and /api/projects, with optional {slug} variants for retrieving individual items.

If you'd prefer to subscribe to blog posts rather than query the API directly, you can also use the RSS feed available at /rss.xml, which delivers the latest blog posts in a standard feed format.

Blog

/api/blog

Returns a list of blog posts

Response shape:

[
  {
    "id": "string",
    "data": {
      "title": "string",
      "description": "string",
      "pubDate": "string (ISO date-time)",
      "image": {
        "src": "string",
        "width": "number",
        "height": "number",
        "format": "string"
      },
      "author": [
        "string"
      ],
      "tags": [
        "string"
      ],
      "revDate": "string (ISO date-time)"
    },
    "body": "string"
  }
]

/api/blog/{slug}

Returns a single blog post by slug

Response shape:

{
  "id": "string",
  "data": {
    "title": "string",
    "description": "string",
    "pubDate": "string (ISO date-time)",
    "image": {
      "src": "string",
      "width": "number",
      "height": "number",
      "format": "string"
    },
    "author": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "revDate": "string (ISO date-time)"
  },
  "body": "string"
}

Projects

/api/projects

Returns a list of projects

Response shape:

[
  {
    "id": "string",
    "data": {
      "title": "string",
      "description": "string",
      "url": "string",
      "liveDemo": "string",
      "pinned": "boolean",
      "pubDate": "string (ISO date-time)",
      "image": {
        "src": "string",
        "width": "number",
        "height": "number",
        "format": "string"
      },
      "badge": "string",
      "tags": [
        "string"
      ]
    },
    "body": "string"
  }
]

/api/projects/{slug}

Returns a single project by slug

Response shape:

{
  "id": "string",
  "data": {
    "title": "string",
    "description": "string",
    "url": "string",
    "liveDemo": "string",
    "pinned": "boolean",
    "pubDate": "string (ISO date-time)",
    "image": {
      "src": "string",
      "width": "number",
      "height": "number",
      "format": "string"
    },
    "badge": "string",
    "tags": [
      "string"
    ]
  },
  "body": "string"
}

Copyright © 2025 Sam Packer.