Slug Creator

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

  1. Convert to lowercase.
  2. Replace every character that is not a letter, digit, underscore or whitespace with a space.
  3. Collapse runs of whitespace into one space and trim the ends.
  4. 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 lait becomes caf-au-lait.
  • An apostrophe splits a word: didn't becomes didn-t.
  • If nothing is left after cleaning (for example !!!), slug is 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-creator
Convert a title to a URL slug

Query Parameters

ParameterTypeRequiredDescription
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 title
401
Unauthorized - Invalid or missing API key
403
Forbidden - API key is inactive or expired, or the request IP is not allowed for this key
429
Too Many Requests - Rate limit exceeded
500
Internal Server Error
POST
https://opentools.ca/api/v1/tools/slug-creator
Convert a title to a URL slug (JSON body)

Request Body

Content-Type: application/json

ParameterTypeRequiredDescription
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 title
401
Unauthorized - Invalid or missing API key
403
Forbidden - API key is inactive or expired, or the request IP is not allowed for this key
429
Too Many Requests - Rate limit exceeded
500
Internal Server Error

Code 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"

Ready to get started?

Create an API key to start using the Slug Creator API.

Rather use it in your browser? Open the Slug Creator