API Documentation Results V.3 April 2016 FightMetric API Page | 2 Welcome to the FightMetric API If you’re reading this, we’ve already spoken to you about data access & use rights. If not, turn back now and shoot us an email and we’ll work it out. Welcome to the easiest way to access FightMetric’s data for your digital application. How to use this document. Read this intro section so you understand the basics of the API. When you are constructing a call, consult the page for that call, but ignore ‘Output’ description initially. It’s really long. Use it instead as a reference if you have a question about what the data means or what it covers. For example, “What time zone is the ‘EventTime’ in?” (EST, by the way). What is in the API? The API delivers all of our data in JSON or XML – your choice – with a short set of easy-to-write server calls. All requests must be secure and we don’t cache our data on a proxy server or CDN, so there is no lag. You can get anything here from results. Authentication To access the API you will need an ID and Key, which are the username and password you’ll include in your requests. Authentication is done over Basic HTTP (https://ID:[email protected]/api). If you have not received a login for our authentication server, head to fightmetric.3scale.net and Sign Up for an account. One of our representatives will contact you. Once registered, you will be able to monitor your usage and update your information (including generating new keys). Access Limits Depending on your agreement with FightMetric, your organization will either have hard or soft capped API access. Users with a hard cap will be denied access once they have reached their usage limits. Soft capped clients will not be denied access but will be contacted by FightMetric representatives for a usage review. PROPRIETARY & CONFIDENTIAL – COVERED BY AGREEMENT FightMetric API Page | 3 API Structure https://api.fightmetric.com/api/modifier/ID.json?option=value&option=value To keep the API simple, we’ve kept our calls to the three basic things that users want to know about - /event, /fight, and /fighter. You select the format through the file extension - .json or .xml - to permit easy file naming. Then we added a call so you could find out what’s been updated in case you are keeping – for example – a fantasy game up to date. The basic calls are: api.fightmetric.com/api/updates.json api.fightmetric.com/api/event/list.json api.fightmetric.com/api/event/detail/<id>.json api.fightmetric.com/api/fight/detail/<id>.json api.fightmetric.com/api/fighter/list.json api.fightmetric.com/api/fighter/detail/<id>.json. Each of the calls has modifiers than can be added singly or in groups as key/value pairs at the end of the URL. So api.fightmetric.com/api/event/list.json?type=upcoming&org=ufc would return all upcoming UFC events. File Structure Files are JSON or XML with nested nodes that include arrays where there is more than one of an item. For example, there is an array of fights for each event and an array of fighters for each fight. That is true even though there are a variable number of fights in an event and only two fighters in any fight. PROPRIETARY & CONFIDENTIAL – COVERED BY AGREEMENT FightMetric API Page | 4 Function Calls /updates.json Description Returns the IDs of the most recently updated events, fights or fighters. The system makes a seed call to https://api.fightmetric.com/api/updates.json with no arguments to collect the timestamp of the latest publish (CurrentTS). From this point forward, the system can periodically make calls to the same endpoint specifying the timestamp (https://api.fightmetric.com/api/updates.json?ts=YYYY-MMDDTHH%3AMM%3ASSZ). Note that you need to URL encode the value from CurrentTS to make the call. In this case, ":" just need to be replaced by "%3A". Sample /api/updates.json?ts=YYYY-MM-DDTHH%3AMM%3ASSZ Default Value Timestamp of the latest publish along with the IDs in that publish. Options ts YYYY-MM-DDTHH%3AMM%3ASSZ - limited to two weeks old. Output Events List of Event IDs changed in the time period Fighters List of Fighter IDs changed in the time period Fights List of Fight IDs changed in the time period CurrentTS Always in Zulu PROPRIETARY & CONFIDENTIAL – COVERED BY AGREEMENT FightMetric API Page | 5 event/list Description Provides a list of events, including time and date, but not including fight information. Sample /api/event/list.json?type=upcoming&org=ufc Default Value Top 10 events, sorted by descending date. It starts with all the upcoming events first. Options type type=(upcoming/completed/all) – limits results to events >= today’s date or <= today’s date. Default is all. organization org=ufc - show only UFC events. UFC is currently the only Organization a user can identify. Default shows events for all promotion and organizations. start/end start=## and end=## - intended primarily for pagination, takes the start and end record numbers to return. Default is 10 events. sort/order sort_by=<field> and order=(asc/desc ) - enter a field name and sort order. Default is sort=date, order=desc. query Add search string. Searches name and organization. show canceled By default, we do not display canceled events. If you want to show event status, add show_canceled =1. show ufc record By default, we show the UFC name of an event. Set show_ufc_record=0 to show the standard event name. Output EventID Unique FightMetric ID Name Date Always in EST Time Always in EST. GMT The event date and time in GMT. Organization – OrganizationID and Name FightMetric Unique Organization ID and fight promoter name. Location – City, State, Country, Venue Event location. Any of these values may be null. Attendance Updated where available after an event. PROPRIETARY & CONFIDENTIAL – COVERED BY AGREEMENT FightMetric API Page | 6 event/detail Description Provides details of a single event, including all fights at the event. Information about fights includes fighter records before the fight, and results (winner, time, round, and method) when the fight is complete. Sample /api/event/detail/###.json?show_card Default Value A user must enter an ID or “next”/”last” to receive a response. Options Next/Last As a shortcut, users can call /api/event/detail/next.json or /api/event/detail/last.json to get information about the next or last event without needing an ID. Organization org=ufc - show only UFC events. Currently, UFC is the only organization users can specify. Works with next/last to show the next/last ufc event. Fight Order show_order = 1 – show Fight Display Order. This is visible by default. Set to 0 to hide. Hide Fight Card hide_fight_card = 1 – hide the fights. Show UFC record show_ufc_record is set to 1 and – substitutes the UFC’s record for event name and fighter names and records for the FightMetric record . Set to 0 to see the info as generally reported in the MMA community. Show Canceled To see whether a fight at the event has been canceled, set show_canceled = 1. Output EventID Unique FightMetric Event ID Name Date Always in EST. Time Always in EST. Organization – OrganizationID and Name FightMetric Unique Organization ID and fight promoter name. Location – City, State, Country, Venue Event location. Any of these values may be null. Attendance Updated where available after an event. FightCard Container for array of Fight elements FightID Unique FightMetric Fight ID PROPRIETARY & CONFIDENTIAL – COVERED BY AGREEMENT FightMetric API Page | 7 Fighters Container for array of Fighter elements. There are 2 per fight. One may have a FighterID = 0 and Fighter = TBD if the fighter is not announced. FightOrder The fight’s order on the card. Fight number 1 is the main event, 2 is the co-main event and so on, so that the first fight of the night has the highest number. The main event is always 1. FighterID Unique FightMetric Fighter ID. Name – FirstName, LastName, and NickName. Fighter Name. NickName may be null. By default, these are the UFC’s record of the fighter’s names. Born – City, State, Country, TriCode City of the Fighter’s birth. Any of the elements may be null. TriCode is the Olympic 3 character code. FightingOutOf - City, State, Country, TriCode City of the Fighter’s current activity. Any of the elements may be null. TriCode is the Olympic 3 character code. Age May be null. DOB Date of Birth. May be null. WeighIn Weigh-In weight for this fight in pounds. NOTE: Not the fighter’s general weight. Just the weight for this fight. Height In inches. May be null. Reach Length of a Fighter’s reach in inches. May be null. NOTE: Shows UFC reach by default. Stance May be null. Record – Wins, Losses, Draws, NoContests. Professional MMA records (i.e. across all organizations). NOTE: This is a fighter’s record maintained by UFC by default. To see the generally accepted record, set show_ufc_record = 0 Outcome – OutcomeID, Outcome If the fight is over, shows the winner and loser. The ID is included so users can order fighters by winners first if they wish. SubmissionOfTheNight UFC award. Null unless set to 1. Only 1 fighter in a fight may have this. KOOfTheNight UFC award. Null unless set to 1. Only 1 fighter in a fight may have this. PerformanceOfTheNight This award replaced the UFC’s KO and Submission of the night awards. We maintain all three so we can accurately record all awards. UFC Link Link to the Fighter’s page on UFC.com where available. This disappears if show_ufc_record =0 UFC Weight Class This section refers not to the fight, but to the fighter. This is the UFC’s weight class association for the fighter. WeightClass – WeightClassID, WeightClassDescription Weight class of the fight. Accolade – AccoladeID, Description Null unless the fight is for a weight or tournament belt. Result Container for the fight result. PROPRIETARY & CONFIDENTIAL – COVERED BY AGREEMENT FightMetric API Page | 8 Method One of a set of values denoting the method, such as KO/TKO, Submission, Decision – Unanimous, DQ, etc. EndingRound EndingTime The ending time in the ending round (i.e. not the total fight time). Submission If the method = submission, this provides submission details. EndingStrike If the method = KO/TKO or a Submission to strikes, this provides details on the ending strike EndingTarget If the method = KO/TKO, this provides details on the target of the ending strike. EndingPosition If method = KO/TKO or Submission, the fighters’ ending position. FightScores If method contains ‘decision’, this provides the “WinnerScore”, “LoserScore”, “JudgeFirstName”, and “JudgeLastName” Referee – RefereeID, RefereeFirstName, RefereeLastName May be null. FightOfTheNight UFC award. Assigned to the fight, not the fighters. Rulset - Possible Rounds Total number of possible rounds in the fight. Ruleset - Description Formatted : “ X Rnd (Rd1 – Rd2 – Rd3)” so a 3 round fight of 5 minute rounds would be “3 Rnd (5-5-5)” and a 5 round fight of 5 minute rounds would be “5 Rnd (5-5-5-5-5) PROPRIETARY & CONFIDENTIAL – COVERED BY AGREEMENT FightMetric API Page | 9 fight/detail Description Provides details of a single fight. Input requires a FightID. Before the fight, this displays the fighters’ information including height, weight, reach, etc. After the fight, it displays results. Sample /api/fight/detail/###.json Default Value A user must enter an ID to receive a response. Options Show UFC record show_ufc_record is set to 1 and – substitutes the UFC’s record for event name and fighter names and records for the FightMetric record . Set to 0 to see the info as generally reported in the MMA community. Output EventID Unique FightMetric Event ID Name Date Always in EST. Time Always in EST. GMT Date and time in GMT Status Under the event element, it's the status of the event. Under Fight, it is the status of the fight. The status is either Active or Canceled. FightID Unique FightMetric Event ID Fighter Container for array of Fighter elements. There are 2 per fight. One may have a FighterID = 0 and Fighter = TBD if the fighter is not announced. FighterID Unique FightMetric Fighter ID. MMAID The Fighter’s unique MMAID issued by the body sanctioned by the Association of Combat Sports Commissions Name – FirstName, LastName, and NickName. Fighter Name. NickName may be null. Born – City, State, Country, TriCode City of the Fighter’s birth. Any of the elements may be null. TriCode is the Olympic 3 character code. FightingOutOf - City, State, Country, TriCode City of the Fighter’s current activity. Any of the elements may be null. TriCode is the Olympic 3 character code. UFCLink Link to the fighter’s profile at ufc.com, where available. Age May be null. DOB Date of Birth. May be null. WeighIn Weigh-In weight for this fight in pounds. NOTE: Not the fighter’s general weight. Just the weight for this fight. Height In inches. May be null. PROPRIETARY & CONFIDENTIAL – COVERED BY AGREEMENT FightMetric API Page | 10 Reach Length of a Fighter’s reach in inches. May be null. Stance May be null. Record – Wins, Losses, Draws, NoContests. Professional MMA records (i.e. across all organizations). NOTE: This the UFC record by default. Set show_ufc_record = 0 to see the general community record instead. Outcome – OutcomeID, Outcome If the fight is over, shows the winner and loser. The ID is included so users can order fighters winners first if they wish. SubmissionOfTheNight UFC award. Null unless set to 1. Only 1 fighter in a fight may have this. KOOfTheNight UFC award. Null unless set to 1. Only 1 fighter in a fight may have this. FightOfTheNight UFC award. Assigned to the fight, not the fighters. PerformanceOfTheNight UFC Award. Replaces the KO and Submissions of the night. Older fights will show KO and Subs of the night. New fights will have these awards. WeightClass – WeightClassID, WeightClassDescription Weight class of the fight. Accolade – AccoladeID, Description Null unless the fight is for a weight or tournament belt. Result Container for the fight result. Method One of a set of values denoting the method, such as KO/TKO, Submission, Decision – Unanimous, DQ, etc. EndingRound EndingTime The ending time in the ending round (i.e. not the total fight time). Submission If the method = submission, this provides submission details. EndingStrike If the method = KO/TKO or a Submission to strikes, this provides details on the ending strike EndingTarget If the method = KO/TKO, this provides details on the target of the ending strike. EndingPosition If method = KO/TKO or Submission, the fighters’ ending position. FightScores If method contains ‘decision’, this provides the “WinnerScore”, “LoserScore”, “JudgeFirstName”, and “JudgeLastName” Referee – RefereeID, RefereeFirstName, RefereeLastName May be null. Possible Rounds Total number of possible rounds in the fight. Description Formatted : “ X Rnd (Rd1 – Rd2 – Rd3)” so a 3 round fight of 5 minute rounds would be “3 Rnd (5-5-5)” and a 5 round fight of 5 minute rounds would be “5 Rnd (5-5-5-5-5) FightOrder Fight card order for the fight. Fight 1 is the main event of the night. PROPRIETARY & CONFIDENTIAL – COVERED BY AGREEMENT FightMetric API Page | 11 fighter/list Description Provides a list of fighters, including basic biographical information, but not including fight history. Sample /api/fighter/list.json Default Value Top 25 fighters with last names starting with A. Options Type ‘first_letter’ refers to the first letter of the fighters’ last names. It must be coupled with the option ‘query’. ‘champions’ returns current belt holders. If coupled with org=ufc, it returns just the UFC champions. Organization org=ufc shows only UFC fighters. Query Use type=search or first_letter and enter the query after this option. Start/End Enter the start and end values you wish to see. Good for pagination. Sort & Order Enter the value to sort by and the order as ‘asc’ or ‘desc’. Sort values are: 'first_name', 'last_name', 'nick_name', 'height', 'weight', 'reach', 'stance', 'win', 'loss', 'draw', 'no_contest', 'age', 'dob', 'born_city', 'born_state', 'born_country' Show UFC record show_ufc_record is set to 1 and – substitutes the UFC’s record for event name and fighter names and records for the FightMetric record . Set to 0 to see the info as generally reported in the MMA community. UFC Active ufc_active =1 shows only fighters currently listed as active by UFC Output Fighter Container for array of Fighter elements. FighterID Unique FightMetric Fighter ID. Name – FirstName, LastName, and NickName. Fighter Name. NickName may be null. Born – City, State, Country, TriCode City of the Fighter’s birth. Any of the elements may be null. TriCode is the Olympic 3 character code. Age May be null. DOB Date of Birth. May be null. Weight Fighter’s general weight. Height In inches. May be null. Reach Length of a Fighter’s reach in inches. May be null. Stance Fighter stance – Orthodox, southpaw, switch, or open. Record – Wins, Losses, Professional MMA records (i.e. across all organizations). NOTE: This is a fighter’s PROPRIETARY & CONFIDENTIAL – COVERED BY AGREEMENT FightMetric API Page | 12 Draws, NoContests. record maintained by UFC. To see the generally accepted record, set show_ufc_record=0. Accolade – AccoladeID, Description Null unless the fighter is a champion. UFCWeightClass Shown by default. Provides the ID and description for the UFC weight class. PROPRIETARY & CONFIDENTIAL – COVERED BY AGREEMENT FightMetric API Page | 13 fighter/detail Description Provides details of a single fighter, including all biographical information and fight history information. Sample /api/fighter/detail/###.json Default Value A user must enter an ID to receive a response. Options Hide Fight List Set hide_fight_list=1 to hide a fighter’s fight history. Show UFC Record Defaults to show_ufc_record=1 and displays the UFC’s version of a fighter’s record. Show Canceled Not shown by default, add show_canceled=1 to add ‘Status’ to all fights. Otherwise, canceled fights are hidden and status (Active or Canceled) is not shown. Output Fighter Container for array of Fighter elements. There are 2 per fight. One may have a FighterID = 0 and Fighter = TBD if the fighter is not announced. FighterID Unique FightMetric Fighter ID. MMAID The Fighter’s unique MMAID issued by the body sanctioned by the Association of Combat Sports Commissions Name – FirstName, LastName, and NickName. Fighter Name. NickName may be null. Born – City, State, Country, TriCode City of the Fighter’s birth. Any of the elements may be null. TriCode is the Olympic 3 character code. FightingOutOf - City, State, Country, TriCode City of the Fighter’s current activity. Any of the elements may be null. TriCode is the Olympic 3 character code. Age May be null. DOB Date of Birth. May be null. WeighIn Weigh-In weight for this fight in pounds. NOTE: Not the fighter’s general weight. Just the weight for this fight. Height In inches. May be null. Reach Length of a Fighter’s reach in inches. May be null. Stance May be null. Record – Wins, Losses, Draws, NoContests. Professional MMA records (i.e. across all organizations). NOTE: This is a fighter’s generally accepted record and may not match the value maintained by UFC. UFCWeightClass The fighter’s UFC weight class. FightID Unique FightMetric Fight ID EventID Unique FightMetric Event ID PROPRIETARY & CONFIDENTIAL – COVERED BY AGREEMENT FightMetric API Page | 14 Name Date Always in EST. Time Always in EST. Outcome – OutcomeID, Outcome If the fight is over, shows the winner and loser. The ID is included so users can order fighters winners first if they wish. Opponent – FighterID, Name SubmissionOfTheNight UFC award. Null unless set to 1. Only 1 fighter in a fight may have this. KOOfTheNight UFC award. Null unless set to 1. Only 1 fighter in a fight may have this. FightOfTheNight UFC award. Assigned to the fight, not the fighters. PerformanceOfTheNight UFC award. Replaces KO and SUB of the night. Old fights will show the old awards; new fights will show this one. WeightClass – WeightClassID, WeightClassDescription Weight class of the fight. Accolade – AccoladeID, Description Null unless the fight is for a weight or tournament belt. Result Container for the fight result. Method One of a set of values denoting the method, such as KO/TKO, Submission, Decision – Unanimous, DQ, etc. EndingRound EndingTime The ending time in the ending round (i.e. not the total fight time). PROPRIETARY & CONFIDENTIAL – COVERED BY AGREEMENT
© Copyright 2025 Paperzz