SEOMoz LinkScape API Functions Library
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 LinkScape Site 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.
Main Functions:
Function |
Description |
generateCredentials() |
uses the global variables of accessid and secret to generate a valid credential query string. |
apiStatus() |
accesses the Status API |
getTransformation() |
grabs the B and M values from the Status Call |
transformMozRank() |
converts Raw mozRank to Pretty mozRank |
calculateBitFlag() |
converts an array of plain-text fields into the appropriate Bit Flag |
parseBitFlag() |
converts a link bit flag into plain-text values |
topLinks() |
accepts numerous parameters, makes call to Top-Links and returns array of values |
topPages() |
accepts numerous parameters, makes call to Top-Pages and returns array of values |
urlMetrics() |
accepts numerous parameters including multiple URLs, makes call to URL-Metrics and returns array of values |
Helper Functions
Function |
Description |
getSingleMatch() |
finds a single needle in the haystack |
getMultiMatch() |
finds multiple needles in the haystack |
custom_hmac() |
SHA1 hash alternative for non PHP 5 users |
Helper Class
File |
Description |
class.json.php |
converts json to php object. |
Downloads
File |
Format |
Functions Library |
[TXT] |
Examples |
[TXT] |
JSON Class |
[TXT] |
No tags for this post.
Just another example of why everyone loves SEOmoz. There is no question that their tools are among the best in the biz.
Any documentation on the apiStatus function? What do the $b and $m vars represent?
I am not sure if there is any documentation, but B and M are the coefficient and slope, I assume. Once you know the raw mozrank, you can pop it into the equation and, voila, you have the transformed, pretty mozRank
Really helpful documentation. I find SEOMoz data more useful than Google page rank in terms of actual value of a page.
Hi I’m a newbie. I tried the examples given in downloads but only the last one (the one who uses urlMetrics function) returns values. Why is that ?
Hi I’m a newbie on seomoz. I tried the examples given in downloads but only the last one (the one who uses urlMetrics function) returns values. Why is that ?
Hi,
i want test this library I am a SEOMoz Pro Member, so i can use the Free Api Call with my keys. But i am not a php-expert, though i have do websites with php.
My questions:
Where i install at the webserver class.json.php?
The Funtions Library, than it is renamed “functions.php”?
Can the library be installed elsewhere or it exist a best practice to put it on a specific folder in the php environment?
Thanks and greetings from Hamburg, Germany
Is this library free ?
yes, although it has no been updated recently.
Strict Standards: mktime() [function.mktime]: You should be using the time() function instead ,
i got an error for mktime
— functions.php—- line 24
$timestamp = mktime()+300;
Up to date competition 🙂
SEOmoz’s MozScape API for PHP 5.3+
Kind regards.
seems like the APIs are outdated as well.
Is this outdated or does it work ok?
outdated