Metrics API Stats & Query by URL
| 1 | 7 |
The Metrics API is one of the central components of the entire PostRank infrastructure. After all, after we aggregate, clean, and save each of the individual events (tweets, comments, bookmarks, and so on) associated with each URL. We also need a way to query this database. In fact, on average, our metrics API is serving ~20,000 URL lookups every minute (~300 lookups a second), for our internal applications at PostRank, as well as for our partners.
The full PostRank archive contains over 5 billion individual engagement events with all kinds of online content. When you query the Metrics API, you are actually accessing this entire archive in real-time and retrieving the latest set of aggregated metrics. There is no caching, there are no delays; all of the ranking data is served in real-time for each request. Needless to say, it takes more than just a single database or an API server to power such a service.
Metrics API Update: Query by URL
If you have used our Metrics API before, then you will know that we required that your query should specify the MD5 hashes (a 32 character string) for each URL — that is how the data is stored internally at PostRank, so it was a simple direct mapping. However, as many of our partners know, hashing URLs is tricky business: a single character change will result in a different key. So, if you didn’t remove a tracking parameter from your URL, or omitted that extra slash, then you might get a completely different set of results.
To simplify this case for everyone, we just pushed out an update to the Metrics API, which allows you to query by URL directly, without having to specify your own MD5 keys. A simple change to the API and a big win for every user. PostRank will do all of the URL normalization, handle all the edge cases, and return to you all the metrics associated with the URL you have submitted. Let’s take a look at a simple example:

Both of the queries are for the same URL; the second one just happens to have some extra Google Analytics tracking parameters — should you remove those when you query the API? Don’t worry about it, just pass in the URL as you have it, and let PostRank do the rest. Both requests now return the same results.

We get it, so today we’re launching new sorting and filtering functionality!
We also know that on sites with multiple authors, comparing the content’s engagement as a whole might not always provide the most relevant picture. Publishers also want to know which topics they cover that tend to be the most popular. Not a problem. In the same site Analyze view, you can now filter posts by the author that wrote them, by topic tags, or both.

Facebook, Google, and Twitter are locked in a battle for the Social Graph. Each is trying to maximize their share of the graph, offers a single sign-on solution, and in general would love to see you use them as your primary online identity. 
