Immortal Rank Meta Trends API

Link: https://stats.spectral.gg/lrg2/immapi/

Global parameters

  • pretty - (flag) return data in tabulated form
  • patch - (string) patch version to fetch data from, supported values are shown in Patches endpoint, also can be “week” and “month”

Endpoints

Patches

  • Returns: object:

    {
    	"available": [ ...patchCodes ]
    }
    

Hero

  • hero - a comma delimited list of hero IDs (not required)

  • Returns: object:

    {
    	total: (int) number,
    	version: (string),
    	starting_time: (int),
    	response: {
    		<hero_id>: {
    			hero_id: (int),
    			wins: (int),
    			pick_rate: (float),
    			win_rate: (float),
    			matches: (int),
    			hero_tag: (string),
    		},
    		...
    	}
    }
    

HeroesPositions

  • hero - a comma delimited list of hero IDs (not required)

  • pos - a comma delimited list of positions codes (in format core.lane, like 1.2 for midlane core, 1.3 for offlane core, 0.0 for support) (not required)

  • Returns: object:

    {
    	total: (int) number,
    	version: (string),
    	starting_time: (int),
    	response: {
    		<heroid>: {
    			"0.0": [
    				{
    					hero_id: (int),
    					matches: (int),
    					ratio: (float),
    					wins: (int),
    					win_rate: (float)
    				},
    				...
    			],
    			"1.0"...
    		}
    	}
    }
    

HeroesPlayers

  • hero - a comma delimited list of hero IDs (required, max 10 IDs at once)

  • pos - a comma delimited list of positions codes (in format core.lane, like 1.2 for midlane core, 1.3 for offlane core, 0.0 for support) (not required)

  • Returns: object:

    {
    	total: (int) number,
    	version: (string),
    	starting_time: (int),
    	response: {
    		<heroid>: {
    			<playerid>: {
    				player_id: (int),
    				matches: (int),
    				wins: (int),
    				win_rate: (float),
    				nickname: (string)
    			},
    			...
    		}
    	}
    }
    

HeroesTogether

  • hero - hero ID (only one)
  • limit - number of records to get (min 0, max 100, defaults to 25)
  • offset - offset (defaults to 0)
  • Returns: object:
  {
	total: (int) number,
	limit: (int),
  	offset: (int),
	version: (string),
  	starting_time: (int),
	response: {
	  	<src_heroid>: {
	  		<heroid>: {
				hero_id: (int),
  				matches: (int),
				wins: (int),
  				win_rate: (float),
  				expectation: (int),
				same_lane_rate: (float),
  				wr_diff: (float)
			},
  			...
  		}
	}
  }

HeroesVersus

  • hero - hero ID (only one)
  • limit - number of records to get (min 0, max 100, defaults to 25)
  • offset - offset (defaults to 0)
  • Returns: object:
{
	total: (int) number,
	limit: (int),
  	offset: (int),
	version: (string),
  	starting_time: (int),
	  response: {
	  	<src_heroid>: {
	  		<heroid>: {
	  			hero_id: (int),
  				matches: (int),
  				wins: (int),
  				win_rate: (float),
  				expectation: (int),
  				same_lane_rate: (float),
  				wr_diff: (float)
  			},
  			...
  		}
  	}
  }

Players

  • player - a comma delimited list of hero IDs (not required)
  • limit - number of records to get (min 0, max 100, defaults to 25)
  • offset - offset (defaults to 0)
  • Returns: object:
{
	total: (int) number,
	version: (string),
	limit: (int),
	offset: (int),
	starting_time: (int),
	response: {
		<player_id>: {
			player_id: (int),
			wins: (int),
			play_rate: (float),
			win_rate: (float),
			matches: (int),
			nickname: (string),
		},
		...
	}
}

PlayersPositions

  • player - player ID (required)
  • pos - a comma delimited list of positions codes (in format core.lane, like 1.2 for midlane core, 1.3 for offlane core, 0.0 for support) (not required)
  • Returns: object:
{
	total: (int) number,
	version: (string),
	starting_time: (int),
	response: {
		<player>: {
			"0.0": [
				{
					player_id: (int),
					matches: (int),
					ratio: (float),
					wins: (int),
					win_rate: (float)
				},
				...
			],
			"1.0"...
		}
	}
}

PlayersHeroes

  • player - player ID (required)
  • pos - a comma delimited list of positions codes (in format core.lane, like 1.2 for midlane core, 1.3 for offlane core, 0.0 for support) (not required)
  • Returns: object:
{
	total: (int) number,
	version: (string),
	starting_time: (int),
	response: {
		<playerid>: {
			<heroid>: {
				hero_id: (int),
				matches: (int),
				wins: (int),
				win_rate: (float)
			},
			...
		}
	}
}

PlayersTogether

  • player - player ID (required)
  • limit - number of records to get (min 0, max 100, defaults to 25)
  • offset - offset (defaults to 0)
  • Returns: object:
  {
  	total: (int) number,
	limit: (int),
  	offset: (int),
	version: (string),
  	starting_time: (int),
	response: {
	  	<src_playerid>: {
	  		<playerid>: {
				player_id: (int),
  				matches: (int),
				wins: (int),
  				win_rate: (float),
  				expectation: (int),
				same_lane_rate: (float),
  				wr_diff: (float)
			},
  			...
  		}
	}
  }

PlayerVersus

  • player - player ID (required)
  • limit - number of records to get (min 0, max 100, defaults to 25)
  • offset - offset (defaults to 0)
  • Returns: object:
  {
  	total: (int) number,
	limit: (int),
  	offset: (int),
	version: (string),
  	starting_time: (int),
	response: {
	  	<src_playerid>: {
	  		<playerid>: {
				player_id: (int),
  				matches: (int),
				wins: (int),
  				win_rate: (float),
  				expectation: (int),
				same_lane_rate: (float),
  				wr_diff: (float)
			},
  			...
  		}
	}
  }

PositionHeroes

  • pos - a position code (in format core.lane, like 1.2 for midlane core, 1.3 for offlane core, 0.0 for support) (required)
  • Response: object:
{
	total: (int),
	version: (string),
	starting_time: (int),
	response: {
		<posCode>: {
			<heroid>: {
				hero_id: (int),
				matches: (int),
				ratio: (float),
				wins: (wins),
				win_rate: (float)
			},
			...
		},
		...
	}
}

 

PositionPlayers

  • pos - a position code (in format core.lane, like 1.2 for midlane core, 1.3 for offlane core, 0.0 for support) (required)
  • Response: object:
{
	total: (int),
	version: (string),
	starting_time: (int),
	response: {
		<posCode>: {
			<playerid>: {
				player_id: (int),
				matches: (int),
				ratio: (float),
				wins: (wins),
				win_rate: (float)
			},
			...
		},
		...
	}
}

 

Meta

  • data - (string) component to return

For details see leamare/D2-LRG-Metadata on GitHub