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
-
SEOMoz API not working for Scrapebox
I want to import SEOMoz data to list of URLs I have using scrapbox. I added in my credentials according to the API but am getting error 401 as the status of all my links. Any idea why and what I should be doing?
Moz Pro | | theLotter0 -
Do SEOmoz private questions get answered?
I submitted a question on September 30 and never received a response. I then followed up on October 6 and had an exchange with the support staff, who first told me that the question would be answered and then a couple of days later told me that they had no record of the question. By chance, I had taken a screen shot showing confirmation that the question had been sent (just something I did to remind myself to follow up if I didn't get a response!), which I sent to them along with the question again. That was four days ago, and I've heard nothing since then - not even an automated email saying that the question was received. Is it common for it to take almost a month before a response is received, and to have to follow up multiple times just to get an answer?
Moz Pro | | csmm0 -
More than 100 links
Hi Everyone, I was trawling through You Tube and came across this video from Matt Cuts from Google about the 100 links limit being removed. http://www.youtube.com/watch?v=l6g5hoBYlf0&feature=relmfu I then logged into my SEO account as I remember a previous report we did for a competitor where they had quite a number of pages just over the 100 links, but only barely (They are highlighted in SEOmoz as a warning). Given that google has removed this number from their guidelines and it's clear that a few over 100 isn't as bad as it used to be, is it not about time this was changed or looked at again? Maybe even put ones like these under a new title such as recommendation rather that the alarmist Warning one unless it's ridiculously high? I wonder if the SEOmoz team can also find out a better range figure for it instead of the outdated 100? Regards Alan watch?v=l6g5hoBYlf0&feature=relmfu
Moz Pro | | ContactOnline0 -
Seomoz research tools question for inbound links
What is the best seomoz tool and or indicator within a tool for checking on a link (directory or article site) to evaluate whether or not you would actaully want a link from them? Any way to see if google penalizes them for there tactics or if that can hurt me by them linking to me or whatever? I am at the beginning of a link building mission, but want to ensure that I do it methodically and correctly as possible based on the combines wisdom of this community. Thanks for your help, Steven
Moz Pro | | sfmatthews0 -
SEOmoz Pro dashboard report question
Hi there, SEOMoz dashbard report shows 'URLs Receiving Entrances Via Search' - Is it counting only organic searches or all searches including PPC? Thanks, Gemma
Moz Pro | | RBA0 -
SEOmoz bar causes FF to hang
I use FireFox as my browser on a Windows pc. When I close FF it rarely closes properly. The process is still visible in the task manager. I need to end the process to shut it down. After researching the issue I learned this problem is usually caused by an add-on. I disabled my add-ons one at a time and it is clearly the SEOmoz bar causing the issue. I can run every other add-on without any problem but if I use the mozbar but itself, the issue occurs. I plan to report this problem to the help desk but first I wanted to ask if others are experiencing the same issue. The more data that can be collected, the easier it will be to resolve the problem. Thanks in advance for your feedback.
Moz Pro | | RyanKent0 -
What's Your SEOmoz Favorite?
Obviously, SEOmoz is full of awesomeness. But I'm curious as to what sections, tools, etc. of SEOmoz are the users' favorites? For me, it's a close race between the blog, Linkscape/Open Site Explorer, and the search overlay tool on the Mozbar. What are your favorites?
Moz Pro | | Gyi0 -
Designed new website with new domain has more than 24 million links over night on seomoz, how has this happend?
I recently added http://www.ard.uk.com to seomoz, its a new site with a new domain. on the first overview its saying it has more than 24 million links and has a mozrank over 7, how is this possible?
Moz Pro | | francesco-2850160