WoW Profile Achievements endpoint slow?

Hi all – I noticed that the Achievements endpoint seems to be hanging up my application. I have an API Call function that runs about 6 times on different endpoints. Everything seems to be working smoothly, 5 out of 6 complete in less than a fraction of a second.

The achievements endpoint usually takes (at best) a couple seconds, or (at worst) up to 10-15 seconds. I used a stopwatch class to demonstrate this:

https://us.api.blizzard.com/profile/wow/character/{realm}/{character}/pvp-bracket/2v2?namespace=profile-us
Runtime 00:00:00.25
https://us.api.blizzard.com/profile/wow/character/{realm}/{character}?namespace=profile-us
Runtime 00:00:00.26
https://us.api.blizzard.com/profile/wow/character/{realm}/{character}/character-media?namespace=profile-us
Runtime 00:00:00.26
https://us.api.blizzard.com/profile/wow/character/{realm}/{character}/pvp-bracket/rbg?namespace=profile-us
Runtime 00:00:00.25
https://us.api.blizzard.com/profile/wow/character/{realm}/{character}/pvp-bracket/3v3?namespace=profile-us
Runtime 00:00:00.26
https://us.api.blizzard.com/profile/wow/character/{realm}/{character}/achievements?namespace=profile-us
Runtime 00:00:09.30

Anyone notice this as well? I don’t think my API Call is busted since it works on all of the others just fine. Tried this over the past 48 hours and same results.

I should also be well within the rate-limits.

Sometimes the API transfer rate is slow (under 50KBps), and the achievement endpoint response is large. Make sure you’re using gzip transfer encoding to reduce the number of bytes on the wire.

1 Like

Gzip? I will look into that. Thank you!

Update: This seems to have helped a lot! I ran about 10 sets of 6 API calls and while 5/6 of them remained at .25sec , the achievement API call stayed under 3 seconds every time, and usually took only 1-2. No more 10 second waits :slight_smile:

Here’s my C# method in case this helps anyone else.

        private async Task<string> Call(string uri) // API Lookup, returns a json string
        {
            uri = uri.ToLower();
            var clientHandler = new HttpClientHandler() { AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate }; // Perform automatic GZIP Decompression
            using (var httpClient = new HttpClient(clientHandler))
            {
                using (var request = new HttpRequestMessage(new HttpMethod("GET"), uri))
                {
                    request.Headers.TryAddWithoutValidation("Accept-Encoding", "gzip, deflate"); // Request GZIP compression
                    request.Headers.TryAddWithoutValidation("Authorization", "Bearer " + this.Config.Token.access_token);

                    var response = await httpClient.SendAsync(request);
                    using (HttpContent content = response.Content)
                    {
                        return content.ReadAsStringAsync().Result;
                    }
                }
            }
        }