# Case Detect API
> Detect which case convention a string uses, and split identifiers into their constituent words. The detect endpoint classifies any value as camelCase, PascalCase, snake_case, CONSTANT_CASE, kebab-case, COBOL-CASE, Train-Case, dot.case, Title Case, Sentence case, lowercase or UPPERCASE — or mixed when it does not fit — and reports the separator it found and the words it is built from. The split endpoint tokenizes any identifier into words: it breaks camelCase humps, handles acronym boundaries correctly (HTTPServer → HTTP, Server; XMLHttpRequest → XML, Http, Request), and splits on digits and on underscores, dashes, dots and spaces, returning both the original-case tokens and lower-cased words ready to feed into a converter. Ideal for linters and code-mod tools, refactoring, API and schema validators, autocomplete and search, and any pipeline that needs to understand identifier naming. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This DETECTS and tokenizes a case convention; to CONVERT a string between case styles use a text-case API.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/casedetect-api/..."
```

## Pricing
- **Free** (Free) — 1,535 calls/Mo, 2 req/s
- **Starter** ($3/Mo) — 11,050 calls/Mo, 8 req/s
- **Pro** ($23/Mo) — 161,500 calls/Mo, 20 req/s
- **Mega** ($61/Mo) — 850,000 calls/Mo, 50 req/s

## Endpoints

### Case

#### `GET /v1/detect` — Detect case convention

**Parameters:**
- `value` (query, required, string) — The string/identifier Example: `getHTTPResponse`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/casedetect-api/v1/detect?value=getHTTPResponse"
```

**Response:**
```json
{
    "data": {
        "case": "camel",
        "label": "camelCase",
        "value": "getHTTPResponse",
        "words": [
            "get",
            "http",
            "response"
        ],
        "separator": "none",
        "word_count": 3,
        "has_lowercase": true,
        "has_uppercase": true
    },
    "meta": {
        "timestamp": "2026-06-03T09:25:06.925Z",
        "request_id": "f11c9084-2071-437f-9c55-e3428c776779"
    },
    "status": "ok",
    "message": "Detect case convention",
    "success": true
}
```

#### `GET /v1/split` — Split into words

**Parameters:**
- `value` (query, required, string) — The string/identifier Example: `XMLHttpRequest`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/casedetect-api/v1/split?value=XMLHttpRequest"
```

**Response:**
```json
{
    "data": {
        "value": "XMLHttpRequest",
        "words": [
            "xml",
            "http",
            "request"
        ],
        "tokens": [
            "XML",
            "Http",
            "Request"
        ],
        "word_count": 3
    },
    "meta": {
        "timestamp": "2026-06-03T09:25:07.028Z",
        "request_id": "279711a9-3cf7-47e1-a3bf-0284a215e09f"
    },
    "status": "ok",
    "message": "Split into words",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/casedetect-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "name": "Case Detect API",
        "notes": "This DETECTS and tokenizes a case convention — to CONVERT a string between case styles use a text-case API. Letter/digit boundaries are treated as word breaks (base64 → base, 64). Nothing is stored.",
        "version": "v1",
        "endpoints": [
            {
                "path": "/v1/detect",
                "params": {
                    "value": "the string/identifier (required)"
                },
                "returns": "the detected case, label, separator and constituent words"
            },
            {
                "path": "/v1/split",
                "params": {
                    "value": "the string/identifier (required)"
                },
                "returns": "the constituent words (original-case tokens and lower-cased words)"
            },
            {
                "path": "/v1/meta",
                "params": [],
                "returns": "this document"
            }
        ],
        "description": "Detect which case convention a string uses, and split identifiers into their constituent words. The detect endpoint classifies a value as camelCase, PascalCase, snake_case, CONSTANT_CASE, kebab-case, COBOL-CASE, Train-Case, dot.case, Title Case, Sentence case, lowercase or UPPERCASE (or mixed), and reports the separator used and the words it is made of. The split endpoint tokenizes any identifier into words — splitting camelCase humps, acronym boundaries (HTTPSe
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/casedetect-api
OpenAPI spec: https://www.oanor.com/api/casedetect-api/openapi.json
