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 History v1

GET https://marvelrivalsapi.com/api/v1/player/:query/match-history

This endpoint retrieves the match history of a player based on their unique identifier (UID) or username. It allows filtering by season, skip value, and game mode.

Headers

Name
Value

Content-Type

application/json

x-api-key*

YOUR API KEY

Query Parameters

Name
Type
Required
Description

query*

string

✔️

The unique identifier of the player (could be uid or username).

season

integer

❌

The season to retrieve match history for. Defaults to current season

skip

integer

❌

The number of matches to skip (pagination). Defaults to 20.

game_mode

integer

❌

The game mode to filter matches by. Defaults to 0.

timestamp

integer

❌

Filter matches by timestamp. Only includes matches after the given timestamp.

Example Requests

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

try {
    const response = await axios.get("https://marvelrivalsapi.com/api/v1/player/Sypeh/match-history", {
        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/player/Sypeh/match-history"
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/player/Sypeh/match-history"))
            .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_history": [
    {
      "match_map_id": 1,
      "map_thumbnail": "/rivals/maps/map_1.png",
      "match_play_duration": "15 minutes",
      "match_season": 1.5,
      "match_uid": "match12345",
      "match_winner_side": "A",
      "mvp_uid": "player123",
      "svp_uid": "player456",
      "score_info": {
        "score": 10,
        "score_info": "Some additional data"
      },
      "match_time_stamp": 1675058998,
      "play_mode_id": 1,
      "game_mode_id": 1,
      "match_player": {
        "assists": 3,
        "kills": 5,
        "deaths": 2,
        "is_win": true,
        "disconnected": false,
        "player_uid": "player123",
        "camp": "A",
        "score_info": {
          "score": 100
        },
        "player_hero": {
          "hero_id": 101,
          "hero_name": "Warrior",
          "hero_thumbnail": "/heroes/warrior.png",
          "kills": 3,
          "deaths": 1,
          "assists": 2,
          "play_time": "10 minutes",
          "total_hero_damage": 5000,
          "total_damage_taken": 3000,
          "total_hero_heal": 1500
        }
      }
    }
  ]
}
{
  "error": true,
  "message": "Invalid query parameter (e.g., missing player UID or username).",
  "status": 400
}
{
  "error": true,
  "message": "Invalid or missing API key.",
  "status": 401
}
{
  "error": true,
  "message": "Player not found or match data unavailable for the specified query",
  "status": 404
}
{
  "error": true,
  "message": "An error occurred while fetching data.",
  "status": 500
}

Response Field Descriptions

Field
Type
Description

match_season

Number

The season of the match (e.g., 1.5).

match_uid

String

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

match_winner_side

String

The winning side of the match (e.g., "A").

mvp_uid

String

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

svp_uid

String

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

score_info.score

Number

The score of the match (e.g., 10).

score_info.score_info

String

Additional information about the score (e.g., "Some additional data").

match_time_stamp

Number

Timestamp of the match (e.g., 1675058998).

play_mode_id

Number

The play mode ID used in the match (e.g., 1).

game_mode_id

Number

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

match_player.assists

Number

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

match_player.kills

Number

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

match_player.deaths

Number

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

match_player.is_win

Boolean

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

match_player.disconnected

Boolean

Whether the player disconnected during the match (e.g., false).

match_player.player_uid

String

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

match_player.camp

String

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

match_player.score_info.score

Number

The score of the player in the match (e.g., 100).

match_player.player_hero.hero_id

Number

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

match_player.player_hero.hero_name

String

Name of the hero played by the player (e.g., "Warrior").

match_player.player_hero.hero_thumbnail

String

URL or path to the hero's image (e.g., "/heroes/warrior.png").

match_player.player_hero.kills

Number

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

match_player.player_hero.deaths

Number

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

match_player.player_hero.assists

Number

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

match_player.player_hero.play_time

String

Time spent playing with the hero (e.g., "10 minutes").

match_player.player_hero.total_hero_damage

Number

Total damage dealt by the player's hero (e.g., 5000).

match_player.player_hero.total_damage_taken

Number

Total damage taken by the player's hero (e.g., 3000).

match_player.player_hero.total_hero_heal

Number

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

PreviousMatch StatsNextMatch

Last updated 2 months ago

Was this helpful?