API Documentation

Complete documentation for all available endpoints

Quick Start

This API provides comment system, page view tracking, and web metadata fetching capabilities. All endpoints use JSON format for data exchange.

Base URL
https://blog.justinl.site

Authentication

Currently, API endpoints do not require authentication. All endpoints are publicly accessible.

Rate Limits

To ensure service quality and fair usage, we implement the following rate limits:

Comment Fetching60 requests/minute
View Count Fetching60 requests/minute
Metadata Fetching30 requests/minute

Code Examples

GET/api/comments

Fetch comments for a post

Parameters

NameTypeInDescription
slug*stringqueryPost slug

Code Example

bash
curl -X GET "https://blog.justinl.site/api/comments?slug=my-post-slug" \
  -H "Content-Type: application/json"

Response Example

json
{
  "comments": [
    {
      "id": 1,
      "post_slug": "my-post-slug",
      "content": "Great article!",
      "author_name": "John Doe",
      "created_at": "2025-10-20T12:00:00Z",
      "replies": []
    }
  ],
  "count": 1
}

Status Codes

200Success
400Missing required parameter
500Server error
GET/api/views

Fetch view count for a post

Parameters

NameTypeInDescription
slug*stringqueryPost slug

Code Example

bash
curl -X GET "https://blog.justinl.site/api/views?slug=my-post-slug" \
  -H "Content-Type: application/json"

Response Example

json
{
  "views": 42
}

Status Codes

200Success
400Missing required parameter
500Server error
GET/api/og-metadata

Fetch Open Graph metadata for a URL

Parameters

NameTypeInDescription
url*stringqueryURL to fetch metadata from

Code Example

bash
curl -X GET "https://blog.justinl.site/api/og-metadata?url=https://example.com" \
  -H "Content-Type: application/json"

Response Example

json
{
  "title": "Example Domain",
  "description": "This domain is for use in illustrative examples",
  "image": "https://example.com/og-image.jpg",
  "siteName": "Example",
  "url": "https://example.com",
  "favicon": "https://example.com/favicon.ico"
}

Status Codes

200Success
400Invalid URL
500Server error

HTTP Status Codes

2xx Success

200OK
201Created

4xx Client Errors

400Bad Request
401Unauthorized
404Not Found

5xx Server Errors

500Internal Server Error
503Service Unavailable

Version History

v1.0.02025-10-20
  • Initial API release
← Back to the blogLast updated: October 2025
API Documentation | Justin's Blog