Developer's Program

L:
W:
Type:
XML or
JSON

To use MyFantasyLeague.com Developer's Program Data:

Anyone is free to use this data virtually any way you'd like, so long as you're helping make the MyFantasyLeague.com experience better for our customers. But, we don't offer any guarantees for this service. In spite of our best efforts, this service may occasionally be unavailable, or change, or there might be other problems with it - so keep that in mind when designing your application. Finally, we might change how our API works in the future, or even these terms, so please keep that in mind, too.

You're now looking at data for the 2008 season. If you'd like to see data for another season, simply change the URL above from http://football.myfantasyleague.com/2008/export to another 4-digit year.

Select the data type you'd like to see data for (detailed explanations of the data types follow).

Optionally, enter the 5-digit league id of the league you'd like data for. Data types that have an (L) listed next to them require a league ID to be entered.

Optionally, enter the week number of the week you'd like data for. Data types that have an (W) listed next to them optionally allow the week parameter to be entered. If the week is not entered, the system defaults to the current week.

Select if you want XML (the default) or JSON data for your results.

Press the "Get Data" button.

We're always interested in improving our developer's program export functionality - if you're using this feed, and would like to see more data added to it, please let us know by submitting a support ticket to us! But, we cannot re-distribute player news articles, or raw NFL stats.
While we cannot provide raw stats via this API, here are two inexpensive alternatives for getting raw statistics:

Note: To prevent either intentional or unintentional abuse of this facility, we're limiting you to 12000 requests of this program per league in any given rolling 24 hour period.

Your application will perform much faster, and you'll have a far smaller chance of hitting the above limit,
if you do some level of data caching inside your application or your database. For example, our player database only can ever change once per day - if you cache our player database, and only re-read it when it's more than a day old,
you'll make far fewer requests than if you re-read it any time you need it. The same can be true of other data that does not change frequently, like league rules and league scoring systems.

Your application needs to be able to handle redirects to use this developer's program. In other words, you might make a request for league ID 12345's data from football.myfantasyleague.com, and we might be respond with a redirect to football2.myfantasyleague.com. So, all future requests for league 12345's data should be to football2.myfantasyleague.com, and not football.myfantasyleague.com - this will make your application run faster, as it no longer has to get a redirect from the football.myfantasyleague.com server.

If you're a developer with experience on any of the popular smartphone platforms (iPhone/iPad/iPod, Android, Blackberry, Windows, etc.), we'd love to hear from you to discuss the possibility of offering a native application on one of those platforms.

All MyFantasyLeague.com timestamps are in Unix-standard time format. Most programming libraries have functions for converting time to and from this format.

If you'd like to create a live draft client (or, a live chat client) for a MyFantasyLeague.com league, see this FAQ for details on how to do that.

Our goal is to have your application development efforts be successful, and then ultimately get your application
into the hands of our customers. To that end, once your application is completed, we have several ways to help you
promote your application to our customers, including mentioning it in the footer of system-generated emails, and also add it to the "For Owners > Premium Products" page. So, once your application is done, be sure to let us know about
it so we can work with you to promote it.

Details Regarding Data Types Available:

players:
All player IDs, names and positions that MyFantasyLeague.com has in our database for the current year. All other data types refer only to player IDs, so if you'd like to later present any data to people, you'll need this data type for translating player IDs to player names. Our player database is updated at most once per day, and it contains more than 2,000 players - in other words, you're strongly encouraged to read this data type no more than once per day, and store it locally as needed, to optimize your system performance. If you just want to get details on a few specific player IDs, rather than our whole player database, you can pass in an optional PLAYERS= parameter. If you just want updates to our player database since a certain period of time in the past, you can pass in an optional SINCE= parameter. If you'd like to get additional details regarding players (including player IDs from other systems to allow you to map player IDs to our player database), use the DETAILS=1 parameter. Sample Document, Sample Document with PLAYERS parameter, Sample Document with SINCE parameter, Sample Document with DETAILS parameter

allRules:
All scoring rules that MyFantasyLeague.com currently supports, including: if the rule is scored for players, teams or coaches, as well as an abbreviation of the scoring rule, a short description, and a detailed description. If you plan on using the 'rules' data type, you'll also need this data type to look up the abbreviations to translate them to their detailed description for people. Sample Document

