Zip Code API Response Times Comparison

Zip Code API’s have become very popular because of the data they can provide easily and inexpensively. For example, one API when passed a zip code returns the city, state, latitude, longitude, time zone and more. Another will return all zip codes within a given radius of a zip code. And another will find the distance between zip codes.

There are three main API platforms for Zip Codes: Zip-Codes.com, ZipCodeAPI and SmartyStreets. You can look at the websites to see the different features. But all of that data doesn’t matter unless the data is returned quickly since most sites that call the API need to respond to a real person on their website.

So how fast do they return a response to your API call? This blog post will compare Zip Code API Response Times.

The Test Details

Here’s how we did the test. If you don’t care about the details, you can skip ahead to the next section.

4 Servers (Virginia, California, London, Frankfurt)

10 users per server, 5 iterations each

500ms to 3s wait time.

4*10*5 = 200 Requests total

– Each virtual user calls the API from Zip-Codes.com, ZipCodeAPI, and SmartyStreet.

– Each server has its own set of zip codes

– Each User-Iteration combination gets a different zip code

– Use RedLine13 for load testing

image.png

API Test Results

The graph below shows percentage of responses that are below the times at the left. You can see that most responses are less than half a second.

Zip Code API Response Times

Here are our summary observations:

  • ZipCodeAPI consistently had the best results
  • The response times are similar in certain percentiles, except SmartyStreets was slower in certian percentiles and Zip-Codes.com has some outliers as you can see at the right end of the graph.
  • They all tick up around the 25% percentile. We’ll dive into that later in the Deep Dive section at the end of the post.

Conclusion

Zip Code API tools all provide excellent performance with some minor differences. Bottom line: ZipCodeAPI consistently had the best Zip Code API Response Times.

On the other hand, the price is quite different. Here’s a recent blog post that looks at the pricing differences between the three: “Zip Code API Pricing Comparison”.

Given SmartyStreets’ higher price you wouldn’t be surprised what they say about their API: “Lightning fast processing speeds”. Maybe they should add “just like Zip-Codes.com and ZipCodeAPI”.

The nice thing about ZipCodeAPI is that you are guaranteed near consistent performance. This is important, because it’s kind of the nirvana for building a platform. In many systems power users suffer performance for their higher usage, but if you can give them consistent response time they will perceive performance to be as strong as they used it day one.

Deep, Deep Dive

Here we will look at more graphs to see what else we can learn and for those who just want to know more.

The first two graphs below also show pretty similar results. The third graph shows that Zip-Codes also returns additional data, likely demographic information, in the response, probably impacting their response time.

image.png

Why the 25% performance difference?

We noted at the beginning of the post that the graph showed a bump up at 25% with no apparent reason. Let’s dig into this. Is this just because 25% of the requests are faster than the rest? Is it related to picking four regions to use?

So what happens if we analyze the results from each server?

image.png

image.png

image.png

image.png

The graphs show that the fastest response times were from the local AWS Region Virginia. The next best was California followed by London and Frankfurt. The response times were excellent for all regions but they were best in Virgina. That is what accounts for the slight uptick at 25%.

You can read this a few ways

  • Region and location to users will impact performance
  • Server to server type operations within a region will be much faster
  • Load testing results need to take into account cross-region and cross-cloud latencies.

 

Sharing is caring!

Leave a Reply