> ## 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 /breeders/{breederId}
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:
  /breeders/{breederId}:
    get:
      tags:
        - Masters
      summary: 生産者詳細
      operationId: getBreeder
      parameters:
        - $ref: '#/components/parameters/breederId'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessResponse'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Breeder'
              example:
                code: SUCCESS
                data:
                  id: br_00010521
                  dataType: '2'
                  dataUpdatedAt: 1716715200
                  name: 社台ファーム株式会社
                  nameNoEntity: 社台ファーム
                  nameKana: ｼｬﾀﾞｲﾌｧｰﾑ
                  nameEng: Shadai Farm
                  addressCityName: 千歳市
                  stats:
                    thisYear:
                      year: 2024
                      earnings:
                        base: 12345600
                        added: 1234560
                      placings:
                        - 10
                        - 8
                        - 5
                        - 4
                        - 3
                        - 100
                    total:
                      year: 2024
                      earnings:
                        base: 12345600
                        added: 1234560
                      placings:
                        - 10
                        - 8
                        - 5
                        - 4
                        - 3
                        - 100
                  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:
    breederId:
      name: breederId
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/BreederId'
    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'
    Breeder:
      type: object
      description: 生産者データ。JV-Data BR レコード由来で、生産者名 (法人格有形式) や所在地、本年・累計成績を含みます。
      required:
        - id
        - name
      properties:
        id:
          $ref: '#/components/schemas/BreederId'
        dataType:
          type: string
          description: データ区分 (JV-Data BR レコード §2 由来)。1:新規登録, 2:更新, 0:該当レコード削除(提供ミスなどの理由による)
          example: '2'
          maxLength: 1
        dataUpdatedAt:
          type: integer
          description: データ作成日時 (JV-Data BR レコード §3 由来、Unix Timestamp)
          example: 1716715200
        name:
          type: string
          description: >-
            生産者名 (法人格有のフルネーム形式)。JV-Data BR レコード #5 由来。短縮形 (法人格無) は
            `Horse.breederName` を参照
          example: 社台ファーム株式会社
          maxLength: 72
        nameNoEntity:
          type: string
          description: >-
            生産者名 (法人格無、JV-Data BR レコード §6
            由来)。株式会社等の法人格を示す文字列が頭または末尾にある場合に除去した短縮形
          example: 社台ファーム
          maxLength: 72
        nameKana:
          type: string
          description: 生産者名半角ｶﾅ (JV-Data BR レコード §7 由来、半角72文字)。外国生産者については設定されない
          example: ｼｬﾀﾞｲﾌｧｰﾑ
          maxLength: 72
        nameEng:
          type: string
          description: 生産者名欧字 (JV-Data BR レコード §8 由来、全角と半角が混在)
          example: Shadai Farm
          maxLength: 168
        addressCityName:
          type: string
          description: 生産者住所自治省名 (生産者の所在地)
          example: 千歳市
          maxLength: 20
        stats:
          $ref: '#/components/schemas/BreederStats'
        createdAt:
          type: integer
          description: >-
            API 側の行作成タイムスタンプ (Unix 秒、内部管理メタデータ)。JV-Data 由来の `dataUpdatedAt` (BR
            §3、データ作成年月日) とは独立した別軸
        updatedAt:
          type: integer
          description: >-
            API 側の行更新タイムスタンプ (Unix 秒、内部管理メタデータ)。JV-Data 由来の `dataUpdatedAt` (BR
            §3、データ作成年月日) とは独立した別軸
    BreederId:
      type: string
      pattern: ^br_[0-9]{8}$
      example: br_00010521
      description: Breeder entity ID。JV-Data BR レコード由来の生産者コード (v4.9 で 6→8 byte 拡張)
    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
    BreederStats:
      type: object
      description: >-
        生産者の本年・累計成績情報 (JV-Data BR レコード項番10 由来、60 byte × 2 周期)。`thisYear`
        は本年成績、`total` は累計成績。
      properties:
        thisYear:
          $ref: '#/components/schemas/BreederPeriod'
        total:
          $ref: '#/components/schemas/BreederPeriod'
    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
    BreederPeriod:
      type: object
      description: >-
        生産者の 1 周期分 (本年 or 累計) の成績 (`earnings: { base, added }`、`placings:
        int[6]`)。
      properties:
        year:
          type: integer
          description: 設定年 (西暦)
          example: 2024
        earnings:
          type: object
          description: 賞金合計 (円単位)。BN/BR は平地/障害の breakdown を持たないため `{ base, added }` のみ
          properties:
            base:
              type: integer
              description: 本賞金合計 (円単位)
              example: 12345600
            added:
              type: integer
              description: 付加賞金合計 (円単位)
              example: 1234560
        placings:
          type: array
          description: 中央のみの着回数 [1着, 2着, 3着, 4着, 5着, 着外] の固定 6 要素
          items:
            type: integer
          minItems: 6
          maxItems: 6
          example:
            - 10
            - 8
            - 5
            - 4
            - 3
            - 100
  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 / 開発・自動テスト)。

````