Public REST API · v1.0

API Documentation

Read blog posts, projects, and GitHub repos as JSON — for free, no auth required.

Base URL

All endpoints are served from a single file using the action query parameter. Responses are UTF-8 JSON with CORS enabled, so you can call them from browsers too.

https://webzuweb.pro/api.php?action=posts

Every response wraps data in a status + data envelope:

{ "status": "ok", "data": { ... } }

GET List posts

Returns a paginated list of published blog posts.

ParamTypeDefaultDescription
actionstringposts
pageint1Page number
per_pageint10Items per page (max 50)
GET /api.php?action=posts&page=1&per_page=5

GET Get a single post

Returns one published post (including full HTML content) by its slug.

ParamTypeDefaultDescription
actionstringpost
slugstringPost slug, e.g. my-article
GET /api.php?action=post&slug=my-article

Returns 404 if the post does not exist or is unpublished.

GET Projects

Returns all projects listed on the site.

GET /api.php?action=projects

GET GitHub repositories

Returns the live public repositories from the GitHub profile (cached for 1 hour). Each item includes name, description, language, stars, forks, html_url, and updated_at.

GET /api.php?action=github

GET Site info

Returns basic site metadata: name, contact email, location, social links, and API version.

GET /api.php?action=site

Errors

Failed requests return an HTTP status code and a message:

{ "status": "error", "message": "Post not found." }
StatusMeaning
400Bad request — missing/invalid parameter
404Resource not found
405Only GET is supported
500Server / database error

Examples

curl

curl "https://webzuweb.pro/api.php?action=posts"

Python

import requests

r = requests.get("https://webzuweb.pro/api.php", params={"action": "posts", "per_page": 5})
for post in r.json()["data"]["items"]:
    print(post["title"], "—", post["url"])

JavaScript / Node

const res = await fetch("https://webzuweb.pro/api.php?action=posts");
const { data } = await res.json();
data.items.forEach(p => console.log(p.title));

Browser fetch (CORS enabled)

fetch("https://webzuweb.pro/api.php?action=github")
  .then(r => r.json())
  .then(({ data }) => console.log(data));