# AtCoder Rating & Contest API
> Live competitive-programming rating data from AtCoder, the largest Japanese competitive-programming platform, over its public rating-history feed — no key, nothing stored. This is the contest-rating social view for a coder: their AtCoder rating, colour tier, contest record and performance over time, distinct from the other competitive-programming and developer platforms in the catalogue — AtCoder runs its own AGC/ABC contests, its own rating system and its own community. The user endpoint returns a profile snapshot: current rating, peak rating, the AtCoder colour tier (gray, brown, green, cyan, blue, yellow, orange, red), the number of rated contests, the best placing, the best performance and the latest contest. The history endpoint returns the full per-contest rating timeline — each contest with its date, old and new rating, the rating delta, placing, performance and whether it counted as rated. The stats endpoint aggregates a coder's record: rated versus unrated contests, average and best performance, contest wins, podium finishes, the rating range and per-year activity. Build coder leaderboards, rating cards, contest-tracking bots and recruiting signals on top of real AtCoder data. Lookup is by handle; the legendary handle "tourist" is always available.

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

## Pricing
- **Free** (Free) — 16,000 calls/Mo, 3 req/s
- **Starter** ($6/Mo) — 240,000 calls/Mo, 10 req/s
- **Pro** ($17/Mo) — 1,150,000 calls/Mo, 25 req/s
- **Scale** ($40/Mo) — 4,100,000 calls/Mo, 55 req/s

## Endpoints

### User

#### `GET /v1/user` — Profile snapshot — rating, tier, best placing

**Parameters:**
- `handle` (query, required, string) — AtCoder username Example: `tourist`

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

**Response:**
```json
{
    "data": {
        "handle": "tourist",
        "source": "AtCoder",
        "platform": "AtCoder",
        "best_place": 1,
        "color_tier": "red (legend)",
        "peak_rating": 4229,
        "last_contest": {
            "date": "2026-03-30T00:00:00+09:00",
            "name": "AtCoder Grand Contest 077",
            "place": 2,
            "new_rating": 3797,
            "performance": 3928
        },
        "first_contest": "2016-09-04T22:50:00+09:00",
        "current_rating": 3797,
        "rated_contests": 71,
        "total_contests": 140,
        "best_performance": 4495
    },
    "meta": {
        "timestamp": "2026-06-12T01:42:37.004Z",
        "request_id": "b17a9140-1322-4fb3-b176-3421c1f8510c"
    },
    "status": "ok",
    "message": "User retrieved successfully",
    "success": true
}
```

### History

#### `GET /v1/history` — Full per-contest rating timeline

