API Documentation
Use TextShifter tools programmatically. Free tier: 100 calls/day. Upgrade to Pro for 10,000/day.
Endpoint
POST https://textshifter.com/api/v1/transform
Request Body
| Field | Type | Required | Description |
|---|
| tool | string | Yes | Tool name (see list below) |
| text | string | Yes | Text to transform |
Response
{
"result": "HELLO WORLD",
"tool": "uppercase",
"chars": 11
}Rate Limits
| Plan | Daily Limit | Price |
|---|
| Free | 100 calls/day | $0 |
| Pro | 10,000 calls/day | $12/mo |
Remaining calls returned in the X-RateLimit-Remaining header.
Code Examples
cURL
curl -X POST https://textshifter.com/api/v1/transform \
-H "Content-Type: application/json" \
-d '{"tool": "uppercase", "text": "hello world"}'JavaScript
const res = await fetch("https://textshifter.com/api/v1/transform", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ tool: "uppercase", text: "hello world" }),
});
const data = await res.json();
console.log(data.result); // "HELLO WORLD"Python
import requests
res = requests.post("https://textshifter.com/api/v1/transform", json={
"tool": "uppercase",
"text": "hello world"
})
print(res.json()["result"]) # "HELLO WORLD"Available Tools
| Tool Name | Description |
|---|
| uppercase | Convert text to UPPERCASE |
| lowercase | Convert text to lowercase |
| title-case | Convert to Title Case |
| sentence-case | Convert to Sentence case |
| camel-case | Convert to camelCase |
| pascal-case | Convert to PascalCase |
| snake-case | Convert to snake_case |
| kebab-case | Convert to kebab-case |
| constant-case | Convert to CONSTANT_CASE |
| dot-case | Convert to dot.case |
| alternating-case | Convert to aLtErNaTiNg |
| inverse-case | Swap case of each character |
| reverse-text | Reverse text characters |
| remove-line-breaks | Remove line breaks |
| remove-extra-spaces | Remove extra whitespace |
| remove-duplicate-lines | Remove duplicate lines |
| sort-lines | Sort lines alphabetically |
| add-line-numbers | Add line numbers |
| base64-encode | Encode to Base64 |
| base64-decode | Decode from Base64 |
| url-encode | URL encode text |
| url-decode | URL decode text |
| html-encode | HTML entity encode |
| html-decode | HTML entity decode |
| json-formatter | Format/pretty-print JSON |
| json-minify | Minify JSON |
| slug-generator | Generate URL slug |
| extract-emails | Extract email addresses |
| extract-urls | Extract URLs from text |
| markdown-to-html | Convert Markdown to HTML |
Error Handling
// 400 Bad Request
{ "error": "Missing 'tool' field.", "available": [...] }
// 429 Rate Limited
{ "error": "Rate limit exceeded...", "limit": 100, "remaining": 0 }
// CORS: All origins allowed