apyhub
DEVELOPER TOOLS · SEO

Convert Case & Slug from Text API

What it does

String Case Converter turns one input string into a set of common text cases and a URL slug. Send the text field in the request body, and get back the converted forms plus the original input and word_count.

Use it when you need to normalise user-entered text for URLs, code identifiers, headings, or labels. The response includes slug, dot.case, camelCase, PascalCase, Title Case, kebab-case, snake_case, CONSTANT_CASE, and Sentence case, so you can pick the format that fits your system without reimplementing string transforms in your app.

This is useful in content pipelines, admin tools, CMS workflows, and developer utilities where the same text needs to be reused across multiple naming conventions. If you are generating slugs from titles or converting strings for frontend and backend conventions, this keeps the conversion logic in one place.

String Case Converter is a small, focused developer tool: one text input, multiple case outputs, and a predictable response shape.

POST
Convert a string into every common case + a URL slug.
https://api.eu.apyhub.com/creightonnick0/convert-case-and-slug

QUICKSTART

GUIDE

Quickstart

Convert a single piece of text into slug, case variants, and word count.

curl -X POST "https://api.eu.apyhub.com/creightonnick0/convert-case-and-slug" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"text":"Hello World Example"}'

What you'll get back

Returns a JSON object with fields like slug, input, dot.case, camelCase, PascalCase, Title Case, kebab-case, snake_case, word_count, CONSTANT_CASE, and Sentence case. Each field is a converted string version of the input, except word_count, which is an integer.

{
  "slug": "hello-world-example",
  "input": "Hello World Example",
  "dot.case": "hello.world.example",
  "camelCase": "helloWorldExample",
  "PascalCase": "HelloWorldExample",
  "Title Case": "Hello World Example",
  "kebab-case": "hello-world-example",
  "snake_case": "hello_world_example",
  "word_count": 3,
  "CONSTANT_CASE": "HELLO_WORLD_EXAMPLE",
  "Sentence case": "Hello world example"
}
TRY ITLIVE · 10 ATOMS
Loading playground…

About this endpoint

What it does

Converts the provided text into multiple common casing formats and a URL slug. The response returns the original input string plus the converted variants in a single JSON object.

Request Body

ParameterTypeMandatoryDescription
textStringYesThe string to convert.

Response

Returns a JSON object with string fields for the original input, slug, dot.case, camelCase, PascalCase, Title Case, kebab-case, snake_case, CONSTANT_CASE, and Sentence case, plus a numeric word_count field.

ParameterTypeMandatoryDescription
slugStringNoThe URL slug version of the input text.
inputStringNoThe original input text.
dot.caseStringNoThe text converted to dot.case.
camelCaseStringNoThe text converted to camelCase.
PascalCaseStringNoThe text converted to PascalCase.
Title CaseStringNoThe text converted to Title Case.
kebab-caseStringNoThe text converted to kebab-case.
snake_caseStringNoThe text converted to snake_case.
word_countIntegerNoThe number of words in the input text.
CONSTANT_CASEStringNoThe text converted to CONSTANT_CASE.
Sentence caseStringNoThe text converted to Sentence case.

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.