# Codewars API
> Live profile, ranking and challenge data from Codewars, the competitive-programming community where developers level up by solving "kata". Get a member's whole standing — honor points, overall rank as a Codewars kyu/dan grade with its score, the per-language ranks they hold, their clan, their global leaderboard position and how many kata they have completed and authored. Pull the paginated list of kata a member has solved with the languages they used, the kata a member has created with rank and popularity, or any code challenge in full — its category, difficulty, tags, available languages and community stats (total completed, attempts, stars and vote score). Live, no key, nothing stored. Distinct from Codeforces, GitHub and Stack Exchange APIs — this is the Codewars honor, kyu-rank, clan, leaderboard and kata-challenge graph. Perfect for developer leaderboards, coding-community, gamification, portfolio and recruiting apps.

## 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/codewars-api/..."
```

## Pricing
- **Free** (Free) — 9,000 calls/Mo, 2 req/s
- **Starter** ($5/Mo) — 170,000 calls/Mo, 6 req/s
- **Pro** ($17/Mo) — 1,100,000 calls/Mo, 15 req/s
- **Business** ($41/Mo) — 5,600,000 calls/Mo, 35 req/s

## Endpoints

### Members

#### `GET /v1/authored` — Kata a member has created

**Parameters:**
- `username` (query, required, string) — Codewars username Example: `g964`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/codewars-api/v1/authored?username=g964"
```

**Response:**
```json
{
    "data": {
        "count": 142,
        "source": "Codewars",
        "authored": [
            {
                "id": "5e4bb05b698ef0001e3344bc",
                "name": "Operations on sequences",
                "rank": -5,
                "tags": [
                    "Algorithms",
                    "Mathematics"
                ],
                "languages": [
                    "prolog",
                    "python",
                    "java",
                    "fortran",
                    "rust",
                    "clojure",
                    "javascript",
                    "csharp",
                    "pascal",
                    "lua",
                    "perl",
                    "raku",
                    "elm",
                    "cobol",
                    "d",
                    "erlang",
                    "go"
                ],
                "rank_name": "5 kyu",
                "description": "Let an array or a list \n\n`arr = [x(1), x(2), x(3), x(4), ..., x(i), x(i+1), ..., x(m), x(m+1)]`\n\nwhere all `x(i)` are positive integers. \nThe length `lg` of this array will be a positive multiple of 4.\n\nLet \n\n`P = (x(1) ** 2 + x(2) ** 2) * (x(3) ** 2 + x(4) ** 2) * ... * (x(m) **",
                "total_stars": null,
                "total_attempts": null,
                "total_completed": null
            },
            {
                "id": "5e1f2234c5772a000fe7f7ce",
                "name": "Transform",
                "r
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/completed` — Kata a member has solved

**Parameters:**
- `username` (query, required, string) — Codewars username Example: `g964`
- `page` (query, optional, string) — Page (0-based) Example: `0`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/codewars-api/v1/completed?username=g964&page=0"
```

**Response:**
```json
{
    "data": {
        "page": 0,
        "count": 200,
        "source": "Codewars",
        "username": "g964",
        "completed": [
            {
                "id": "56948e24b510d4e1d3000022",
                "name": "AOP - Before",
                "slug": "aop-before",
                "completed_at": "2022-12-27T09:13:54.388Z",
                "completed_languages": [
                    "javascript"
                ]
            },
            {
                "id": "56bac4c34537cf1e270005a1",
                "name": "Sorting Arrays ... wait, what?!",
                "slug": "sorting-arrays-dot-dot-dot-wait-what",
                "completed_at": "2022-12-13T13:42:01.222Z",
                "completed_languages": [
                    "javascript"
                ]
            },
            {
                "id": "56ba8a9b022c16017d0001f3",
                "name": "Sequence generator",
                "slug": "sequence-generator-1",
                "completed_at": "2022-12-13T09:42:44.109Z",
                "completed_languages": [
                    "javascript"
                ]
            },
            {
                "id": "56b84da91d36bbfd7a0006e0",
                "name": "Timmy Time",
                "slug": "timmy-time",
                "completed_at": "2022-12-13T09:35:37.682Z",
                "completed_languages": [
                    "javascript"
                ]
            },
            {
                "id": "56b71b1dbd06e6d88100092a",
   
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/user` — Member reputation profile

**Parameters:**
- `username` (query, required, string) — Codewars username Example: `g964`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/codewars-api/v1/user?username=g964"
```

**Response:**
```json
{
    "data": {
        "clan": "None",
        "name": null,
        "honor": 486971,
        "skills": [],
        "source": "Codewars",
        "username": "g964",
        "overall_rank": {
            "id": -1,
            "name": "1 kyu",
            "color": "purple",
            "score": 30497
        },
        "language_ranks": [
            {
                "id": -1,
                "name": "1 kyu",
                "color": "purple",
                "score": 16799,
                "language": "javascript"
            },
            {
                "id": -1,
                "name": "1 kyu",
                "color": "purple",
                "score": 13552,
                "language": "python"
            },
            {
                "id": -2,
                "name": "2 kyu",
                "color": "purple",
                "score": 8963,
                "language": "ruby"
            },
            {
                "id": -2,
                "name": "2 kyu",
                "color": "purple",
                "score": 6079,
                "language": "java"
            },
            {
                "id": -2,
                "name": "2 kyu",
                "color": "purple",
                "score": 5325,
                "language": "csharp"
            },
            {
                "id": -2,
                "name": "2 kyu",
                "color": "purple",
                "score": 4932,
                "language": "coffeescript"
            },
     
…(truncated, see openapi.json for full schema)
```

### Kata

#### `GET /v1/kata` — Code challenge in full

**Parameters:**
- `id` (query, required, string) — Kata id or slug Example: `valid-braces`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/codewars-api/v1/kata?id=valid-braces"
```

**Response:**
```json
{
    "data": {
        "id": "5277c8a221e209d3f6000b56",
        "url": "https://www.codewars.com/kata/5277c8a221e209d3f6000b56",
        "name": "Valid Braces",
        "slug": "valid-braces",
        "tags": [
            "Algorithms"
        ],
        "source": "Codewars",
        "category": "algorithms",
        "languages": [
            "javascript",
            "coffeescript",
            "haskell",
            "csharp",
            "python",
            "java",
            "ruby",
            "php",
            "typescript",
            "elixir",
            "cpp",
            "dart",
            "rust",
            "swift",
            "go",
            "lua",
            "scala",
            "c",
            "julia",
            "cobol"
        ],
        "created_by": "xDranik",
        "difficulty": {
            "id": -6,
            "name": "6 kyu",
            "color": "yellow",
            "score": null
        },
        "vote_score": 6273,
        "total_stars": 3500,
        "published_at": "2013-11-05T00:07:31.399Z",
        "total_attempts": 490830,
        "total_completed": 83255
    },
    "meta": {
        "timestamp": "2026-06-09T20:24:34.712Z",
        "request_id": "04cf46d5-1daa-4196-811a-e8ca0b09ffe4"
    },
    "status": "ok",
    "message": "Kata retrieved successfully",
    "success": true
}
```


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