Slugify
Try it interactively →POST /api/slugifyGenerate URL slugs from arbitrary strings. Lowercases, transliterates accented characters, strips punctuation, and replaces whitespace with hyphens.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| input* | string | — | Text to slugify. |
| separator | string | "-" | Joiner between words (typically `-` or `_`). |
| lowercase | boolean | true | Lowercase the output. |
| decamelize | boolean | true | Split `camelCase`/`PascalCase` into separate words first. |
| preserveCharacters | string | — | Characters from this string are preserved literally instead of replaced (e.g. `_/` to keep underscores and slashes). |
Response
Modes: json, text. Cache: yes (24h TTL).
Code samples
Built from the title example.
curl -X POST https://api.xtract.bot/api/slugify \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-Account-Id: $XTRACT_ACCOUNT_ID" \
-H "X-Api-Key: $XTRACT_API_KEY" \
-d '{
"input": "10 Things You Should Know About Rust!",
"separator": "-"
}'