> ## Documentation Index
> Fetch the complete documentation index at: https://docs.beter-keiba.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 騎手詳細

> 騎手の基本情報に加え、マイルストーンや通算成績を取得します。



## OpenAPI

````yaml /reference/openapi.json get /jockeys/{jockeyId}
openapi: 3.1.0
info:
  title: BeTerKEIBA Core API
  description: >-
    JV-Data をベースとした競馬データ配信プラットフォーム。Cloudflare Workers (Hono), D1,
    R2を組み合わせたモダンなアーキテクチャで構築されています。


    ### 特徴

    - **高速レスポンス**: Cloudflareのエッジネットワークによる低レイテンシ。

    - **完全なデータ構造**: 産駒から現役、オッズ、マイニングまで網羅。

    - **開発者フレンドリー**: MintlifyドキュメントとTypeScript SDKによる高い開発効率
  version: 1.0.0
servers:
  - url: https://api.beter-keiba.com/v1
    description: 本番環境
security:
  - bearerAuth: []
tags:
  - name: Races
    description: レースデータ。開催情報・出走表・結果など、レース単位で取得する正規データ
  - name: Odds
    description: オッズデータ。単勝・複勝・枠連・馬連・ワイド・馬単・3連複・3連単の確定オッズおよび最終オッズ
  - name: Masters
    description: マスタデータ。競走馬・騎手・調教師・生産者・馬主・繁殖牝馬といった静的な実体情報
  - name: Updates
    description: 更新データ。スケジュール・調教・WIN5・予想指数など、随時更新が発生する派生データ
