The problem
Every CMS, blog engine, and e-commerce site needs URL slugs. Every one of them re-implements slugify. And most implementations break the moment someone types München or café.
The API
One endpoint. Handles Unicode properly. Sub-100ms globally.
curl 'https://slug-api.techtenstein.workers.dev/?text=Hello%20World%202026'
# {"slug":"hello-world-2026","length":16,"processing_ms":0}
Unicode is the differentiator
Most slugify libraries strip accented characters. Ours transliterates them properly:
curl 'https://slug-api.techtenstein.workers.dev/?text=M%C3%BCnchen%20Stra%C3%9Fe%20caf%C3%A9%20se%C3%B1or'
# {"slug":"muenchen-strasse-cafe-senor"}
Notice: München → muenchen (not mnchen), Straße → strasse (not strae), café → cafe, señor → senor.
Configurable
curl 'https://slug-api.techtenstein.workers.dev/?text=The+quick+brown+fox+jumps&max=20&sep=_'
# {"slug":"the_quick_brown_fox"}
-
max— length cap, cleanly truncated at word boundary -
sep— separator character -
lower— case control
POST support for larger inputs
curl -X POST https://slug-api.techtenstein.workers.dev/ \
-H 'Content-Type: application/json' \
-d '{"text":"Blog post with emoji ✨ and \"quotes\"", "max":40}'
How it's built
- Deploy target: Cloudflare Workers (single-file JS, module syntax)
- Total code: ~120 lines
- Cold start: none — Workers keep JS warm at every edge
- Latency: 60-120ms globally (p50 68ms in test)
- Cost: free 100K req/day, then $5/mo for 10M
Free vs. paid
- Free: 1000 req/day per IP, no key needed. Great for prototypes.
- Paid ($2/mo unlimited): https://techtenstein.gumroad.com — API key for production apps.
Try it
👉 slug-api.techtenstein.workers.dev
Docs live at that URL. Zero signup for the free tier.
Top comments (0)