**Parameters:**
- `handle` (query, required, string) — AtCoder username Example: `tourist`
- `limit` (query, optional, string) — Max contests (1-500) Example: `100`
- `rated_only` (query, optional, string) — true to keep only rated contests Example: `true`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/atcoder-api/v1/history?handle=tourist&limit=100&rated_only=true"
```

**Response:**
```json
{
    "data": {
        "count": 71,
        "handle": "tourist",
        "source": "AtCoder",
        "history": [
            {
                "date": "2016-09-04T22:50:00+09:00",
                "delta": 2720,
                "place": 2,
                "contest": "AtCoder Grand Contest 004",
                "is_rated": true,
                "new_rating": 2720,
                "old_rating": 0,
                "performance": 3920
            },
            {
                "date": "2016-09-11T22:40:00+09:00",
                "delta": 131,
                "place": 3,
                "contest": "AtCoder Regular Contest 061",
                "is_rated": true,
                "new_rating": 2851,
                "old_rating": 2720,
                "performance": 3200
            },
            {
                "date": "2016-09-24T23:00:00+09:00",
                "delta": 517,
                "place": 1,
                "contest": "CODE FESTIVAL 2016 qual A",
                "is_rated": true,
                "new_rating": 3368,
                "old_rating": 2851,
                "performance": 4310
            },
            {
                "date": "2016-10-01T22:50:00+09:00",
                "delta": 279,
                "place": 1,
                "contest": "AtCoder Grand Contest 005",
                "is_rated": true,
                "new_rating": 3647,
                "old_rating": 3368,
                "performance": 4391
            },
            {
                "d
…(truncated, see openapi.json for full schema)
```

### Stats

#### `GET /v1/stats` — Aggregated record — averages, wins, podiums

**Parameters:**
- `handle` (query, required, string) — AtCoder username Example: `tourist`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/atcoder-api/v1/stats?handle=tourist"
```

**Response:**
```json
{
    "data": {
        "wins": 23,
        "handle": "tourist",
        "source": "AtCoder",
        "podiums": 41,
        "platform": "AtCoder",
        "best_delta": 2720,
        "color_tier": "red (legend)",
        "peak_rating": 4229,
        "worst_delta": -82,
        "lowest_rating": 2720,
        "current_rating": 3797,
        "rated_contests": 71,
        "total_contests": 140,
        "avg_performance": 3945.2,
        "best_performance": 4495,
        "contests_by_year": {
            "2016": 6,
            "2017": 10,
            "2018": 10,
            "2019": 11,
            "2020": 8,
            "2021": 5,
            "2022": 4,
            "2023": 5,
            "2024": 5,
            "2025": 6,
            "2026": 1
        }
    },
    "meta": {
        "timestamp": "2026-06-12T01:42:38.147Z",
        "request_id": "f3b7ab96-e959-4245-8a69-9e6d69571f3b"
    },
    "status": "ok",
    "message": "Stats retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Service metadata

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

**Response:**
```json
{
    "data": {
        "note": "handle is an AtCoder username (try handle=tourist, the legendary top-rated coder). Unknown handles return 404. Colour tiers: gray (<400), brown, green, cyan, blue, yellow, orange (<2800), red (2800+).",
        "source": "AtCoder public rating history (atcoder.jp/users/{handle}/history/json, live)",
        "service": "atcoder-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/user": "Profile snapshot — current/peak rating, tier, best placing (handle=tourist).",
            "GET /v1/stats": "Aggregated record — averages, wins, podiums, per-year activity (handle=tourist).",
            "GET /v1/history": "Full per-contest rating timeline (handle=tourist, limit=100, rated_only=true optional)."
        },
        "description": "Live competitive-programming rating data from AtCoder, the largest Japanese competitive-programming platform. The contest-rating social view for a coder — rating, colour tier, contest record and performance over time. user = profile snapshot (current and peak rating, AtCoder colour tier gray→red, rated-contest count, best placing, best performance, latest contest); history = the full per-contest rating timeline (date, old/new rating, delta, placing, performance, rated flag); stats = aggregated record (rated vs unrated contests, average and best performance, wins, podiums, rating range, per-year activity). Live, no key, nothing stored. Lookup is by handle.",
        "ups
…(truncated, see openapi.json for full schema)
```

### Problems

#### `GET /v1/solved` — Problem-solving record — problems accepted and difficulty cleared

**Parameters:**
- `handle` (query, required, string) — AtCoder username Example: `tourist`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/atcoder-api/v1/solved?handle=tourist"
```

**Response:**
```json
{
    "data": {
        "note": "A coder's AtCoder problem-solving record (from the AtCoder Problems dataset): solved_count is how many distinct problems they have accepted, with solved_rank their global rank by that; rated_point_sum is the total point value of the rated problems they have solved (difficulty cleared, not just quantity), with its rank. Distinct from the contest-rating view (/v1/user). A handle with no AtCoder activity returns zeros. Pass handle (required).",
        "handle": "tourist",
        "source": "AtCoder Problems API (kenkoooo.com/atcoder), keyless",
        "platform": "AtCoder",
        "solved_rank": 4265,
        "solved_count": 1055,
        "rated_point_sum": 688543,
        "rated_point_sum_rank": 624
    },
    "meta": {
        "timestamp": "2026-06-13T13:55:10.060Z",
        "request_id": "74021c5a-a1ce-4178-99b4-2cb6a3a80309"
    },
    "status": "ok",
    "message": "Solved record retrieved successfully",
    "success": true
}
```

### Contests

#### `GET /v1/contests` — Catalogue of AtCoder contests, newest first

**Parameters:**
- `limit` (query, optional, string) — Max contests (1-100) Example: `30`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/atcoder-api/v1/contests?limit=30"
```

**Response:**
```json
{
    "data": {
        "count": 30,
        "source": "AtCoder Problems API (kenkoooo.com/atcoder)",
        "contests": [
            {
                "id": "abc461",
                "start": "2026-06-06T12:00:00.000Z",
                "title": "AtCoder Beginner Contest 461",
                "rate_range": "~ 1999",
                "contest_url": "https://atcoder.jp/contests/abc461",
                "duration_minutes": 100
            },
            {
                "id": "arc221",
                "start": "2026-05-31T12:00:00.000Z",
                "title": "AtCoder Regular Contest++ 221",
                "rate_range": "1600 ~ 2999",
                "contest_url": "https://atcoder.jp/contests/arc221",
                "duration_minutes": 150
            },
            {
                "id": "abc460",
                "start": "2026-05-30T12:00:00.000Z",
                "title": "AtCoder Beginner Contest 460",
                "rate_range": "~ 1999",
                "contest_url": "https://atcoder.jp/contests/abc460",
                "duration_minutes": 100
            },
            {
                "id": "ahc066",
                "start": "2026-05-29T11:00:00.000Z",
                "title": "AtCoder Heuristic Contest 066",
                "rate_range": "All",
                "contest_url": "https://atcoder.jp/contests/ahc066",
                "duration_minutes": 14340
            },
            {
                "id": "abc459",
                "start": "2026-05-23T12:00:0
…(truncated, see openapi.json for full schema)
```


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