paths:
  /jockeys/{jockeyId}:
    get:
      tags:
        - Masters
      summary: 騎手詳細
      description: 騎手の基本情報に加え、マイルストーンや通算成績を取得します。
      operationId: getJockey
      parameters:
        - $ref: '#/components/parameters/jockeyId'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessResponse'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Jockey'
              example:
                code: SUCCESS
                data:
                  id: ks_05339
                  dataType: '2'
                  dataUpdatedAt: 1716715200
                  name: 横山典弘
                  nameKana: ﾖｺﾔﾏ ﾉﾘﾋﾛ
                  nameAbbr: 横山典
                  nameEng: YOKOYAMA Norihiro
                  birthday: '19680223'
                  isRetired: false
                  licenseIssuedAt: '19850301'
                  genderCode: '1'
                  qualificationCode: '3'
                  apprenticeCode: '3'
                  locationCode: '1'
                  invitationRegionName: ''
                  stableTrainerId: ch_01124
                  stableTrainerNameAbbr: 中川 公
                  milestones:
                    firstRide:
                      flat:
                        raceId: ra_2024052605021211
                        fieldSize: 16
                        horseId: um_2021105477
                        horseName: ドウデュース
                        finishPosition: 5
                        irregularStatus: '0'
                      obstacle:
                        raceId: ra_2024052605021211
                        fieldSize: 16
                        horseId: um_2021105477
                        horseName: ドウデュース
                        finishPosition: 5
                        irregularStatus: '0'
                    firstWin:
                      flat:
                        raceId: ra_2024052605021211
                        fieldSize: 16
                        horseId: um_2021105477
                        horseName: ドウデュース
                      obstacle:
                        raceId: ra_2024052605021211
                        fieldSize: 16
                        horseId: um_2021105477
                        horseName: ドウデュース
                    recentGradedWins:
                      - raceId: ra_2024052605021211
                        raceTitle: 東京優駿
                        raceTitleShort10: 日本ダービー
                        raceTitleShort6: ダービー
                        raceTitleShort3: ダービー
                        gradeCode: A
                        fieldSize: 18
                        horseId: um_2021105477
                        horseName: ドウデュース
                  stats:
                    thisYear:
                      year: 2024
                      earnings:
                        baseFlat: 0
                        baseObstacle: 0
                        addedFlat: 0
                        addedObstacle: 0
                      placings:
                        flat:
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                        obstacle:
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                        byVenue:
                          sapporo:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          hakodate:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          fukushima:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          niigata:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          tokyo:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          nakayama:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          chukyo:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          kyoto:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          hanshin:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          kokura:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                        byDistance:
                          turfUpTo1600:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          turf1601To2200:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          turf2201Plus:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          dirtUpTo1600:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          dirt1601To2200:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          dirt2201Plus:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                    lastYear:
                      year: 2024
                      earnings:
                        baseFlat: 0
                        baseObstacle: 0
                        addedFlat: 0
                        addedObstacle: 0
                      placings:
                        flat:
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                        obstacle:
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                        byVenue:
                          sapporo:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          hakodate:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          fukushima:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          niigata:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          tokyo:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          nakayama:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          chukyo:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          kyoto:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          hanshin:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          kokura:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                        byDistance:
                          turfUpTo1600:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          turf1601To2200:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          turf2201Plus:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          dirtUpTo1600:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          dirt1601To2200:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          dirt2201Plus:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                    total:
                      year: 2024
                      earnings:
                        baseFlat: 0
                        baseObstacle: 0
                        addedFlat: 0
                        addedObstacle: 0
                      placings:
                        flat:
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                        obstacle:
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                          - 0
                        byVenue:
                          sapporo:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          hakodate:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          fukushima:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          niigata:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          tokyo:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          nakayama:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          chukyo:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          kyoto:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          hanshin:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                          kokura:
                            flat:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                            obstacle:
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                              - 0
                        byDistance:
                          turfUpTo1600:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          turf1601To2200:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          turf2201Plus:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          dirtUpTo1600:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          dirt1601To2200:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                          dirt2201Plus:
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                            - 0
                  createdAt: 1716716000
                  updatedAt: 1716716000
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    jockeyId:
      name: jockeyId
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/JockeyId'
    fields:
      name: fields
      in: query
      schema:
        type: string
        maxLength: 500
      description: 取得するフィールドの絞り込み（カンマ区切り）
  schemas:
    SuccessResponse:
      type: object
      description: >-
        成功レスポンスの共通ラッパー。code は常に "SUCCESS"、data にエンドポイント固有のレスポンスボディ、extensions
        に補助情報 (pagination や統計など) を含みます。
      required:
        - code
        - data
      properties:
        code:
          type: string
          description: 処理結果コード。成功時は常に 'SUCCESS'
          example: SUCCESS
        data:
          description: 取得されたデータ本体
        extensions:
          $ref: '#/components/schemas/ResponseExtensions'
    Jockey:
      type: object
      description: 騎手データ。免許情報や通算成績を含みます。
      required:
        - id
        - name
      properties:
        id:
          $ref: '#/components/schemas/JockeyId'
        dataType:
          type: string
          description: データ区分 (JV-Data KS レコード §2 由来)。1:新規登録, 2:更新, 0:該当レコード削除(提供ミスなどの理由による)
          example: '2'
          maxLength: 1
        dataUpdatedAt:
          type: integer
          description: データ作成日時 (JV-Data KS レコード §3 由来、Unix Timestamp)
          example: 1716715200
        name:
          type: string
          description: 騎手名 (JV-Data KS レコード §9 由来、全角17文字。日本人騎手は姓+全角空白1文字+名、外国人騎手は連続17文字)
          example: 横山典弘
          maxLength: 34
        nameKana:
          type: string
          description: 騎手名半角ｶﾅ (JV-Data KS レコード §11 由来、姓15文字+名15文字)
          example: ﾖｺﾔﾏ ﾉﾘﾋﾛ
          maxLength: 30
        nameAbbr:
          type: string
          description: 騎手名略称 (JV-Data KS レコード §12 由来、全角4文字)
          example: 横山典
          maxLength: 8
        nameEng:
          type: string
          description: 騎手名欧字 (JV-Data KS レコード §13 由来、姓+半角空白+名のフルネーム)
          example: YOKOYAMA Norihiro
          maxLength: 80
        birthday:
          type: string
          description: 生年月日 (JV-Data KS レコード §8 由来、yyyymmdd)
          example: '19680223'
          maxLength: 8
        isRetired:
          type: boolean
          description: 騎手抹消区分 (JV-Data KS レコード §5 由来、true:抹消, false:現役)
          example: false
        licenseIssuedAt:
          type: string
          description: 騎手免許交付年月日 (JV-Data KS レコード §6 由来、yyyymmdd)
          example: '19850301'
          maxLength: 8
        licenseRevokedAt:
          type: string
          description: 騎手免許抹消年月日 (JV-Data KS レコード §7 由来、yyyymmdd)。現役騎手は null
          example: null
          nullable: true
          maxLength: 8
        genderCode:
          $ref: '#/components/schemas/GenderCode'
        qualificationCode:
          $ref: '#/components/schemas/JockeyQualificationCode'
        apprenticeCode:
          $ref: '#/components/schemas/JockeyApprenticeCode'
        locationCode:
          $ref: '#/components/schemas/LocationCode'
        invitationRegionName:
          type: string
          description: 招待地域名 (JV-Data KS レコード §18 由来、全角10文字)
          example: ''
          maxLength: 20
        stableTrainerId:
          $ref: '#/components/schemas/TrainerId'
        stableTrainerNameAbbr:
          type: string
          description: 所属調教師名略称 (JV-Data KS レコード §20 由来、全角4文字)。フリー騎手の場合は空文字
          example: 中川 公
          maxLength: 8
        milestones:
          $ref: '#/components/schemas/JockeyMilestones'
        stats:
          $ref: '#/components/schemas/JockeyStats'
        createdAt:
          type: integer
          description: >-
            API 側の行作成タイムスタンプ (Unix 秒、内部管理メタデータ)。JV-Data 由来の `dataUpdatedAt` (KS
            §3、データ作成年月日) とは独立した別軸
        updatedAt:
          type: integer
          description: >-
            API 側の行更新タイムスタンプ (Unix 秒、内部管理メタデータ)。JV-Data 由来の `dataUpdatedAt` (KS
            §3、データ作成年月日) とは独立した別軸
    JockeyId:
      type: string
      pattern: ^ks_[0-9]{5}$
      example: ks_05339
      description: Jockey entity ID。JV-Data KS レコード由来の騎手コード (5 桁)
    ResponseExtensions:
      type: object
      description: レスポンスに関する補助情報（メタデータ）。一覧取得時にはページネーション情報が含まれます。
      properties:
        totalCount:
          type: integer
          description: 検索条件に一致する全データの総件数
          example: 150
        limit:
          type: integer
          description: 1リクエストあたりの最大取得件数
          example: 50
        page:
          type: integer
          description: 現在のページ番号
          example: 1
        totalPages:
          type: integer
          description: 全件数をlimitで割った合計ページ数
          example: 3
        dataUpdatedAt:
          type: integer
          description: 返却されたデータの最終更新日時 (Unix Timestamp)。キャッシュ制御などに利用します。
          example: 1716715200
    GenderCode:
      type: string
      description: |-
        騎手・調教師など人物の性別区分。馬の性別を表す `SexCode` とは別の code table に基づきます。

        | コード | 名称 |
        | :--- | :--- |
        | 1 | 男性 |
        | 2 | 女性 |
        | 0 | 未設定 |
      enum:
        - '0'
        - '1'
        - '2'
      example: '1'
      maxLength: 1
    JockeyQualificationCode:
      type: string
      description: |-
        騎手の騎乗資格（免許種別）を表すコード。

        | コード | 内容 | 説明 |
        | :--- | :--- | :--- |
        | 1 | 平地 | 平地競走のみ騎乗可能 |
        | 2 | 障害 | 障害競走のみ騎乗可能 |
        | 3 | 平・障 | 平地・障害の両方に騎乗可能 |
        | 0 | なし | 未設定・未整備時の初期値 |
      enum:
        - '0'
        - '1'
        - '2'
        - '3'
      example: '3'
      maxLength: 1
    JockeyApprenticeCode:
      type: string
      description: >-
        騎手の減量特典（見習・女性騎手）を表すコード。


        ### 記号と減量キロ数

        | コード | 記号 | 減量 | 適用条件 (2023年以降の例) |

        | :--- | :--- | :--- | :--- |

        | 1 | ☆ | 1kg減 | 男性: 勝利数51-100回 かつ 免許5年未満 |

        | 2 | △ | 2kg減 | 男性: 勝利数31-50回 かつ 免許5年未満 |

        | 3 | ▲ | 3kg減 | 男性: 勝利数30回以下 かつ 免許5年未満 |

        | 4 | ★ | 4kg減 | 女性: 勝利数50回以下 かつ 免許5年未満 |

        | 9 | ◇ | 2kg減 | 女性: 勝利数101回以上 または 免許5年以上 |

        | 0 | なし | 0kg | 一般（減量特典なし） |


        ※女性騎手の場合、2023年1月以降は免許5年未満かつ51〜100勝で「★(4kg減)」が適用されるなど、男性騎手より優遇措置が大きくなっています。

        ※障害競走や地方競馬からの招待など、条件により記号の意味が異なる場合があります。
      enum:
        - '0'
        - '1'
        - '2'
        - '3'
        - '4'
        - '9'
      example: '3'
      maxLength: 1
    LocationCode:
      type: string
      description: |-
        所属するトレーニングセンターや地域を表すコード。

        | コード | 名称1 | 名称2 | 説明 |
        | :--- | :--- | :--- | :--- |
        | 1 | 関東 | 美浦 | 美浦トレーニングセンター所属 |
        | 2 | 関西 | 栗東 | 栗東トレーニングセンター所属 |
        | 3 | 地方招待 | 招待 | 地方競馬からの招待 |
        | 4 | 外国招待 | 招待 | 外国からの招待 |
        | 0 | 未設定 | - | 地方・海外等の初期値 |
      enum:
        - '0'
        - '1'
        - '2'
        - '3'
        - '4'
      example: '1'
      maxLength: 1
    TrainerId:
      type: string
      pattern: ^ch_[0-9]{5}$
      example: ch_01124
      description: >-
        Trainer entity ID。JV-Data CH レコード由来の調教師コード (5 桁)。フリー所属
        (`Jockey.stableTrainerId`) を表す `ch_00000` (JV-Data 上の "ALL0" 相当) も
        pattern に合致する
    JockeyMilestones:
      type: object
      description: >-
        騎手のマイルストーン記録 (JV-Data KS レコード項番21-23 由来)。event 1 件分の primitive
        (`FirstRide` / `FirstWin` / `GradedWin`) は Trainer 側と $ref
        共有する一方、top-level の `JockeyMilestones` は entity 別に分離 (`TrainerMilestones`
        とは別 schema)
      properties:
        firstRide:
          type: object
          description: >-
            初騎乗情報 (JV-Data KS レコード項番21 由来)。平地・障害でそれぞれ最大 1 件保持。該当競走が未経験の場合は対応 key
            を省略
          properties:
            flat:
              $ref: '#/components/schemas/FirstRide'
            obstacle:
              $ref: '#/components/schemas/FirstRide'
        firstWin:
          type: object
          description: >-
            初勝利情報 (JV-Data KS レコード項番22 由来)。平地・障害でそれぞれ最大 1 件保持。該当競走が未勝利の場合は対応 key
            を省略
          properties:
            flat:
              $ref: '#/components/schemas/FirstWin'
            obstacle:
              $ref: '#/components/schemas/FirstWin'
        recentGradedWins:
          type: array
          description: 最近の重賞勝利情報 (JV-Data KS レコード項番23 由来)。新しい順に保持
          items:
            $ref: '#/components/schemas/GradedWin'
    JockeyStats:
      type: object
      description: 騎手の年度別成績情報 (JV-Data KS レコード項番24 由来)。本年・前年・累計の 3 周期分を保持する。
      properties:
        thisYear:
          $ref: '#/components/schemas/JockeyPeriod'
        lastYear:
          $ref: '#/components/schemas/JockeyPeriod'
        total:
          $ref: '#/components/schemas/JockeyPeriod'
    ErrorResponse:
      type: object
      description: >-
        エラーレスポンスの共通ラッパー。すべての 4xx / 5xx で同一構造を返します。トップレベルの `error`
        フィールドに、プログラム判定用の `code`、人間向け `message`、問い合わせ追跡用の `requestId` を入れます。
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: エラーコード。プログラムで判定可能な SCREAMING_SNAKE_CASE 文字列
              example: UNAUTHORIZED
            message:
              type: string
              description: エラーの内容（人間向けメッセージ）
              example: 有効なAPIアクセスキーが必要です。
            requestId:
              type: string
              description: 問い合わせ用ID
              example: req_abcd1234
    FirstRide:
      type: object
      description: >-
        初騎乗 1 件分の event record (JV-Data KS レコード項番21
        由来)。`Jockey.milestones.firstRide` の inner shape として平地/障害それぞれ最大 1 件保持される
        entity 横断 primitive。完走しなかった場合 (取消・除外・中止・失格) は `irregularStatus`
        に該当コードが入り、`finishPosition` は 0 となる。正常完走 (`irregularStatus = 0`)
        または未設定の場合、`irregularStatus` プロパティは response から省略される
      properties:
        raceId:
          $ref: '#/components/schemas/RaceId'
        fieldSize:
          type: integer
          description: 出走頭数
          example: 16
        horseId:
          $ref: '#/components/schemas/HorseId'
        horseName:
          type: string
          description: 馬名
          example: ドウデュース
          maxLength: 36
        finishPosition:
          type: integer
          description: 確定着順 (1-18)。`irregularStatus` が設定された場合は 0
          example: 5
        irregularStatus:
          $ref: '#/components/schemas/AbnormalityCode'
    FirstWin:
      type: object
      description: >-
        初勝利 1 件分の event record (JV-Data KS レコード項番22
        由来)。`Jockey.milestones.firstWin` の inner shape として平地/障害それぞれ最大 1 件保持される
        entity 横断 primitive。1 着確定のため `finishPosition` / `irregularStatus` は持たない
      properties:
        raceId:
          $ref: '#/components/schemas/RaceId'
        fieldSize:
          type: integer
          description: 出走頭数
          example: 16
        horseId:
          $ref: '#/components/schemas/HorseId'
        horseName:
          type: string
          description: 馬名
          example: ドウデュース
          maxLength: 36
    GradedWin:
      type: object
      description: >-
        重賞勝利 1 件分の event record (JV-Data KS レコード項番23 / CH レコード項番16
        由来)。Jockey/Trainer 間で $ref 共有する entity 横断 primitive。競走名 4 variants は
        Race entity の `title` 慣習に揃え `raceTitle` 系列で flat sibling として保持する (group
        化しない)
      properties:
        raceId:
          $ref: '#/components/schemas/RaceId'
        raceTitle:
          type: string
          description: 競走名本題
          example: 東京優駿
          maxLength: 60
        raceTitleShort10:
          type: string
          description: 競走名略称10文字
          example: 日本ダービー
          maxLength: 20
        raceTitleShort6:
          type: string
          description: 競走名略称6文字
          example: ダービー
          maxLength: 12
        raceTitleShort3:
          type: string
          description: 競走名略称3文字
          example: ダービー
          maxLength: 6
        gradeCode:
          $ref: '#/components/schemas/GradeCode'
        fieldSize:
          type: integer
          description: 出走頭数
          example: 18
        horseId:
          $ref: '#/components/schemas/HorseId'
        horseName:
          type: string
          description: 馬名
          example: ドウデュース
          maxLength: 36
    JockeyPeriod:
      type: object
      description: >-
        騎手の 1 周期分 (本年 / 前年 / 累計) の成績。中央のみのカウント (`earnings: { baseFlat,
        baseObstacle, addedFlat, addedObstacle }`、`placings: { flat[6],
        obstacle[6], byVenue, byDistance }`)。
      properties:
        year:
          type: integer
          description: 成績情報に設定されている年度 (西暦)
          example: 2024
        earnings:
          type: object
          description: 賞金合計 (円単位)。KS は平地/障害 × 本/付加 の 4 通り
          properties:
            baseFlat:
              type: integer
              description: 平地本賞金合計 (円)
            baseObstacle:
              type: integer
              description: 障害本賞金合計 (円)
            addedFlat:
              type: integer
              description: 平地付加賞金合計 (円)
            addedObstacle:
              type: integer
              description: 障害付加賞金合計 (円)
        placings:
          type: object
          description: 着回数群 (各 array は [1着, 2着, 3着, 4着, 5着, 着外] の固定 6 要素)
          properties:
            flat:
              type: array
              description: 平地着回数
              items:
                type: integer
              minItems: 6
              maxItems: 6
            obstacle:
              type: array
              description: 障害着回数
              items:
                type: integer
              minItems: 6
              maxItems: 6
            byVenue:
              type: object
              description: 競馬場別着回数 (中央 10 場 × 平地/障害)
              properties:
                sapporo:
                  $ref: '#/components/schemas/VenuePlacings'
                hakodate:
                  $ref: '#/components/schemas/VenuePlacings'
                fukushima:
                  $ref: '#/components/schemas/VenuePlacings'
                niigata:
                  $ref: '#/components/schemas/VenuePlacings'
                tokyo:
                  $ref: '#/components/schemas/VenuePlacings'
                nakayama:
                  $ref: '#/components/schemas/VenuePlacings'
                chukyo:
                  $ref: '#/components/schemas/VenuePlacings'
                kyoto:
                  $ref: '#/components/schemas/VenuePlacings'
                hanshin:
                  $ref: '#/components/schemas/VenuePlacings'
                kokura:
                  $ref: '#/components/schemas/VenuePlacings'
            byDistance:
              type: object
              description: >-
                距離別着回数 ({surface}UpTo1600 / {surface}1601To2200 /
                {surface}2201Plus の 3 段 bucket)
              properties:
                turfUpTo1600:
                  type: array
                  description: 芝・1600m以下
                  items:
                    type: integer
                  minItems: 6
                  maxItems: 6
                turf1601To2200:
                  type: array
                  description: 芝・1601-2200m
                  items:
                    type: integer
                  minItems: 6
                  maxItems: 6
                turf2201Plus:
                  type: array
                  description: 芝・2201m以上
                  items:
                    type: integer
                  minItems: 6
                  maxItems: 6
                dirtUpTo1600:
                  type: array
                  description: ダート・1600m以下
                  items:
                    type: integer
                  minItems: 6
                  maxItems: 6
                dirt1601To2200:
                  type: array
                  description: ダート・1601-2200m
                  items:
                    type: integer
                  minItems: 6
                  maxItems: 6
                dirt2201Plus:
                  type: array
                  description: ダート・2201m以上
                  items:
                    type: integer
                  minItems: 6
                  maxItems: 6
    RaceId:
      type: string
      pattern: ^ra_[0-9]{16}$
      example: ra_2024052605021211
      description: >-
        Race entity ID。JV-Data RA レコード由来の合成 PK (開催年月日 8 桁 + 場コード 2 桁 + 開催回 2 桁 +
        開催日目 2 桁 + レース番号 2 桁)
    HorseId:
      type: string
      pattern: ^um_[0-9]{10}$
      example: um_2021105477
      description: Horse entity ID。JV-Data UM レコード由来の血統登録番号 (10 桁)
    AbnormalityCode:
      type: string
      description: |-
        競走時の異常事態を表すコード。

        | コード | 名称 | 略称 | 英語 | 内容 |
        | :--- | :--- | :--- | :--- | :--- |
        | 1 | 出走取消 | 取消 | SCRATCHED | 出走表確定後、馬の体調不良等で取りやめ。 |
        | 2 | 発走除外 | 発除 | EXCLUDED | 発走直前の放馬等による除外。 |
        | 3 | 競走除外 | 競除 | EXCLUDED | 審判員の判断による除外。 |
        | 4 | 競走中止 | 中止 | FALL TO FINISH | 落馬・故障等で完走できず。 |
        | 5 | 失格 | 失格 | DISQUALIFIED | 走行妨害や重量不足等による失格。 |
        | 6 | 落馬再騎乗 | 再騎 | REMOUNT | 落馬後に再度騎乗して完走（稀）。 |
        | 7 | 降着 | 降着 | DQ&P | 他馬の走行を妨害し、着順が下げられた場合。 |
        | 0 | 正常 | - | - | 正常に完走。 |
      enum:
        - '0'
        - '1'
        - '2'
        - '3'
        - '4'
        - '5'
        - '6'
        - '7'
      example: '0'
      maxLength: 1
    GradeCode:
      type: string
      description: |-
        競走のグレードを表すコード。

        | コード | 内容 | 欧字表記 |
        | :--- | :--- | :--- |
        | A | G1（平地） | G1 |
        | B | G2（平地） | G2 |
        | C | G3（平地） | G3 |
        | D | グレードのない重賞 | - |
        | E | 重賞以外の特別競走 | - |
        | F | J・G1（障害） | J・G1 |
        | G | J・G2（障害） | J・G2 |
        | H | J・G3（障害） | J・G3 |
        | L | L（リステッド） | L |
        | _ | 一般競走 または 未設定 | - |

        ※ `_` は半角スペース(0x20)をアンダースコアに置換しています。
      enum:
        - A
        - B
        - C
        - D
        - E
        - F
        - G
        - H
        - L
        - _
      x-fern-enum:
        _:
          name: Open
          description: 一般競走 または 未設定 (元の JV-Data コードは半角スペース 0x20)
      example: A
      maxLength: 1
    VenuePlacings:
      type: object
      description: >-
        競馬場 1 場分の平地・障害着回数 (各 array は [1着, 2着, 3着, 4着, 5着, 着外] の固定 6 要素)。KS/CH 間で
        $ref 共有する entity 横断 primitive。
      properties:
        flat:
          type: array
          description: 平地
          items:
            type: integer
          minItems: 6
          maxItems: 6
        obstacle:
          type: array
          description: 障害
          items:
            type: integer
          minItems: 6
          maxItems: 6
  responses:
    BadRequest:
      description: リクエストの構文エラーや型不整合
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: BAD_REQUEST
              message: リクエストの形式が正しくありません。
    Unauthorized:
      description: >-
        認証エラー（APIキー未設定、または無効）。`Authorization: Bearer <sk_live_... or
        sk_test_...>` を必ず付与してください。失敗理由（キー欠落 / 不明 / 失効）は同一 body で返します。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: UNAUTHORIZED
              message: 有効なAPIキーが必要です。
    NotFound:
      description: リソースが見つからない場合
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: NOT_FOUND
              message: 指定されたIDのリソースが見つかりませんでした。
    InternalServerError:
      description: サーバー内部エラー
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INTERNAL_SERVER_ERROR
              message: サーバー内部で予期せぬエラーが発生しました。
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        APIダッシュボードで発行された `sk_live_...` または `sk_test_...` キーを入力してください。prefix は
        mode を示し、両 mode とも同じ API URL で利用できます (`sk_live_*` = live mode /
        本番、`sk_test_*` = test mode / 開発・自動テスト)。

````