API to convert arbitrary, multi-lingual text into a human and seo-friendly-url

Try me

API details

The hostname to use is speakingurl.com and all data is sent and received as JSON.

GET /slug/:text

Converts text into a SEO-friendly slug.

Optional parameter lower can be set to true (default) or false to convert slug to lower case.


Text Slug JSON
Bonne soirée bonne-soiree {slug: "bonne-soiree", lang: "fr"}
Grüß Gott gruess-gott {slug: "gruess-gott", lang: "de"}
привет privet {slug: "privet", lang: "ru"}
您好 nin2-hao3 {slug: "nin2-hao3", lang: "zh"}

URLs are strict

API URLs and the slugs they generate conform to the RFC3986 standards.

If you're using JavaScript to encode URLs please remember encodeURIComponent is not strict.

Works in the browser

Supports JSONP (with callback parameter) and CORS.

Authentication and rate limits

None required or enforced during 2013 whilst this service is beta tested.

This service is provided on a best-effort basis; there is no SLA.

Supported languages

The language is used to convert certain symbols into the native word, for example the character & is converted to und in German.

This service supports:

  • English
  • Français (French)
  • Deutsch (German)
  • Español (Spanish)
  • Русский язык (Russian)
  • 中国的 (Chinese) Converts to Latin script using tone number Pinyin
  • ひらがな (Hiragana) カタカナ (Katakana) Converts Japanese Kana to Romaji using Hepburn

The most relevant language is determined as follows:

  1. Attempt to determine language using the same logic as the Chrome web browser (but on the server).
  2. Inspect languages and locales contained in the optional Accept-Language HTTP header.
  3. Otherwise default to English.

About this service

What does "Speaking URL" mean?

Clean URLs, URL slugs, user-friendly URLs and SEO-friendly URLs all pretty much refer to the same thing.

The term "Speaking URL" originates from the Typo3 CMS system around 2004, although the idea of URLs being as human readable as possible stems from 1998 and 1999.

Who wrote this?

Built and hosted by @lovell using free, open source software including Node.js MIT, Restify MIT, Compact Language Detector BSD, Pinyin2 BSD, speakingurl BSD, jQuery MIT, Bootstrap Apache v2.0 and nginx Simplified BSD.