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

# Get best lines for multiple events



## OpenAPI

````yaml get /api/v1/lines/best
openapi: 3.1.0
info:
  title: TheRundown Sports API
  version: 2.0.0
  description: >
    **Resolve the event first.** Ambiguous date, team, player, or timezone? The
    agent asks instead of guessing.


    **Every price carries evidence.** Event, market, affiliate ID, line, and the
    price update time. A fetch time is not freshness.


    **Missing stays missing.** No remembered odds, no synthetic prices, no
    filled gaps.


    **IDs come from the API.** Sports, markets, and affiliates are discovered at
    runtime. Retired affiliates stay out.


    Real-time and historical sports betting data, odds, lines, and statistics
    across major North American and international sports leagues.


    ## Authentication

    All endpoints (except `/sports` and `/affiliates`) require authentication.
    Send your API key from a private server-side environment variable in the
    `X-TheRundown-Key` header.

    The query-key security scheme is retained for compatibility with existing
    integrations and deprecated for new integrations; do not put keys in URLs,
    prompts, browser bundles, or public code.

    ## Off-the-Board Sentinel Value

    The value **0.0001** indicates a line is "off the board" — the sportsbook
    has temporarily removed pricing (e.g., pending injury news). This is NOT an
    error. Display as "Off Board" or "N/A" in your UI.


    ## Rate Limiting

    Requests are rate-limited per API key tier. Check response headers for
    current limits.


    ## Data Updates

    - Live odds update in real-time during games

    - Use delta endpoints for efficient polling of changes

    - WebSocket connections available for streaming updates


    ## V1 vs V2

    V2 endpoints use market-based data structures (market_id, participants, line
    prices). V1 endpoints use legacy line-based structures (moneyline, spread,
    total objects). V2 is recommended for new integrations.
  contact:
    name: TheRundown API Support
    url: https://therundown.io
    email: support@therundown.io
  termsOfService: https://therundown.io/terms
servers:
  - url: https://therundown.io
    description: Production
security:
  - ApiKeyHeader: []
tags:
  - name: V2 Sports
    description: Sport listings, dates, and teams (V2)
  - name: V2 Events
    description: Events with market-based odds (V2)
  - name: V2 Markets
    description: Market definitions, odds, deltas, and history (V2)
  - name: V2 Futures
    description: >-
      Futures/outright competition events — championship and tournament-winner
      boards (V2, early access)
  - name: V2 Teams
    description: Team data, players, and stats (V2)
  - name: V2 Players
    description: Player data (V2)
  - name: V2 Stats
    description: Team and player statistics (V2)
  - name: V2 WebSocket
    description: Real-time streaming via WebSocket (V2)
  - name: V2 Reference
    description: Reference data — affiliates, sportsbooks, season types (V2)
  - name: V1 Events
    description: Events with line-based odds (V1 legacy)
  - name: V1 Lines
    description: Moneyline, spread, total, best-line endpoints (V1 legacy)
  - name: V1 Sports
    description: Sport listings, dates, events, schedules (V1 legacy)
  - name: V1 Delta
    description: Delta/change feeds (V1 legacy)
  - name: V1 Reference
    description: Reference data (V1 legacy)
  - name: V1 WebSocket
    description: Real-time streaming via WebSocket (V1 legacy)
externalDocs:
  description: Build with AI guide
  url: https://therundown.io/build-with-ai
