{
 "sport": "UFC/MMA",
 "recommendedProvider": {
  "name": "SportsDataIO MMA API (schedule/results/fighters/withdrawal status) + The Odds API v4 (comparison odds)",
  "status": "conditional - not deployable until a paid SportsDataIO MMA licence with commercial-display/AI terms is obtained and both keys are configured",
  "reason": "SportsDataIO documents separate EventId (card) and FightId (bout), fight Order, Fighters[] with PreFightWins/Losses, ResultType incl. 'No Contest', Status incl. 'Canceled', and per-fighter Active flag (withdrawal signal). Its free trial excludes MMA and its data-licence terms were not found publicly, so rights are unclear. The Odds API terms explicitly permit commercial display, indefinite retention and ML training. ESPN site API is reachable without a key but Disney terms restrict commercial and AI use; use it only as a non-displayed sanity-check lead, if at all."
 },
 "needs": [
  {
   "need": "schedule_and_live_scores",
   "provider": "SportsDataIO",
   "endpoint": "GET https://api.sportsdata.io/v3/mma/scores/json/Schedule/{league}/{season} ; GET /v3/mma/scores/json/Event/{eventid} ; live: GET /v3/mma/stats/json/Fight/{fightid}",
   "auth": "Ocp-Apim-Subscription-Key header or key query param (paid MMA subscription; free trial is UEFA Champions League only)",
   "fieldMapping": {
    "card_id": "Event.EventId",
    "league_id": "Event.LeagueId (league path param, e.g. UFC; do not assume other promotions are covered)",
    "card_name": "Event.Name",
    "card_start": "Event.DateTime (US Eastern Time per data dictionary; convert to UTC with America/New_York tz rules)",
    "card_status": "Event.Status (Scheduled, In Progress, Final, Postponed, Canceled)",
    "bout_id": "Fight.FightId",
    "bout_order": "Fight.Order",
    "bout_status": "Fight.Status (Scheduled; Pre-fight; Walkouts; Intros; In Progress; End of Round; Final; Canceled; NULL)",
    "weight_class": "Fight.WeightClass",
    "card_segment": "Fight.CardSegment",
    "fighters": "Fight.Fighters[] (FighterInfo)"
   },
   "idRules": "EventId=card, FightId=bout, FighterId=athlete; integers assigned by provider. Key bouts by FightId, never by name pair.",
   "statusRules": "Treat NULL status as unknown, not scheduled. Canceled events/fights are retained for reference only (data dictionary). Deleted=true means soft-deleted: purge from display.",
   "coverage": "documented-only; not live-tested (HTTP 401 without key)",
   "nullSemantics": "NULL DateTime = time TBD; NULL Status = unknown"
  },
  {
   "need": "injuries_withdrawals",
   "provider": "SportsDataIO",
   "endpoint": "Derived from Fight/Event endpoints above (no MMA injuries endpoint listed in the MMA API docs)",
   "auth": "as above",
   "fieldMapping": {
    "bout_active": "Fight.Active ('Indicates the fight is still active')",
    "fighter_listed": "Fight.Fighters[].Active ('Indicates the fighter is still listed for this fight')",
    "bout_canceled": "Fight.Status == 'Canceled'"
   },
   "idRules": "Withdrawal = FighterInfo.Active false or replaced FighterId on same FightId; cancellation = Status Canceled / Active false",
   "statusRules": "No injury reason/body-part field documented; display 'withdrawn/replaced' only, never infer injury cause. ESPN /news is unstructured editorial text, not an injury feed.",
   "coverage": "documented-only",
   "nullSemantics": "Absence of a structured reason = 'reason not reported'"
  },
  {
   "need": "opponent_quality_history",
   "provider": "SportsDataIO",
   "endpoint": "GET /v3/mma/scores/json/Fighter/{fighterid} ; /v3/mma/scores/json/Fighters ; FighterInfo inside Fight",
   "auth": "as above",
   "fieldMapping": {
    "pre_fight_record": "FighterInfo.PreFightWins/PreFightLosses/PreFightDraws",
    "fighter_id": "FighterId"
   },
   "idRules": "Build opponent-quality from historical FightId results joined on FighterId; snapshot PreFight* to avoid look-ahead leakage in backtests",
   "coverage": "documented-only; depth of pre-UFC/regional history not verified",
   "nullSemantics": "NULL PreFight* = unknown, not zero"
  },
  {
   "need": "historical_results",
   "provider": "SportsDataIO",
   "endpoint": "GET /v3/mma/stats/json/FightFinal/{fightid} ; Schedule/{league}/{season} for past seasons",
   "auth": "as above",
   "fieldMapping": {
    "winner_id": "Fight.WinnerId",
    "method": "Fight.ResultType (No Contest; Decision; Submission; KO/TKO; Decision - Majority/Unanimous/Split; Draw; DQ)",
    "end_round": "Fight.ResultRound",
    "end_clock_s": "Fight.ResultClock (seconds)"
   },
   "idRules": "Settle predictions on Status Final only",
   "statusRules": "No Contest and Draw: WinnerId NULL -> prediction graded 'void', excluded from accuracy denominator and shown explicitly; Canceled -> void and refund policy per site rules; DQ counts as win for WinnerId",
   "coverage": "documented-only",
   "nullSemantics": "WinnerId NULL with Final = draw/NC; check ResultType"
  },
  {
   "need": "comparison_odds",
   "provider": "The Odds API v4",
   "endpoint": "GET https://api.the-odds-api.com/v4/sports/mma_mixed_martial_arts/odds?regions={us|uk|eu|au}&markets=h2h ; GET /v4/sports (free, no quota)",
   "auth": "apiKey query param or x-api-key header (free Starter plan 500 credits/month per pricing page)",
   "fieldMapping": {
    "odds_event_id": "id (provider string; not equal to SportsDataIO FightId)",
    "commence_time": "commence_time (ISO-8601 UTC)",
    "fighters": "home_team / away_team (fighter names; ordering not semantic for MMA)",
    "book": "bookmakers[].key/title",
    "prices": "bookmakers[].markets[key=h2h].outcomes[].name/price",
    "freshness": "bookmakers[].markets[].last_update (UTC)"
   },
   "idRules": "Map to FightId by (normalized fighter names + commence_time within card window); store mapping table; manual review on misses",
   "statusRules": "/odds excludes completed events; show 'odds as of last_update', never as live if stale",
   "coverage": "documented-only (HTTP 401 without key); sport key mma_mixed_martial_arts documented. Covers MMA broadly, not UFC-only; MMA scores-endpoint coverage not verified",
   "nullSemantics": "Missing bookmaker/market = not offered"
  }
 ],
 "accessStatus": {
  "sportsdataio": "documented-only (live request 401 'API key missing in request')",
  "theOddsApi": "documented-only (live request 401 MISSING_KEY)",
  "espnSiteApi": "live-tested (HTTP 200 scoreboard and news, no key) - but not cleared for use"
 },
 "rightsStatus": {
  "sportsdataio": "unclear",
  "theOddsApi": "confirmed",
  "espn": "restricted"
 },
 "rightsEvidence": [
  {
   "provider": "The Odds API",
   "url": "https://the-odds-api.com/terms-and-conditions.html",
   "display": "Displaying our data in a UI, website, or mobile app, including for commercial use",
   "retention": "Storing our data and retaining it indefinitely",
   "aiModel": "Using our data to train statistical and machine learning models",
   "restriction": "Do not resell, repackage, or redistribute our data as a standalone data product."
  },
  {
   "provider": "SportsDataIO",
   "url": "https://sportsdata.io/developers/api-documentation/mma",
   "display": "No public data-licence clause found for commercial display, retention or AI use; public page notes: 'The SportsDataIO API Free Trial only provides access to the UEFA Champions League (Competition ID: 3)'. https://sportsdata.io/terms-of-service is a website ToS; data rights must come from the subscription agreement.",
   "retention": "unclear",
   "aiModel": "unclear"
  },
  {
   "provider": "ESPN (Disney)",
   "url": "https://disneytermsofuse.com/english/",
   "note": "https://www.espn.com/terms-of-use returned 403 to this fetch; Disney terms applicable to Disney Products were read instead (link from ESPN not verified in this run).",
   "display": "personal, noncommercial use only",
   "commercial": "or build a business utilizing the Disney Products",
   "aiModel": "fine-tuning, training, testing, benchmarking or validation of any artificial intelligence or machine learning tool"
  }
 ],
 "observations": [
  {
   "url": "https://site.api.espn.com/apis/site/v2/sports/mma/ufc/scoreboard",
   "method": "GET",
   "retrievedUtc": "2026-11-26T03:01:36Z",
   "http": 200,
   "sha256": "4eb61679201419b938a0a84dd465f2cd4329eab3b93547dab044b8ac11ffa0a3",
   "bytes": 37440,
   "excerpt": "{\"leagues\":[{\"id\":\"3321\",\"uid\":\"s:3301~l:3321\",\"name\":\"Ultimate Fighting Championship\" ... events[0]: id 600062700, date 2026-12-05T15:00Z, name 'UFC Fight Night: Adesanya vs Magomedov', 14 competitions (bouts), e.g. competition id 401936473 Rębecki (21-5-0) vs Brener (17-6-0), Lightweight, STATUS_SCHEDULED, ANB Arena Riyadh",
   "freshness": "upcoming card; card id (e:) and bout id (c:) are distinct in uid; no per-response update timestamp"
  },
  {
   "url": "https://site.api.espn.com/apis/site/v2/sports/mma/ufc/news",
   "method": "GET",
   "retrievedUtc": "2026-11-26T03:01:36Z",
   "http": 200,
   "sha256": "7de7889418c2b8a5948a70a2976b6c85ff02a13ea08e2da7179e399e53650c1f",
   "bytes": 19160,
   "excerpt": "articles[0] id 50600403 published 2026-11-26T02:34:36Z 'Kiwis Carlos Ulberg, Navajo Stirling won't fight each other for UFC title'",
   "freshness": "newest article ~27 min before fetch; unstructured text"
  },
  {
   "url": "https://api.sportsdata.io/v3/mma/scores/json/Schedule/UFC/2026",
   "method": "GET",
   "retrievedUtc": "2026-11-26T03:01:36Z",
   "http": 401,
   "sha256": "5fd310c61d399e5e74285c06ec1c08708a915b2625eb188b2e4643280ead31c4",
   "excerpt": "{\"HttpStatusCode\":401,\"Code\":401,\"Description\":\"API key missing in request\"",
   "freshness": "n/a - not coverage"
  },
  {
   "url": "https://api.the-odds-api.com/v4/sports/mma_mixed_martial_arts/odds?regions=us",
   "method": "GET",
   "retrievedUtc": "2026-11-26T03:01:36Z",
   "http": 401,
   "sha256": "2141792e2ef818edfee9c2d33ddc76a7c7cec150d853c5d1942e090acad0aa09",
   "excerpt": "{\"message\":\"API key is missing\",\"error_code\":\"MISSING_KEY\"",
   "freshness": "n/a - not coverage"
  },
  {
   "url": "https://api.the-odds-api.com/v4/sports",
   "method": "GET",
   "retrievedUtc": "2026-11-26T03:01:37Z",
   "http": 401,
   "sha256": "2141792e2ef818edfee9c2d33ddc76a7c7cec150d853c5d1942e090acad0aa09",
   "excerpt": "same MISSING_KEY body",
   "freshness": "n/a"
  }
 ],
 "cachePolicy": {
  "theOddsApi": {
   "quota": "Starter FREE 500 credits per month; paid tiers 20K-15M credits (pricing page https://the-odds-api.com/, observed 2026-11-26). /odds cost = 1 per region per market; /v4/sports free; scores 1 (2 with daysFrom); historical odds paid plans only, from 2020-06-06",
   "headers": "x-requests-remaining, x-requests-used, x-requests-last",
   "suggestedTtl": "pre-card odds 15-30 min, fight week 5 min; cache shared across users; retention permitted indefinitely",
   "source": "https://the-odds-api.com/liveapi/guides/v4/"
  },
  "sportsdataio": {
   "quota": "unknown (subscription-specific)",
   "suggestedTtl": "schedule 1-6 h, fight-night live 30-60 s on Fight endpoint, finals immutable once IsClosed/Final",
   "source": "unknown - not documented publicly in pages read"
  },
  "espn": {
   "quota": "unknown; undocumented API"
  }
 },
 "crossCheck": {
  "event": "UFC Fight Night: Adesanya vs Magomedov, 2026-12-05, ANB Arena, Riyadh",
  "primary": "ESPN scoreboard (observation 1): date 2026-12-05T15:00Z, venue ANB Arena Riyadh",
  "independent": {
   "url": "https://en.wikipedia.org/w/index.php?title=2026_in_UFC&action=raw",
   "retrievedUtc": "2026-11-26T03:03:08Z",
   "http": 200,
   "sha256": "8998f920c3509d57493f7703df0e64153660b214da53e1cbbe6c9eef5fa0520a",
   "excerpt": "|[[UFC Fight Night 295|UFC Fight Night: Adesanya vs. Magomedov]] |{{dts|2026|Dec|5}} |[[ANB Arena]] |[[Riyadh]]"
  },
  "result": "Schedule (date/venue/name) agrees. Community-edited source, so provenance is secondary. No completed result cross-checked: the event is upcoming and neither licensed provider could be queried without a key. ufc.com/events returned 403."
 },
 "gaps": [
  "No SportsDataIO MMA key: field names come from the data dictionary only; actual coverage, latency and non-UFC promotions (league ids) are unverified",
  "SportsDataIO commercial display/retention/AI rights unclear until the licence agreement is reviewed",
  "No structured MMA injury reason field found; only withdrawal/cancellation signals",
  "The Odds API MMA scores endpoint coverage and bookmaker depth for MMA not verified",
  "Sportradar MMA not evaluated (two-provider limit)",
  "ESPN API is undocumented and Disney terms restrict commercial/business and AI use; do not display or feed models with it without a licence"
 ],
 "nextSteps": [
  "Obtain a SportsDataIO MMA subscription (or Replay) and written confirmation of commercial display, caching/retention and AI-model use; store key as server-side secret SPORTSDATAIO_KEY",
  "Create a The Odds API key (server-side secret ODDS_API_KEY); call /v4/sports to confirm mma_mixed_martial_arts is active; then probe /odds and /scores",
  "Build FightId<->odds id mapping table with name normalization and commence_time window",
  "Implement grading: Final + WinnerId -> win/loss; No Contest/Draw/Canceled -> void",
  "Log x-requests-remaining and alert below 20%"
 ]
}