Discover/Fantrax API
live

Fantrax APIfantrax.com

Access Fantrax fantasy sports data via API. Browse public leagues, fetch standings, retrieve draft picks, and get full league configs across MLB, NFL, NBA, and NHL.

Endpoint health
verified 3d ago
get_published_leagues
get_league_info
get_standings
get_draft_results
4/4 passing latest checkself-healing
Endpoints
4
Updated
26d ago

What is the Fantrax API?

The Fantrax API exposes 4 endpoints covering public commissioner leagues, detailed league configuration, current standings, and completed draft results across MLB, NFL, NBA, and NHL. The get_published_leagues endpoint returns every publicly listed league for a given sport with draft dates, scoring types, and team counts. The get_draft_results endpoint returns every individual pick with round number, pick position, team ID, and player ID.

Try it
Sport code. Accepted values: MLB, NFL, NBA, NHL.
api.parse.bot/scraper/ec650451-bfbe-461c-8acc-5af57ea14ad0/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/ec650451-bfbe-461c-8acc-5af57ea14ad0/get_published_leagues?sport=MLB' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace fantrax-com-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

from parse_apis.fantrax_api import Fantrax, Sport, LeagueListing, League, Standing, DraftResult

fantrax = Fantrax()

# List public MLB leagues
listing = fantrax.leaguelistings.list(sport=Sport.MLB)
print(listing.selected_sport, listing.displayed_text.heading)

for league in listing.all_leagues:
    print(league.name, league.id, league.num_teams, league.max_teams, league.full)

# Construct a league by ID and get its detailed info
league = fantrax.league(id=listing.all_leagues[0].id)
info = league.info()
print(info.league_name, info.season_year, info.draft_type)
print(info.roster_info.max_total_players, info.roster_info.max_total_active_players)

# Get standings for the league
for standing in league.standings():
    print(standing.rank, standing.team_name, standing.points, standing.games_back)

# Get draft results
draft = league.draft_results()
print(draft.draft_state, draft.draft_type, draft.draft_date)
for pick in draft.draft_picks:
    print(pick.round, pick.pick, pick.team_id, pick.player_id)
All endpoints · 4 totalmissing one? ·

Retrieve publicly listed commissioner leagues for a given sport. Returns league metadata including heading text, colour legend, and all available public leagues with their draft dates, scoring types, team counts, and commissioner names. Each league entry includes an id usable with other endpoints.

Input
ParamTypeDescription
sportstringSport code. Accepted values: MLB, NFL, NBA, NHL.
Response
{
  "type": "object",
  "fields": {
    "allLeagues": "array of league objects each with id, name, draftDate, scoringTypeId, draftTypeCode, maxTeams, numTeams, numOwnedTeams, publishedLeagueCommissionerName, draftTypeName, lineupChangesDisplay, full",
    "colourLegend": "object with alwaysShowOpener boolean and options array of colour labels",
    "displayedText": "object with heading and message strings describing the league listing",
    "selectedSport": "string, the sport code that was queried"
  },
  "sample": {
    "data": {
      "allLeagues": [
        {
          "id": "og4ngx2gmq6jgzc8",
          "full": false,
          "name": "H2H Dynasty 2026",
          "maxTeams": 18,
          "numTeams": 3,
          "draftDate": 1781964000000,
          "draftTypeCode": "LIVE_ONLINE",
          "draftTypeName": "Live Online Standard",
          "numOwnedTeams": 3,
          "scoringTypeId": "3",
          "lineupChangesDisplay": "Daily",
          "publishedLeagueCommissionerName": "Clintongoeb"
        }
      ],
      "colourLegend": {
        "options": [
          {
            "id": "AAFFAA",
            "label": "Playoff Leagues"
          },
          {
            "id": "CCE6FF",
            "label": "Fantrax 2-Week Leagues"
          }
        ],
        "alwaysShowOpener": false
      },
      "displayedText": {
        "heading": "MLB Baseball - Listed Commissioner Leagues",
        "message": "<span>Attention!!</span> These leagues were created..."
      },
      "selectedSport": "MLB"
    },
    "status": "success"
  }
}

About the Fantrax API

League Discovery and Configuration

The get_published_leagues endpoint accepts an optional sport parameter (MLB, NFL, NBA, or NHL) and returns an array of league objects under allLeagues. Each entry includes a unique id, name, draftDate, scoringTypeId, draftTypeCode, maxTeams, numTeams, and numOwnedTeams. The response also includes a colourLegend object with labelled options and a displayedText object with a heading and message string that mirrors what the Fantrax league listing page shows.

