> ## 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 /broodmares
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:
  /broodmares:
    get:
      tags:
        - Masters
      summary: 繁殖馬一覧
      operationId: listBroodmares
      parameters:
        - $ref: '#/components/parameters/q'
        - $ref: '#/components/parameters/sort'
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessResponse'
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/Broodmare'
              example:
                code: SUCCESS
                data:
                  - id: hn_1234567890
                    dataType: '2'
                    dataUpdatedAt: 1716715200
                    horseId: um_2021105477
                    name: トップデサイル
                    nameKana: ﾄｯﾌﾟﾃﾞｻｲﾙ
                    nameEng: Top Decile
                    birthYear: 2010
                    sexCode: '1'
                    breedCode: '1'
                    colorCode: '03'
                    importTypeCode: '3'
                    importYear: 0
                    originName: アメリカ
                    sireBroodmareId: hn_1234567890
                    damBroodmareId: hn_1234567890
                    createdAt: 1716716000
                    updatedAt: 1716716000
                extensions:
                  totalCount: 1
                  limit: 50
                  page: 1
                  totalPages: 1
                  dataUpdatedAt: 1716715200
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    q:
      name: q
      in: query
      schema:
        type: string
        maxLength: 200
      description: 名前で絞り込み
    sort:
      name: sort
      in: query
      schema:
        type: string
        maxLength: 100
      description: ソート順（- を付けると降順）
    fields:
      name: fields
      in: query
      schema:
        type: string
        maxLength: 500
      description: 取得するフィールドの絞り込み（カンマ区切り）
    page:
      name: page
      in: query
      schema:
        type: integer
        default: 1
        minimum: 1
        maximum: 10000
      description: ページ番号 (1 以上 10000 以下)
    limit:
      name: limit
      in: query
      schema:
        type: integer
        default: 100
        minimum: 1
        maximum: 1000
      description: 1リクエストあたりの最大取得件数 (1 以上 1000 以下)
  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'
    Broodmare:
      type: object
      description: >-
        繁殖馬データ。血統管理のためのマスタ。`horseId` は JV-Data HN レコード §6 由来の血統登録番号
        (外国の繁殖馬等で初期値の場合は null)。`sireBroodmareId` / `damBroodmareId` は HN §18 /
        §19 由来の父馬 / 母馬繁殖登録番号
      required:
        - id
        - name
      properties:
        id:
          $ref: '#/components/schemas/BroodmareId'
        dataType:
          type: string
          description: データ区分 (JV-Data HN レコード §2 由来)。1:新規登録, 2:更新, 0:該当レコード削除(提供ミスなどの理由による)
          example: '2'
          maxLength: 1
        dataUpdatedAt:
          type: integer
          description: データ作成日時 (JV-Data HN レコード §3 由来、Unix Timestamp)
          example: 1716715200
        horseId:
          $ref: '#/components/schemas/HorseId'
        name:
          type: string
          description: >-
            繁殖馬名 (JV-Data HN レコード §8 由来、全角18文字 ～
            半角36文字、全角と半角が混在)。外国繁殖馬の場合は欧字馬名の頭36バイトが設定される
          example: トップデサイル
          maxLength: 36
        nameKana:
          type: string
          description: 馬名半角ｶﾅ (JV-Data HN レコード §9 由来、半角40文字)。外国繁殖馬については設定されない
          example: ﾄｯﾌﾟﾃﾞｻｲﾙ
          maxLength: 40
        nameEng:
          type: string
          description: 馬名欧字 (JV-Data HN レコード §10 由来、全角と半角が混在)
          example: Top Decile
          maxLength: 80
        birthYear:
          type: integer
          description: 生年 (JV-Data HN レコード §11 由来、西暦4桁)
          example: 2010
        sexCode:
          $ref: '#/components/schemas/SexCode'
        breedCode:
          $ref: '#/components/schemas/BreedCode'
        colorCode:
          $ref: '#/components/schemas/ColorCode'
        importTypeCode:
          type: string
          description: >-
            繁殖馬持込区分 (JV-Data HN レコード §15 由来)。0:内国産, 1:持込, 2:輸入内国産扱い, 3:輸入,
            9:その他。`Foal.importTypeCode` (SK §9 由来の産駒持込区分) とは別フィールド
          example: '3'
          maxLength: 1
        importYear:
          type: integer
          description: 輸入年 (JV-Data HN レコード §16 由来、西暦4桁)。内国産は 0
          example: 0
        originName:
          type: string
          description: 産地名 (JV-Data HN レコード §17 由来、全角10文字)
          example: アメリカ
          maxLength: 20
        sireBroodmareId:
          $ref: '#/components/schemas/BroodmareId'
        damBroodmareId:
          $ref: '#/components/schemas/BroodmareId'
        createdAt:
          type: integer
          description: >-
            API 側の行作成タイムスタンプ (Unix 秒、内部管理メタデータ)。JV-Data 由来の `dataUpdatedAt` (HN
            §3、データ作成年月日) とは独立した別軸
        updatedAt:
          type: integer
          description: >-
            API 側の行更新タイムスタンプ (Unix 秒、内部管理メタデータ)。JV-Data 由来の `dataUpdatedAt` (HN
            §3、データ作成年月日) とは独立した別軸
    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
    BroodmareId:
      type: string
      pattern: ^hn_[0-9]{10}$
      example: hn_1234567890
      description: >-
        Broodmare entity ID。JV-Data HN レコード由来の繁殖登録番号 (v4.9 で 8→10
        桁拡張)。`PedigreeAncestor.id` も同 namespace を共有する
    HorseId:
      type: string
      pattern: ^um_[0-9]{10}$
      example: um_2021105477
      description: Horse entity ID。JV-Data UM レコード由来の血統登録番号 (10 桁)
    SexCode:
      type: string
      description: |-
        馬の性別を表すコード。年齢によって英語の呼称が異なります。人物の性別区分は `GenderCode` を使用します。

        | コード | 名称 | 英語(0-4歳) | 英語(5歳-) | 説明 |
        | :--- | :--- | :--- | :--- | :--- |
        | 1 | 牡 | Colt (C) | Horse (H) | オス馬 |
        | 2 | 牝 | Filly (F) | Mare (M) | メス馬 |
        | 3 | せん | Gelding (G) | Gelding (G) | 去勢されたオス馬 |
        | 0 | 未設定 | - | - | 地方・海外等の初期値 |
      enum:
        - '0'
        - '1'
        - '2'
        - '3'
      example: '1'
      maxLength: 1
    BreedCode:
      type: string
      description: |-
        馬の品種を表すコード。

        | コード | 名称 | 略称 | 内容 |
        | :--- | :--- | :--- | :--- |
        | 1 | サラブレッド | サラ | サラブレッドとして登録された馬。 |
        | 2 | サラブレッド系種 | サラ系 | アラブ血量が25%未満、または準サラ等。 |
        | 3 | 準サラブレッド | 準サラ | (旧規定) 現在はサラ系に統合。 |
        | 4 | 軽半血種 | 軽半 | 軽種と中半血種の交配など。 |
        | 5 | アングロアラブ | アア | アラブ血量25%以上。 |
        | 6 | アラブ系種 | アラ系 | アラブ血量25%以上（アアとは登録規定が異なる）。 |
        | 7 | アラブ | アラブ | 純血のアラブ。 |
        | 8 | 中半血種 | 中半 | 中間種相互の交配など。 |
        | 0 | 未設定 | - | 地方・海外等の初期値。 |
      enum:
        - '0'
        - '1'
        - '2'
        - '3'
        - '4'
        - '5'
        - '6'
        - '7'
        - '8'
      example: '1'
      maxLength: 1
    ColorCode:
      type: string
      description: |-
        馬の毛色を表すコード。

        | コード | 名称 | 英語名 | 略称 |
        | :--- | :--- | :--- | :--- |
        | 01 | 栗毛 | Chestnut | ch. |
        | 02 | 栃栗毛 | Dark Chestnut | d.ch. |
        | 03 | 鹿毛 | Bay | b. |
        | 04 | 黒鹿毛 | Dark Bay | d.b. |
        | 05 | 青鹿毛 | Brown | br. |
        | 06 | 青毛 | Black | bl. |
        | 07 | 芦毛 | Grey | g. |
        | 08 | 栗粕毛 | - | - |
        | 09 | 鹿粕毛 | - | - |
        | 10 | 青粕毛 | - | - |
        | 11 | 白毛 | White | w. |
        | 00 | 未設定 | - | - |
      enum:
        - '00'
        - '01'
        - '02'
        - '03'
        - '04'
        - '05'
        - '06'
        - '07'
        - '08'
        - '09'
        - '10'
        - '11'
      example: '03'
      maxLength: 2
    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
  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 / 開発・自動テスト)。

````