
Slug Creator API
Development
Convert titles to SEO-friendly URL slugs instantly. Create clean, readable URLs from human-readable text with smart punctuation handling.
Authentication
All API requests require a valid API key passed in the Authorization header as a Bearer token.
Rate Limit
120 requests per minute
Endpoints
2 endpoints available
Overview
Converts a title into a URL slug, using the same rules as the web tool.
Rules
- Convert to lowercase.
- Replace every character that is not a letter, digit, underscore or whitespace with a space.
- Collapse runs of whitespace into one space and trim the ends.
- Replace the spaces with hyphens.
Things to know
- Only ASCII letters and digits are kept. Accented and non-Latin letters act as separators, so
Café au laitbecomescaf-au-lait. - An apostrophe splits a word:
didn'tbecomesdidn-t. - If nothing is left after cleaning (for example
!!!),slugis an empty string. - Titles up to 10,000 characters.
Examples
- "Hello World" becomes "hello-world"
- "10 Tips & Tricks!" becomes "10-tips-tricks"
- "What happened - And what didn't" becomes "what-happened-and-what-didn-t"
Endpoints
GET
https://opentools.ca/api/v1/tools/slug-creatorConvert a title to a URL slug
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| title | string | Required | The title to convert, 1 to 10,000 characters. URL-encode it in the query string. |
Response Example
{
"success": true,
"title": "10 Tips & Tricks!",
"slug": "10-tips-tricks"
}Error Codes
400
Bad Request - Missing or too long title401
Unauthorized - Invalid or missing API key403
Forbidden - API key is inactive or expired, or the request IP is not allowed for this key429
Too Many Requests - Rate limit exceeded500
Internal Server ErrorPOST
https://opentools.ca/api/v1/tools/slug-creatorConvert a title to a URL slug (JSON body)
Request Body
Content-Type: application/json
| Parameter | Type | Required | Description |
|---|---|---|---|
| title | string | Required | The title to convert, 1 to 10,000 characters. |
Response Example
{
"success": true,
"title": "Hello World",
"slug": "hello-world"
}Error Codes
400
Bad Request - Missing or too long title401
Unauthorized - Invalid or missing API key403
Forbidden - API key is inactive or expired, or the request IP is not allowed for this key429
Too Many Requests - Rate limit exceeded500
Internal Server ErrorCode Examples
curl -X POST https://opentools.ca/api/v1/tools/slug-creator \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title": "10 Tips & Tricks!"}'
curl -G https://opentools.ca/api/v1/tools/slug-creator \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "title=Hello World"Rather use it in your browser? Open the Slug Creator