For deeper detail on any single league, get_league_info takes a league_id and returns the full configuration: leagueName, seasonYear, startDate, endDate, draftType, draftSettings, and a rosterInfo object that includes positionConstraints, maxTotalPlayers, and maxTotalActivePlayers. A teamInfo map keys team IDs to objects with name, division, and id. A playerInfo map keys player IDs to objects containing eligiblePos and status.

Standings and Draft Results

The get_standings endpoint returns an items array sorted by rank. Each entry carries teamName, teamId, points, gamesBack, and winPercentage. The points field format varies by league type: rotisserie leagues return numeric totals while head-to-head leagues return a W-L-T string.

get_draft_results returns a draftPicks array where each object includes round, pick, pickInRound, teamId, playerId, and time. The draftOrder array provides the full team sequence, and draftState confirms whether the draft is completed. This endpoint only returns data for leagues whose draft has already finished.

Reliability & maintenanceVerified

The Fantrax API is a managed, monitored endpoint for fantrax.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when fantrax.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official fantrax.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
3d ago
Latest check
4/4 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Identify publicly available leagues to join by filtering get_published_leagues results by scoringTypeId or draftTypeCode
  • Build a draft analysis tool using the draftPicks array with round, pick, and playerId fields from get_draft_results
  • Display live standings tables with rank, win percentage, and games back pulled from get_standings
  • Map roster depth and positional eligibility using the playerInfo object returned by get_league_info
  • Compare draft snake order across leagues by inspecting the draftOrder array alongside individual pick timestamps
  • Track season timelines by combining startDate, endDate, and seasonYear from get_league_info
  • Audit commissioner league settings such as maxTotalPlayers and positionConstraints to compare league structures
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Fantrax have an official public developer API?+
Fantrax does not publish an official public developer API or documentation for third-party access to its platform data.
What does `get_standings` return for different league formats?+
The endpoint returns an items array for all league types. The points field differs by format: rotisserie leagues populate it with a numeric score while head-to-head leagues return a W-L-T string. The rank, teamName, teamId, gamesBack, and winPercentage fields are present in both cases.
Does `get_draft_results` work for leagues whose draft is still in progress?+
No. The endpoint only returns pick data when draftState equals completed. For in-progress or scheduled drafts the response will not include draftPicks. The draftState field in the response tells you whether results are available.
Does the API cover private leagues or only public commissioner leagues?+
The API covers only publicly listed commissioner leagues surfaced by Fantrax. Private leagues, invite-only leagues, and leagues requiring login to view are not accessible. You can fork this API on Parse and revise it to add an endpoint that accepts session credentials if your use case requires private league data.
Is per-player stat data or scoring breakdowns available?+
Not currently. The API returns player IDs and eligible positions via the playerInfo map in get_league_info, and pick-level player IDs in get_draft_results, but does not expose per-player season stats, weekly scoring totals, or projection data. You can fork this API on Parse and revise it to add an endpoint targeting Fantrax player stat pages.
Page content last updated . Spec covers 4 endpoints from fantrax.com.
Related APIs in SportsSee all →
fantasypros.com API
Access expert consensus rankings, player projections, average draft position data, injury reports, and the latest player news from FantasyPros. Search by player name or position to retrieve detailed stats, rankings, and expert analysis across all major scoring formats.
fantasycalc.com API
Get real-time fantasy football player rankings and trade values based on thousands of actual league trades across Dynasty, Redraft, and Superflex formats. Search player statistics and track how often specific trades occur to make informed roster decisions.
footystats.org API
Get live football scores, team performance metrics, league standings, and head-to-head match statistics all in one place. Search teams and leagues to access detailed player stats, comprehensive analytics, and in-depth performance data across football competitions worldwide.
draftsharks.com API
Get comprehensive fantasy football insights by accessing redraft and dynasty rankings, player projections, injury histories, team depth charts, and strength-of-schedule analysis. Search player profiles and stay updated with the latest news articles to optimize your draft strategy and roster decisions.
soccerstats.com API
Access comprehensive soccer statistics including live league tables, match details, team performance metrics, and form rankings across multiple football leagues. Search for specific teams and analyze their season statistics, head-to-head records, and competitive standings to stay informed on the latest soccer data.
sports.ru API
Access football league standings, match results, player statistics, and upcoming fixtures from Sports.ru. Retrieve tournament tables, top scorers, detailed match information, and individual player profiles across major football leagues.
fotmob.com API
Get live football scores, detailed match results, and comprehensive league statistics across multiple competitions. Access player and team performance data, browse upcoming fixtures by date, and dive into in-depth analytics for your favorite leagues and matches.
teamcolorcodes.com API
Get official color codes for sports teams across NFL, NBA, MLB, NHL, NCAA, and international soccer leagues, then search and browse teams to find their exact hex and RGB colors. Perfect for designing fan apps, merchandise, or any project that needs authentic team branding information.