So, yes, there is a way. You would need to use the SteamID64 method to get this XML document and then parse it to get the information that you need from it. The URL for the SteamID64 is:
http://steamcommunity.com/profiles/<SteamID64>
You can find the algorithm to convert from SteamID to SteamID64 online.