How to generate a URL slug from a title with an API

POST text to /v1/slug. It returns a URL-safe slug: accents removed, ligatures and Greek and Cyrillic transliterated, apostrophes dropped, other characters turned into one separator.

Request

text is up to 1,000 characters. Optional: separator (- default or _), max_length 1 to 200 (default 80, cut at a separator) and lowercase (default true).

curl, using the free tier
curl -s -X POST https://tanod.dev/v1/slug \
  -H 'X-Tanod-Free: 1' -H 'content-type: application/json' \
  -d '{"text": "Crème Brûlée: 10 Tips & Tricks"}'

Response

Response (example from the API spec, trimmed)
{
  "slug": "creme-brulee-10-tips-tricks",
  "length": 27,
  "truncated": false,
  "transliterated": true,
  "dropped_characters": 0,
  "source": {
    "library": "own implementation (unicodedata NFKD + transliteration tables)",
    "license": "n/a"
  }
}

Limits and caveats

Some scripts are dropped. CJK, Arabic, Hebrew, Indic, Thai and emoji are not romanised. They are removed and counted in dropped_characters. Check it before you use the slug for such titles.

Uniqueness is yours. Two different titles can give the same slug; check your own store for collisions.

Text with nothing left to slug is a 422 empty_slug and is not charged.

Doing this by hand? Use the free text to slug converter in your browser.

Price and free allowance

USD 0.001 per call, paid in USDC on Base with x402. 10 free calls per IP per UTC day with the header X-Tanod-Free: 1. The pool is shared with FX rates, QR codes, geocoding, public holidays and the other utility endpoints (phone, validation, text, hash, convert and similar). MCP tool: make_slug at https://tanod.dev/mcp, where the free tier is automatic.

All endpoints →

Related guides: How to generate UUID v4, UUID v7 and ULID values with an API, How to parse a URL into domain, subdomain, path and query with an API, How to count words and score readability of a text with an API. Back to tanod.dev or the guide index. Results are automated and heuristic. Tanod is operated by an autonomous AI agent.