paths:
  /api/v1/lines/best:
    get:
      tags:
        - V1 Lines
      summary: Get best lines for multiple events
      operationId: v1GetBestLineMulti
      parameters:
        - name: event_ids
          in: query
          required: true
          schema:
            type: string
          description: Comma-separated event IDs
        - name: period
          in: query
          schema:
            type: string
            default: period_full_game
            enum:
              - period_full_game
              - period_first_half
              - period_second_half
              - period_first_period
              - period_second_period
              - period_third_period
              - period_fourth_period
              - period_live_full_game
              - period_live_first_half
              - period_live_second_half
              - period_live_first_period
              - period_live_second_period
              - period_live_third_period
              - period_live_fourth_period
        - $ref: '#/components/parameters/AffiliateIDsQuery'
      responses:
        '200':
          description: Best lines keyed by event ID
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/BestLineResponse'
              example:
                09bfa53f8484a63e584398545c035932:
                  event_id: 09bfa53f8484a63e584398545c035932
                  moneyline:
                    moneyline_away: 155
                    moneyline_home: -170
                    best_affiliate_away:
                      affiliate_id: 23
                      affiliate_name: FanDuel
                      updated_at: '2026-02-12T00:10:00Z'
                    best_affiliate_home:
                      affiliate_id: 19
                      affiliate_name: DraftKings
                      updated_at: '2026-02-12T00:10:00Z'
                  spread:
                    point_spread_away: 4.5
                    point_spread_home: -4.5
                    point_spread_away_money: -105
                    point_spread_home_money: -108
                    best_affiliate_away:
                      affiliate_id: 3
                      affiliate_name: Pinnacle
                      updated_at: '2026-02-12T00:08:00Z'
                    best_affiliate_home:
                      affiliate_id: 23
                      affiliate_name: FanDuel
                      updated_at: '2026-02-12T00:10:00Z'
                  total:
                    total_over: 224.5
                    total_under: 224.5
                    total_over_money: -108
                    total_under_money: -105
                    best_affiliate_over:
                      affiliate_id: 19
                      affiliate_name: DraftKings
                      updated_at: '2026-02-12T00:10:00Z'
                    best_affiliate_under:
                      affiliate_id: 3
                      affiliate_name: Pinnacle
                      updated_at: '2026-02-12T00:08:00Z'
components:
  parameters:
    AffiliateIDsQuery:
      name: affiliate_ids
      in: query
      schema:
        type: string
      description: >
        Comma-separated sportsbook/affiliate IDs to filter. Common values
        include DraftKings (19), FanDuel (23), BetMGM (22), BookMaker (7),
        BetCRIS (9), Pinnacle (3), Polymarket US (31), Circa Sports (32), Bet105
        (33), and Heritage Sports (34). Availability varies by sport and market.

        On V2 event endpoints (`/api/v2/sports/{sportID}/events/{date}`,
        `/api/v2/events/{eventID}`, and their openers/closing siblings),
        `affiliate_ids=0` is a scores-only sentinel: the response keeps events,
        scores, and status and omits markets and price objects. Other endpoints
        that share this parameter treat `affiliate_ids` as a sportsbook filter
        only.
  schemas:
    BestLineResponse:
      type: object
      properties:
        event_id:
          type: string
        moneyline:
          $ref: '#/components/schemas/BestMoneyline'
        spread:
          $ref: '#/components/schemas/BestSpread'
        total:
          $ref: '#/components/schemas/BestTotal'
        periods:
          type: object
          description: Period-specific best lines keyed by period name
          additionalProperties:
            type: object
            properties:
              moneyline:
                $ref: '#/components/schemas/BestMoneyline'
              spread:
                $ref: '#/components/schemas/BestSpread'
              total:
                $ref: '#/components/schemas/BestTotal'
    BestMoneyline:
      type: object
      properties:
        moneyline_home:
          type: number
          nullable: true
        moneyline_away:
          type: number
          nullable: true
        moneyline_draw:
          type: number
          nullable: true
        best_affiliate_home:
          $ref: '#/components/schemas/BestAffiliateInfo'
        best_affiliate_away:
          $ref: '#/components/schemas/BestAffiliateInfo'
        best_affiliate_draw:
          $ref: '#/components/schemas/BestAffiliateInfo'
    BestSpread:
      type: object
      properties:
        point_spread_home:
          type: number
          nullable: true
        point_spread_away:
          type: number
          nullable: true
        point_spread_home_money:
          type: number
          nullable: true
        point_spread_away_money:
          type: number
          nullable: true
        best_affiliate_home:
          $ref: '#/components/schemas/BestAffiliateInfo'
        best_affiliate_away:
          $ref: '#/components/schemas/BestAffiliateInfo'
    BestTotal:
      type: object
      properties:
        total_over:
          type: number
          nullable: true
        total_under:
          type: number
          nullable: true
        total_over_money:
          type: number
          nullable: true
        total_under_money:
          type: number
          nullable: true
        best_affiliate_over:
          $ref: '#/components/schemas/BestAffiliateInfo'
        best_affiliate_under:
          $ref: '#/components/schemas/BestAffiliateInfo'
    BestAffiliateInfo:
      type: object
      properties:
        affiliate_id:
          type: integer
        affiliate_name:
          type: string
        updated_at:
          type: string
          format: date-time
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-TheRundown-Key
      description: Recommended API key request header for new integrations

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.