injuries:
The player ID, status (IR, Out, Questionable, Doubtful, Probable) and details (i.e., 'Knee', 'Foot', 'Ribs', etc.) of all players on the official NFL injury report. This report is typically issued once a week in-season, on Fridays, so there is no need to get this data more frequently than that - the timestamp attribute tells you the last time this data was updated. The week parameter defaults to the most recent week that injury data is available, but can be passed in to get data for a different week. Sample Document (Week number is an optional parameter)

nflSchedule:
The NFL schedule for one week of the season, including the scheduled kickoff of the game, how many seconds remain in the game, the home team (and their score), the away team (and their score). The default week is the current week of the season, however, the week parameter can be passed in to get the NFL schedule for other weeks. Sample Document (Week number is an optional parameter)

adp:
ADP results, including when the result were last updated, how many drafts the player was selected in, the average pick, minimum pick and maximum pick. FRANCHISES is an optional parameter you can pass in with this document type to indicate that you want to limit the data to leagues of a certain number of franchises. Other optional flag parameters include IS_MOCK, IS_PPR, IS_KEEPER and TIME. The IS_* parameters have valid values of 0 or 1, so for example, if you only wanted to look at mock drafts, you'd pass in IS_MOCK=1, if you only wanted to look at real drats, you'd pass in IS_MOCK=0, and if you wanted to look at all drafts, you wouldn't pass in the IS_MOCK parameter. The TIME= paramter corresponds to the cutoffs used on the ADP page. The DAYS= parameter can be one of the following: 1, 7, 14, or 30, and you'll get only data from drafts that have started within that number of days ago from today. Sample Document

aav:
AAV results, including when the result were last updated, how many auctions the player was selected in and the average auction value. FRANCHISES is an optional parameter you can pass in with this document type to indicate that you want to limit the data to leagues of a certain number of franchises.Sample Document

topAdds:
The most-added players across all MyFantasyLeague.com-hosted leagues, as well as the percentage of leagues that they've been added in. Only players that have been added in more than 2% of our leagues will be displayed. This data would be helpful in creating some sort of "Who's Hot?" list. Sample Document (Week number is an optional parameter)

topDrops:
The most-dropped players across all MyFantasyLeague.com-hosted leagues, as well as the percentage of leagues that they've been dropped in. Only players that have been dropped in more than 2% of our leagues will be displayed. This data would be helpful in creating some sort of "Who's Cold?" list. Sample Document (Week number is an optional parameter)

topStarters:
The most-started players across all MyFantasyLeague.com-hosted leagues, as well as the percentage of leagues that they've been started in. Only players that have been started in more than 1% of our leagues will be displayed. Sample Document (Week number is an optional parameter)

topOwns:
The most-owned players across all MyFantasyLeague.com-hosted leagues, as well as the percentage of leagues that they're owned in. Only players that are owned in more than 1% of our leagues will be displayed. Sample Document (Week number is an optional parameter)

