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. Heroes
  3. Costumes

All Costumes

GET https://marvelrivalsapi.com/api/v1/heroes/hero/:query/costumes

This endpoint retrieves the list of costumes available for a specific hero, based on their name or ID. The costume list includes details such as the costume's name, icon, rarity, description, and appearance. If the user has premium status, additional premium costumes may be included.

Headers

Name
Value

Content-Type

application/json

x-api-key*

YOUR API KEY

Query Parameters

Name
Type
Required
Description

query*

string

✔️

The name or ID of the hero to retrieve.

Example Requests

curl -X GET "https://marvelrivalsapi.com/api/v1/heroes/hero/squirrel girl/costumes"
     -H "x-api-key: YOUR_API_KEY"
const axios = require("axios");

try {
    const response = await axios.get("https://marvelrivalsapi.com/api/v1/heroes/hero/squirrel girl/costumes", {
        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/heroes/hero/squirrel girl/costumes"
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/heroes/hero/squirrel girl/costumes"))
            .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

[
  {
    "id": "costume_001",
    "name": "Ironman Mark 1",
    "icon": "/costumes/loki-1016001.png",
    "rarity": "Rare",
    "description": "The original Ironman suit with a rough, industrial design.",
    "appearance": "A shiny metallic suit with a red and gold color scheme."
  }
]
{
  "error": true,
  "message": "Invalid hero name or ID. The provided name or ID does not match any known hero.",
  "status": 400
}
{
  "error": true,
  "message": "Invalid or missing API key.",
  "status": 401
}
{
  "error": true,
  "message": "Hero not found. No hero data was found for the given name or ID",
  "status": 404
}
{
  "error": true,
  "message": "An error occurred while fetching data.",
  "status": 500
}

Response Field Descriptions

Field
Type
Description

id

String

Unique costume ID (e.g., "costume_001").

name

String

Name of the costume (e.g., "Ironman Mark 1").

icon

String

URL or path to the costume's icon image (e.g., /costumes/loki-1016001.png).

rarity

String

The rarity level of the costume (e.g., "Rare").

description

String

Short description of the costume (e.g., "The original Ironman suit...").

appearance

String

Detailed visual description of the costume (e.g., "A shiny metallic suit...").

PreviousCostumesNextCostume

Last updated 2 months ago

Was this helpful?