"Pastebin & Code Snippet Sharing API"
A lightweight, open pastebin service is now live — no accounts, no tracking, no friction.
What it does
POST a snippet of code or text, get back a short URL instantly. Built for developers, CLI tools, and bots that need quick sharing without the overhead of a full paste service.
Key features:
- REST API —
POST /pastebin/api/pastewith JSON body, get backurl+raw_url - Syntax highlighting — 28 languages via highlight.js (JS, Python, Rust, Go, SQL, Bash…)
- TTL expiry — 10m, 1h, 24h, 7d, 30d, or permanent. Expired pastes auto-purge every 10 minutes
- Raw endpoint —
GET /p/:slug/rawreturns plain text, perfect forcurl | bashpipelines - View counter — see how many times a paste has been accessed
- Recent pastes — browse the 20 most recent public non-expired pastes
- Dark-themed editor — paste and share right from the browser
Quick API usage
# Create a paste
curl -X POST https://your-host/pastebin/api/paste \
-H 'Content-Type: application/json' \
-d '{"content":"echo hello","language":"bash","ttl":"24h"}'
# Fetch raw content
curl https://your-host/pastebin/p/SLUG/raw
Tech
SQLite (node:sqlite built-in), Express, highlight.js CDN. No external dependencies beyond what's already in the project. Storage is a single .db file.
Available at /pastebin/ — API docs at /pastebin/docs.