league:
General league setup parameters for a given league, including: league name, roster size, IR/TS size, starting and ending week, starting lineup requirements, franchise names, division names, and more. Sample Document. Optionally, you can pass in the PASSWORD= parameter (with your commissioner's password, or the franchise password, along with the FRANCHISE= parameter), and that will allow you to view otherwise private owner information, like owner names, email addresses, etc. (5-digit league ID is required)

myleagues:
All of the leagues that the current session is logged into. Sample Document

rules:
League scoring rules for a given league. To understand the scoring rule abbreviations in this document, see the allRules document type above. Sample Document (5-digit league ID is required)

rosters:
The current rosters for all franchises in a league, including player status (active roster, IR, TS), as well as all salary/contract information for that player. The FRANCHISE= parameter can optionally be passed in to request the current roster of just one franchise. Sample Document (5-digit league ID is required)

standings:
The current league standings for a given league. Sample Document. See below for attribute description. (5-digit league ID is required)

all_play_w = The number of all-play wins for a franchise, assuming a franchise played all other franchises each week of the season

all_play_l = The number of all-play losses for a franchise, assuming a franchise played all other franchises each week of the season

all_play_t = The number of all-play ties for a franchise, assuming a franchise played all other franchises each week of the season

weeklyResults:
The weekly results for a given league/week, including the scores for all starter and non-starter players for all franchises in a league. The "W" parameter can be "YTD" to give all year-to-date weekly results. Sample Document (5-digit league ID is required) (Week number is an optional parameter)

liveScoring:
Live scoring for a given league and week, including each franchise's current score, how many game seconds remaining that franchise has, players who have yet to play, and players who are currently playing. Passing in an optional DETAILS=1 parameter will allow you to see live scoring for non-starters, too. Sample Document (5-digit league ID is required) (Week number is an optional parameter)

playerScores:
All player scores for a given league/week, including all rostered players as well as all free agents. Sample Document. A W=YTD parameter can be used for year-to-date scores, or W=AVG for weekly average scores. In addition, passing in the PLAYERS= parameter allows you to see the player scores for those specific players for all weeks of the season, year-to-date. COUNT, POSITION and STATUS=freeagent parameters supported. Sample Document (Week number is an optional parameter)

draftResults:
Draft results for a given league. Sample Document (5-digit league ID is required)

futureDraftPicks:
Future draft picks for a given league. Sample Document (5-digit league ID is required)

auctionResults:
Auction results for a given league. Sample Document (5-digit league ID is required)

freeAgents:
Fantasy free agents for a given league. POSITION is an optional parameter to allow you to filter by position. Sample Document (5-digit league ID is required)

transactions:
All transactions for a given league. Optional parameters you can pass in include: TRANS_TYPE (limit results to transactions of a certain type), FRANCHISE (limit results to transactions intitiated by a certain franchise id), DAYS (limit results to transactions done in the last x days) and COUNT (limit transactions to a certain number of transactions) Sample Document (5-digit league ID is required) (Week number is an optional parameter)

rss:
An RSS feed of key league data for a given league, including: league standings, current week's live scoring, last week's fantasy results, and the five newest message board topics. Sample Document (5-digit league ID is required)

projectedScores:
Given a player ID and projected raw stats for that player for a given week of the season, calculate the expected fantasy points, using that league's scoring system. If no raw stats are provided, the system will use the raw stats that fantasysharks.com projects for the upcoming week (or, any prior week using the W= parameter) of the season. COUNT, POSITION and STATUS=freeagent parameters supported. Sample Document with raw stats provided (5-digit league ID is required) (Week number is an optional parameter)

leagueSearch:
Given a case-insensitive search string, find all leagues named with that search string on MyFantasyLeague.com. Search string must be at least three characters long. Note that the search string can either be the league name, or the league commissioner's email address, or an owner's email address. In the case of email addresses, this will effectively allow you to query our database for all leagues associated with a given customer. Sample Document

messageBoard:
Display a summary of the recent message board posts to a league message board. COUNT is an optional parameter to indicate the number of threads to display - the default is the 10 most recent threads. Sample Document (5-digit league ID is required)

messageBoardThread:
Display posts in a thread from a league message board. Sample Document (5-digit league ID is required)

playerProfile:
Display a summary of information regarding a player, including DOB, ADP ranking, height/weight. Sample Document (P= can contain a comma-delimited list of player ids to get multiple player profiles)

playerStatus:
Get the player's current status - locked, free agent, on a roster, etc. Sample Document (P= can contain a comma-delimited list of player ids to get multiple player statuses) (5-digit league ID is required)

accounting:
Display a summary of the league accounting records. Sample Document (5-digit league ID is required)

calendar:
Display a summary of the league calendar. Sample Document (5-digit league ID is required)

ics:
Display a summary of the league calendar in .ics format, which is suitable for importing into many modern calendaring programs, like Apple's Calendar, Google Calendar, Microsoft Outlook, and more. Sample Document (5-digit league ID is required)

pointsAllowed:
Fantasy points allowed by each NFL team, broken out by position. Sample Document (5-digit league ID is required)

pendingTrades:
Pending trades that the current franchise has offered to other franchises, or has been offered to by other franchises. To identify what franchise you'd like to see pending trade information for, you must programmatically log into the site. (5-digit league ID is required)

tradeBait:
The Trade Bait for all franchises in a league. (5-digit league ID is required)

myWatchList:
My Watch List for the current franchise. To identify what franchise you'd like to see My Watch List information for, you must programmatically log into the site. (5-digit league ID is required)

myDraftList:
My Draft List for the current franchise. To identify what franchise you'd like to see My Watch List information for, you must programmatically log into the site. (5-digit league ID is required)

whoShouldIStart:
Site-wide 'Who Should I Start?' data - offering a comparison between any two players at the same position, letting you know what percent of all MFL customers would choose one player over another player. You can filter to display only one franchises' worth of players using the F= parameter, or based on a list of player ids using the PLAYERS= parameter. Sample Document (Week number is an optional parameter)