It is not every day that we get to release code around here, so I am especially pleased about this post. For those of you who don’t know, SEOMoz released their LinkScapeSite Intelligence API which gives you programmatic access to their giant link information database. Some of the features are free (the mozRank API) and some are not.
The following code library allows you to easily interact with the API.
uses the global variables of accessid and secret to generate a valid credential query string.
accesses the Status API
grabs the B and M values from the Status Call
converts Raw mozRank to Pretty mozRank
converts an array of plain-text fields into the appropriate Bit Flag
converts a link bit flag into plain-text values
accepts numerous parameters, makes call to Top-Links and returns array of values
accepts numerous parameters, makes call to Top-Pages and returns array of values
accepts numerous parameters including multiple URLs, makes call to URL-Metrics and returns array of values