Documentation

Everything you need to get started with Maru APIs

Get Your API Key →

Getting Started

Welcome to Maru APIs! Get started in 3 simple steps:

  1. Get your free API key
  2. Make your first request
  3. Start building!
# Quick test
curl https://textutils.maru-api.workers.dev/api/case-convert \
  -X POST \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{"text": "hello world", "to": "camelCase"}'

# Response
{"original": "hello world", "converted": "helloWorld", "type": "camelCase"}

Authentication

All API requests require authentication using your API key. Include it in the X-API-Key header:

X-API-Key: maru_your_api_key_here

⚠️ Keep your API key secure! Don't commit it to version control or expose it in client-side code.

Rate Limits

All plans include rate limiting to ensure fair usage:

Plan Requests/Month Reset Period
Free 100,000 Monthly (1st of month)

When you exceed your limit, you'll receive a 429 Too Many Requests error. Check your dashboard to monitor usage.

API Endpoints

Base URL

https://textutils.maru-api.workers.dev
POST /api/case-convert

Convert text between different naming conventions.

Request Body

{
  "text": "hello world",
  "to": "camelCase"
}
Parameter Type Description
text string Text to convert (required)
to string Target case: camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE

Response

{
  "original": "hello world",
  "converted": "helloWorld",
  "type": "camelCase"
}
POST /api/slugify

Generate URL-friendly slugs with Korean language support.

Request Body

{
  "text": "안녕하세요 세계",
  "separator": "-"
}
Parameter Type Description
text string Text to slugify (required)
separator string Separator character (optional, default: "-")

Response

{
  "original": "안녕하세요 세계",
  "slug": "annyeonghaseyo-segye",
  "separator": "-"
}
POST /api/chosung

Extract Korean initial consonants (초성) for search functionality.

Request Body

{
  "text": "대한민국"
}
Parameter Type Description
text string Korean text (required)

Response

{
  "original": "대한민국",
  "chosung": "ㄷㅎㅁㄱ"
}

Error Codes

Status Code Description
400 Bad Request - Invalid parameters
401 Unauthorized - Missing or invalid API key
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error - Something went wrong

Code Examples

JavaScript

const response = await fetch('https://textutils.maru-api.workers.dev/api/case-convert', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-API-Key': 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    text: 'hello world',
    to: 'camelCase'
  })
});

const data = await response.json();
console.log(data.converted); // "helloWorld"

Python

import requests

response = requests.post(
    'https://textutils.maru-api.workers.dev/api/case-convert',
    headers={'X-API-Key': 'YOUR_API_KEY'},
    json={'text': 'hello world', 'to': 'camelCase'}
)

data = response.json()
print(data['converted'])  # "helloWorld"

cURL

curl -X POST https://textutils.maru-api.workers.dev/api/case-convert \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{"text": "hello world", "to": "camelCase"}'

Need Help?

Have questions or need support? Reach out to us at contact@maruapis.com