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.siteAuthentication
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/commentsFetch comments for a post
Parameters
| Name | Type | In | Description |
|---|---|---|---|
slug* | string | query | Post 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
200Success400Missing required parameter500Server errorGET
/api/viewsFetch view count for a post
Parameters
| Name | Type | In | Description |
|---|---|---|---|
slug* | string | query | Post 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
200Success400Missing required parameter500Server errorGET
/api/og-metadataFetch Open Graph metadata for a URL
Parameters
| Name | Type | In | Description |
|---|---|---|---|
url* | string | query | URL 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
200Success400Invalid URL500Server errorHTTP Status Codes
2xx Success
200OK201Created4xx Client Errors
400Bad Request401Unauthorized404Not Found5xx Server Errors
500Internal Server Error503Service UnavailableVersion History
v1.0.02025-10-20- Initial API release
← Back to the blogLast updated: October 2025