How do I collect all links through the SEOMoz API?
-
How do I collect all links through the SEOMoz API?
Yes, I know how to pull url metrics info but want to pull the inbound links only via php script w/out having to go to the OSE page to pull.
any suggestions would be great!
-
hey got it workin, I sent u a private message with a Q for a sort.
cheers!
-
No problem, feel free to send me a private message if you need help with the code.
-
thanks Casey, let me have a run and let you know.
cheers!
-
Please check out the authentication wiki page: http://apiwiki.seomoz.org/w/page/29574176/SignedAuthentication
$objectURL = $domain_url;$accessID = "member-XXXXXXXXXXX";
$secretKey = "XXXXXXXXXXXXXXX";
$expires = mktime() + 300;
// The request is good for the next 5 minutes, or 300 seconds from now.
$stringToSign = $accessID."\n".$expires;
// Get the "raw" or binary output of the hmac hash.
$binarySignature = hash_hmac('sha1', $stringToSign, $secretKey, true);
// We need to base64-encode it and then url-encode that.
$urlSafeSignature = urlencode(base64_encode($binarySignature));
// You don't have to use fopen and can't in some scenarios. CURL is a better choice for production.
$handle = fopen($urlToFetch, "r");$links_contents = ''; while (!feof($handle)) { $links_contents .= fread($handle, 8192);} fclose($handle);
echo $links_contents;
?>
Here is how we are pulling it in. Replace $accessID with your API code, you can sort and filter through the different link calls. Replace "Limit" with however much you want to pull in. The code will return a json response, from there you can parse the data however you want.
I hope that helps!
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Disavowing links and disavow tool
Hello, I have had a look on webmaster tools and Moz and can see lots of bad links on Moz only. I am thinking whether to disavow them and was wondering if you could you let me know if it is possible to have a look at your current disavow file? I do not currently know what links were included the previous time. Is there a way to check if there are any links in the file at all? I thought I would raise this question as there is a lot of negative info about the disavow tool.
Moz Pro | | SEM_at_Lees0 -
Links being reported in Webmaster Tools
Hi Are the Total Links To Your Site, as reported in GWT, purely external inbound links ? Since these links are usually, as far as i can tell, much higher in number than any other link reporting tool and hence, i presume, more accurate, why don't services such as Moz etc include this in reporting ? I know its just a total number and link quality is whats important not quantity, but i would have thought interesting to show in reporting in conjunction with link quality info such as is already reported. Since most backlink reporting tools do show a total but always much much lower than that reported in gwt (i think) All Best Dan
Moz Pro | | Dan-Lawrence0 -
OK I'll try again.... Linking root domains and external links
I'm new to the crawl test tool, I think I know what is meant by external links and linking root domains but I need to check. If there are 500 external links and 50 linking root domains does that suggest the essentially those 500 links are coming from 50 root domains? If yes, then what would 1000 linking root domains and 100 links mean? Or am I completely wrong in my assumptions and if so, can somebody point me in the right direction? Thank you.
Moz Pro | | JemRobinson0 -
Seomoz crawler problems
I have had Seomoz for about a month. It has crawled about 1000 pages. I have about 10,000 pages total for the site. Why are these others being a problem? I have contacted help but the guy isn't any help, we have just been going back and forth for the last two weeks. Any suggestions?
Moz Pro | | EcommerceSite0 -
Too Many On-Page Links
The SeoMoz site crawler says all my pages have too many links. I am using Dreamweaver with a horizontal Spry drop-down menu bar. My site has several hundred pages and about 100 of them show up in this Spry menu bar. I believe that this would be considered a false positive for too many links - am I right? Or is Google seeing this also as too many links per page? I am trying to get my Google rankings back after being hurt badly by the Penguin. I am using php but don't see another way to do the site links without going to a CMS type site. Thanks for any help you can give.
Moz Pro | | johnsearles0 -
Why is Followed Linking Root Domains higher than External Followed Links?
Surely there must be at least one external link for each linking root domain? Some results for smaller sites give a higher number of domains linking in than incoming links - e.g. www.forbesandsawyer.co.uk Under Subdomain metrics: External Followed Links - 1 Followed Linking Root Domains - 2 Surely 2 root domains would mean AT LEAST 2 external followed links? Thanks, Andrew
Moz Pro | | Silktide0 -
How do I get a list of my non-followed links
Our site has a lot of non-followed links showing up on the latest SEOMoz Competitive Link Analysis update and I would like to know how to get a list of the sites that aresettin no-follow.
Moz Pro | | oznappies0