MarvelRivalsAPI.com
Swagger DocsDiscord
  • Introduction
    • Documentation Overview
  • Errors
  • Rate Limits
  • Endpoints
    • Achievements
      • All Achievements
      • Achievement
    • Battlepass
    • Heroes
      • All Heroes
      • Hero
      • Hero Stats
      • Hero Leaderboard
      • Costumes
        • All Costumes
        • Costume
    • Items
      • All Items
      • Item
    • Maps
      • All Maps
    • Patch Notes
      • All Balances
        • Balance
      • All Dev Diaries
        • Dev Diray
      • All Patch Notes
        • Patch Note
      • Game Versions
      • Seasons
    • Player Stats
      • Find Player
      • Player
      • Update Player
    • Match Stats
      • Match History v1
      • Match
      • Match History v2
Powered by GitBook
On this page

Was this helpful?

  1. Endpoints
  2. Match Stats

Match

GET https://marvelrivalsapi.com/api/v1/match/:match_uid

This endpoint retrieves match data for a specific match identified by the match_uid. It processes the match details and player stats.

Headers

Name
Value

Content-Type

application/json

x-api-key*

YOUR API KEY

Query Parameters

Name
Type
Required
Description

match_uid*

string

✔️

The unique identifier of the match.

Once a matches data has been located it is forever cached. This data does not & will not change. To reduce requests it is recommend to cache the match on your end so you wont have to waste your resources.

Example Requests

curl -X GET "https://marvelrivalsapi.com/api/v1/match/6713687_1743736046_1170_11001_10"
     -H "x-api-key: YOUR_API_KEY"
const axios = require("axios");

try {
    const response = await axios.get("https://marvelrivalsapi.com/api/v1/match/6713687_1743736046_1170_11001_10", {
        headers: {
            "x-api-key": "YOUR_API_KEY"
        }
    });
    console.log(response.data);
} catch (error) {
    console.error("Error fetching balances:", error.response ? error.response.data : error.message);
}
import requests

url = "https://marvelrivalsapi.com/api/v1/match/6713687_1743736046_1170_11001_10"
headers = {
    "x-api-key": "YOUR_API_KEY"
}

response = requests.get(url, headers=headers)

if response.status_code == 200:
    print(response.json())
else:
    print(f"Error {response.status_code}: {response.text}")
import java.net.http.*;
import java.net.URI;
import java.io.IOException;

public class ApiClient {
    public static void main(String[] args) {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://marvelrivalsapi.com/api/v1/match/6713687_1743736046_1170_11001_10"))
            .header("x-api-key", "YOUR_API_KEY")
            .GET()
            .build();

        try {
            HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
            System.out.println(response.body());
        } catch (IOException | InterruptedException e) {
            e.printStackTrace();
        }
    }
}

Response

{
  "match_details": {
    "match_uid": "abcd1234",
    "game_mode": {
      "game_mode_id": 1,
      "game_mode_name": "Deathmatch"
    },
    "replay_id": "replay12345",
    "mvp_uid": "player123",
    "mvp_hero_id": 101,
    "svp_uid": "player456",
    "svp_hero_id": 102,
    "dynamic_fields": {
      "additionalProp1": {}
    },
    "match_players": [
      {
        "player_uid": "player123",
        "nick_name": "Player1",
        "player_icon": "/icons/player1.jpg",
        "camp": "A",
        "cur_hero_id": 101,
        "cur_hero_icon": "/heroes/hero101.jpg",
        "is_win": true,
        "kills": 5,
        "deaths": 3,
        "assists": 2,
        "total_hero_damage": 3000,
        "total_hero_heal": 1500,
        "total_damage_taken": 2000,
        "player_heroes": [
          {
            "hero_id": 101,
            "play_time": 300,
            "kills": 3,
            "deaths": 1,
            "assists": 2,
            "session_hit_rate": 75.5,
            "hero_icon": "/heroes/hero/101_icon.jpg"
          }
        ]
      }
    ]
  }
}
{
  "error": true,
  "message": "Invalid match_uid parameter or missing match_uid",
  "status": 400
}
{
  "error": true,
  "message": "Invalid or missing API key.",
  "status": 401
}
{
  "error": true,
  "message": "Match data for the specified match_uid not found",
  "status": 404
}
{
  "error": true,
  "message": "An error occurred while fetching data.",
  "status": 500
}

Response Field Descriptions

Field
Type
Description

match_details.match_uid

String

Unique identifier for the match (e.g., "abcd1234").

match_details.game_mode.game_mode_id

Number

ID of the game mode used in the match (e.g., 1).

match_details.game_mode.game_mode_name

String

Name of the game mode (e.g., "Deathmatch").

match_details.replay_id

String

Unique identifier for the replay (e.g., "replay12345").

match_details.mvp_uid

String

Unique identifier for the MVP player (e.g., "player123").

match_details.mvp_hero_id

Number

ID of the MVP player's hero (e.g., 101).

match_details.svp_uid

String

Unique identifier for the SVP player (e.g., "player456").

match_details.svp_hero_id

Number

ID of the SVP player's hero (e.g., 102).

match_details.dynamic_fields

Object

Additional dynamic fields (e.g., {"additionalProp1": {}}).

match_details.match_players

Array

List of players involved in the match.

match_details.match_players.player_uid

String

Unique identifier for the player (e.g., "player123").

match_details.match_players.nick_name

String

Nickname of the player (e.g., "Player1").

match_details.match_players.player_icon

String

URL or path to the player's icon (e.g., "/icons/player1.jpg").

match_details.match_players.camp

String

The camp the player is on (e.g., "A").

match_details.match_players.cur_hero_id

Number

ID of the current hero being played by the player (e.g., 101).

match_details.match_players.cur_hero_icon

String

URL or path to the player's current hero icon (e.g., "/heroes/hero101.jpg").

match_details.match_players.is_win

Boolean

Whether the player won the match (e.g., true).

match_details.match_players.kills

Number

The number of kills by the player in the match (e.g., 5).

match_details.match_players.deaths

Number

The number of deaths by the player in the match (e.g., 3).

match_details.match_players.assists

Number

The number of assists by the player in the match (e.g., 2).

match_details.match_players.total_hero_damage

Number

Total hero damage dealt by the player (e.g., 3000).

match_details.match_players.total_hero_heal

Number

Total healing done by the player's hero (e.g., 1500).

match_details.match_players.total_damage_taken

Number

Total damage taken by the player (e.g., 2000).

match_details.match_players.player_heroes

Array

List of heroes played by the player in the match.

match_details.match_players.player_heroes.hero_id

Number

ID of the hero played by the player (e.g., 101).

match_details.match_players.player_heroes.play_time

Number

Time spent playing the hero in seconds (e.g., 300).

match_details.match_players.player_heroes.kills

Number

The number of kills by the player's hero (e.g., 3).

match_details.match_players.player_heroes.deaths

Number

The number of deaths by the player's hero (e.g., 1).

match_details.match_players.player_heroes.assists

Number

The number of assists by the player's hero (e.g., 2).

match_details.match_players.player_heroes.session_hit_rate

Number

The hero's session hit rate (e.g., 75.5).

match_details.match_players.player_heroes.hero_icon

String

URL or path to the hero's icon (e.g., "/heroes/hero/101_icon.jpg").

PreviousMatch History v1NextMatch History v2

Last updated 2 months ago

Was this helpful?