Running your own instance of the Blog API gives you full control over the server, its rate limits, and the data it serves. The setup is straightforward: you need Python 3.12 or later and theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Project516/BlogAPI/llms.txt
Use this file to discover all available pages before exploring further.
uv package manager. The server starts in under a minute and listens on port 8000 by default.
Prerequisites
Before you start, make sure you have the following installed:- Python 3.12 or later — required by
pyproject.toml - uv — used to install dependencies and run the server. Install it from docs.astral.sh/uv
Steps
Install dependencies
Use The project depends on
uv sync to install all required packages defined in pyproject.toml:fastapi, uvicorn, slowapi, beautifulsoup4, and requests. If you prefer not to use uv, you can install directly with pip:Start the server
You have two options for starting the server.Option 1 — run directly with uv:Option 2 — use the provided shell script:The
run.sh script does three things before launching the server:run.sh
uv format— formats all Python source filesuv audit— checks dependencies for known security vulnerabilitiesuv run main.py --reload— starts the server with hot-reload enabled, so code changes are picked up automatically
0.0.0.0:8000 once it is running.Populate the cache
The in-memory cache starts empty unless A successful response looks like:
/tmp/cache.json already exists from a previous run. Call POST /blogs/cache to scrape the upstream blog index and fill the cache:Notes about the cache
The cache is written to
/tmp/cache.json after each successful POST /blogs/cache call. On most Linux systems, /tmp is cleared on reboot. After restarting the server following a reboot, call POST /blogs/cache again to repopulate the cache before serving requests.The server binds to
0.0.0.0:8000 by default, making it reachable on all network interfaces. If you are exposing the API publicly, consider placing it behind a reverse proxy such as nginx or Caddy to handle TLS and restrict access as needed.