1. So I've recently discovered Hypixel API and I've been just playing around with it and I wanted to get player's ranks using this API. I've been running this in Linux environment so this is what I have tried
    curl "https://api.hypixel.net/player?key=<key>&uuid=<uuid>" | jq ".player.rank"
    curl "https://api.hypixel.net/player?key=<key>&uuid=<uuid>" | jq ".player.prefix"
    The thing is that I could only get people's ranks when they are YouTubers, Helpers and higher. For prefixes I only managed to get prefix for admins and for Technoblade (I tried it because of his pig prefix and it worked). Otherwise it didn't return anything. I even tried sending output to less
    curl "https://api.hypixel.net/player?key=<key>&uuid=<uuid>" | jq ".player" | less
    and just searching for rank name or Minecraft color codes but I still couldn't find anything.
  2. You should go by the following fields in order to get a users rank:
    (0. "prefix" if you want to display that as rank)
    1. "rank" (if it's not empty or "NORMAL")
    2. "monthlyPackageRank" (if it's not empty or "NONE")
    3. "newPackageRank" (if it's not empty or "NONE")
    4. "packageRank" (if it's not empty or "NONE")

    To give some insight on why there are multiple fields to check, "prefix" is used to give a special prefix to certain users, "rank" is used for special ranks players have like staff and YTers, "monthlyPackageRank" is used to store the recurring MVP++ rank, "newPackageRank" is the post-EULA permanent rank and "packageRank" is the pre-EULA permanent rank.

    For more information, there is a nice response by Bugfroggy going more in-depth about getting ranks from the API here: https://hypixel.net/threads/api-help-how-to-get-a-player-rank-network-level.1797880/#post-13812892
    Last edited: Jan 5, 2020
    • Like Like x 1
    • Agree Agree x 1
    • Useful Useful x 1
  3. That thread is really useful, thank you so much! I was actually looking for something like that.

Share This Page