### Get Ability Order Stats (Curl) Source: https://api.deadlock-api.com/docs/index Example using Curl to fetch ability order statistics from the Deadlock API. This command demonstrates how to make a GET request with specified parameters. ```Curl curl "https://api.deadlock-api.com/v1/analytics/ability-order-stats?hero_id=VALUE&min_unix_timestamp=1753920000&max_unix_timestamp=VALUE&min_duration_s=VALUE&max_duration_s=VALUE&min_ability_upgrades=VALUE&max_ability_upgrades=VALUE&min_networth=VALUE&max_networth=VALUE&min_average_badge=VALUE&max_average_badge=VALUE&min_match_id=VALUE&max_match_id=VALUE&min_matches=20&account_id=VALUE&account_ids=VALUE" \ -H "Accept: */*" ``` -------------------------------- ### Get Match Salts Source: https://api.deadlock-api.com/docs/index Fetches salts required for accessing match metadata and demofiles. Note that salts may not be available for all matches. Requires a valid match ID. ```Shell curl https://api.deadlock-api.com/v1/matches/0/salts ``` -------------------------------- ### Get Raw Match Metadata Source: https://api.deadlock-api.com/docs/index Retrieves the raw .meta.bz2 file for a given match ID. The file needs to be decompressed and decoded using protobuf definitions. Requires a valid match ID. ```Shell curl https://api.deadlock-api.com/v1/matches/0/metadata/raw ``` -------------------------------- ### Get Live Broadcast URL Source: https://api.deadlock-api.com/docs/index Retrieves the live broadcast URL for a given match ID, useful for demofile broadcast parsers. Requires a valid match ID. ```Shell curl https://api.deadlock-api.com/v1/matches/0/live/url ``` -------------------------------- ### Get Match Metadata Source: https://api.deadlock-api.com/docs/index Fetches the metadata for a specific match ID in JSON format. This endpoint provides parsed match details. Requires a valid match ID. ```Shell curl https://api.deadlock-api.com/v1/matches/0/metadata ``` -------------------------------- ### Player Score to Rank Mapping Source: https://api.deadlock-api.com/docs/index Illustrates how player scores are mapped to ranks using an array of indices. The closest index from the player score determines the corresponding rank. Examples show the conversion process. ```plaintext [0,11,12,13,14,15,16,21,22,23,24,25,26,31,32,33,34,35,36,41,42,43,44,45,46,51,52,53,54,55,56,61,62,63,64,65,66,71,72,73,74,75,76,81,82,83,84,85,86,91,92,93,94,95,96,101,102,103,104,105,106,111,112,113,114,115,116] ``` -------------------------------- ### Get Active Matches (Shell) Source: https://api.deadlock-api.com/docs/index Retrieves a list of currently active matches. This endpoint is limited to the top 200 matches and can be filtered by account ID. Rate limits apply per IP and key. ```Shell curl 'https://api.deadlock-api.com/v1/matches/active?account_id=null&account_ids=0' ``` -------------------------------- ### MMR Calculation Logic Source: https://api.deadlock-api.com/docs/index This section explains the logic behind the MMR calculation, starting from the first match with avg_team_badge. It involves comparing team badge averages with database MMR, calculating deltas, assigning errors to players, and repeating the process for each match. A Python script for calculation is referenced. ```python https://github.com/deadlock-api/deadlock-api-tools/blob/master/mmr-calc/mmr_calc.py ``` -------------------------------- ### Get Ability Order Stats Source: https://api.deadlock-api.com/docs/index Retrieves statistics related to ability order for players. Requires a hero ID and optionally accepts various timestamp, duration, upgrade, networth, badge, match ID, and account ID filters. ```HTTP GET https://api.deadlock-api.com/v1/analytics/ability-order-stats?hero_id=VALUE&min_unix_timestamp=1753920000&max_unix_timestamp=VALUE&min_duration_s=VALUE&max_duration_s=VALUE&min_ability_upgrades=VALUE&max_ability_upgrades=VALUE&min_networth=VALUE&max_networth=VALUE&min_average_badge=VALUE&max_average_badge=VALUE&min_match_id=VALUE&max_match_id=VALUE&min_matches=20&account_id=VALUE&account_ids=VALUE ``` -------------------------------- ### Active Matches Response Schema (JSON) Source: https://api.deadlock-api.com/docs/index The JSON schema for the response of the 'Get Active Matches' endpoint, detailing the structure of match data including player information, game mode, and match status. ```JSON [ { "compat_version": null, "duration_s": null, "game_mode": null, "game_mode_parsed": "KECitadelGameModeInvalid", "game_mode_version": null, "lobby_id": null, "match_id": null, "match_mode": null, "match_mode_parsed": "Invalid", "match_score": null, "net_worth_team_0": null, "net_worth_team_1": null, "objectives_mask_team0": null, "objectives_mask_team1": null, "open_spectator_slots": null, "players": [ { "abandoned": null, "account_id": null, "hero_id": null, "team": null, "team_parsed": "Team0" } ], "region_mode": null, "region_mode_parsed": "Row", "spectators": null, "start_time": null, "winning_team": null, "winning_team_parsed": "Team0" } ] ``` -------------------------------- ### Get Active Matches Raw Data Source: https://api.deadlock-api.com/docs/index Fetches the raw data for currently active matches. This endpoint has a rate limit of 100 requests per second per IP. The response for a successful request is application/octet-stream, while an error returns a 500 status code. ```Shell curl https://api.deadlock-api.com/v1/matches/active/raw ``` -------------------------------- ### Get Player Badge Distribution Source: https://api.deadlock-api.com/docs/index Retrieves the distribution of player badges. This endpoint supports filtering by Unix timestamp and match ID. It returns a JSON array containing badge levels and the total number of matches for each level. Error responses include 400 for invalid parameters and 500 for server errors. ```Shell curl 'https://api.deadlock-api.com/v1/matches/badge-distribution?min_unix_timestamp=null&max_unix_timestamp=null&min_match_id=null&max_match_id=null' ``` -------------------------------- ### Builds Operations Endpoints Source: https://api.deadlock-api.com/docs/index Provides endpoints for searching and retrieving hero builds with various filtering options. ```http get/v1/builds ``` -------------------------------- ### Commands Operations Endpoints Source: https://api.deadlock-api.com/docs/index Details integration endpoints for the Deadlock Streamkit, enabling dynamic command template resolution and variable retrieval for streaming overlays and chat commands. ```http get/v1/commands/resolve get/v1/commands/variables/available get/v1/commands/variables/resolve get/v1/commands/widgets/versions ``` -------------------------------- ### Fetch Match Metadata with Parameters Source: https://api.deadlock-api.com/docs/index Retrieves metadata for matches based on specified query parameters. Supports filtering by match IDs, timestamps, duration, skill range, player accounts, and ordering. Includes options to include detailed match information. ```Shell curl 'https://api.deadlock-api.com/v1/matches/metadata?include_info=true&include_objectives=true&include_mid_boss=true&include_player_info=true&include_player_items=true&include_player_stats=true&include_player_death_details=true&match_ids=0&min_unix_timestamp=null&max_unix_timestamp=null&min_duration_s=null&max_duration_s=null&min_average_badge=null&max_average_badge=null&min_match_id=null&max_match_id=null&is_high_skill_range_parties=null&is_low_pri_pool=null&is_new_player_pool=null&account_ids=0&order_by=match_id&order_direction=desc&limit=1000' ``` -------------------------------- ### SQL Operations Endpoints Source: https://api.deadlock-api.com/docs/index Provides endpoints for database exploration, allowing custom SQL query execution with rate limiting, listing tables, and inspecting table schemas. ```http get/v1/sql get/v1/sql/tables get/v1/sql/tables/{table}/schema ``` -------------------------------- ### Analytics Operations Endpoints Source: https://api.deadlock-api.com/docs/index Details endpoints for comprehensive game statistics and analysis. Includes performance metrics for heroes, items, and players, such as ability order stats, build item stats, hero counters, synergies, and scoreboards. ```http get/v1/analytics/ability-order-stats get/v1/analytics/build-item-stats get/v1/analytics/hero-comb-stats get/v1/analytics/hero-counter-stats get/v1/analytics/hero-stats get/v1/analytics/hero-synergy-stats get/v1/analytics/item-permutation-stats get/v1/analytics/item-stats get/v1/analytics/player-stats/metrics get/v1/analytics/scoreboards/heroes get/v1/analytics/scoreboards/players ``` -------------------------------- ### Internal Operations Endpoints Source: https://api.deadlock-api.com/docs/index Lists internal operations endpoints, including one for match salts. ```http post/v1/matches/salts ``` -------------------------------- ### Patches Operations Endpoints Source: https://api.deadlock-api.com/docs/index Lists endpoints for retrieving data related to game patches. ```http get/v1/patches get/v1/patches/big-days ``` -------------------------------- ### Info Operations Endpoints Source: https://api.deadlock-api.com/docs/index Provides system status and information endpoints, including health checks for databases (Clickhouse, Postgres, Redis) and API statistics like table sizes and match fetching rates. ```http get/v1/info get/v1/info/health ``` -------------------------------- ### E-Sports Operations Endpoints Source: https://api.deadlock-api.com/docs/index Lists endpoints for ingesting and retrieving e-sports match data. ```http post/v1/esports/ingest/match get/v1/esports/matches ``` -------------------------------- ### Leaderboard Operations Endpoints Source: https://api.deadlock-api.com/docs/index Lists endpoints for accessing global and hero-specific leaderboards. Supports filtering by region and provides data in both JSON and protobuf formats. ```http get/v1/leaderboard/{region} get/v1/leaderboard/{region}/raw get/v1/leaderboard/{region}/{hero_id} get/v1/leaderboard/{region}/{hero_id}/raw ``` -------------------------------- ### MMR Operations Endpoints Source: https://api.deadlock-api.com/docs/index Provides a list of API endpoints for retrieving player MMR data. This includes general MMR, MMR for a specific hero, and MMR history for a given account ID, with options for hero-specific history. ```http get/v1/players/mmr get/v1/players/mmr/{hero_id} get/v1/players/{account_id}/mmr-history get/v1/players/{account_id}/mmr-history/{hero_id} ``` -------------------------------- ### Fetch Recently Fetched Matches Source: https://api.deadlock-api.com/docs/index Retrieves a list of match IDs that have been fetched within the last 10 minutes. This endpoint is useful for identifying recently active matches. ```Shell curl https://api.deadlock-api.com/v1/matches/recently-fetched ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.