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
-
Inbound Link Tool?
I signed up for SEOMOZ so that I could get a conclusive list of links for my competition. I hope I can get this information with this tool. Can I? And where can I find the tool? P.S. I don't need my own inbound links; I can get these with google webmaster tools.
Moz Pro | | bachdeg0 -
What SeoMoz tool am I thinking of?
A few months ago I found a tool on Moz that did keyword link research. It is not keyword analysis either. It took a word and turned it into links such as dir:cabinet. I can't find it or remember or it. Does anyone else know? (I know this description sucks, sorry about that)
Moz Pro | | EcommerceSite0 -
Site Not On Google, SEOmoz shows as 43
The site I'm helping with was at one time a page 1, even #1 on page 1. Lots of changes, problems when someone else did something and dropped to page 4 for keyword. After some recent tweaking I did, it no longer shows on rankings. No penalty on Google Webmaster, in Webmaster tools it shows the sitemap processed with no errors. SEOmoz still shows it at #43 in Rankings. Why does SEOmoz see it, but I don't? Site is www.plussizeplum.com (sorry, plus size women's lingerie) and keywords are "plus size lingerie".
Moz Pro | | dlcohen0 -
Are seomoz ranking in jeopardy?
A few weeks ago Raventools announced that they would no longer be able to provide tools based on the adwords API, then withdrew that. Rand commented on a thread here discussing that and made similar noises. Today Raventools made an announcement as SERP tracking with wording that sounded a lot like it had more than a little influence from Google. Would I be really paranoid to be wondering whether the Rankings tools in seomoz could be at risk?
Moz Pro | | matbennett1 -
SEOMoz Private Message Settings
Hi all, Is there a way to be notified (to my personal email address) when I get sent a private message? Thanks,
Moz Pro | | Unity
Davinia0 -
Does SEOMoz ever work?
Hi, I've signed up for the free 30 day trial and I'm on the edge of not actually subscribing to the service. I go through the Q & A boards which I find really interesting and hope I can add value there in the future, but the tools interest me more (and this is where the issue lies. Do they ever work? The Keyword difficulty tool just constantly says to come back in 20 minutes and I don't think the Rank Tracker has worked for at least half my freebie 30 days. Have the tools always been this flaky or is it a blip?
Moz Pro | | orlandovisiting1 -
Links not appearing on Open Site Explorer
My site gained several new inbound links during December and only two of them are not all showing up on the latest Linkscape update. It seems to be the links that were created at the end of the month which are showing up, whereas a handful at the beginning of the month are nowhere to be seen. All the linking pages have been indexed by Google the links are do-follow, and one of the sites in particular is not obsure and has a DA in the 90's. I appreciate the Linkscape doesn't index everything, but I would have thought that more tof the results of my efforts would have shown up in OSE. I'd be really grateful if anyone could explain this to me please. Thanks Ben
Moz Pro | | atticus70 -
Campaign data via API
I am currently in the process of building an in house system for managing our clients SEO campaigns. One of the features that we will be including is a customer login where clients can view their reports and site progress. We plan on providing rankings and traffic stats within this which we will collect on a weekly basis to store historical changes. While I could integrate into analytics for traffic and create my own web crawler for rankings, this seems a waste since I already have that data in one central location. Looking through the moz API details it seems to have lots of functions for links but nothing relating to the campaigns. Is there any way or are there any plans to open up campaign data to an API? If I could do this I would certainly upgrade to allow each client to have their own campaign.
Moz Pro | | PPCnSEO0