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
-
Link Building Webinars
Hello all, Does anyone know of any good link building webinars coming up? thanks, Beth
Moz Pro | | cmuknbb0 -
Where is the link prospecting tool?
I feel like last year when Moz was still SEOMoz I used a beta tool that would help you build a bunch of queries for link prospecting. You would tell it what your sites about and a few other pieces of information, and it would give you a list of google queries to get you started (ie inurl:directory <industryname> +"add site"</industryname>). However, I'm having a hard time finding this tool, or any reference to it on the web. It's also possible that it wasn't a moz tool but I'm misremembering where I found it. Does anybody have any idea what I'm talking about?
Moz Pro | | brettgus1 -
SEOmoz link report VS. open site explorer
Hi, I run a campaign on one of my new clients in the links report - i see 1970 - external links and i can press " see more in open site explorer) when i press the button, open site explorer is opened but with a message that there is no link data on this website any advice? Are you familiar with another tool that can help me investigate links to website? Thank you SEOwise
Moz Pro | | iivgi0 -
Why does SEOMoz think I have duplicate content?
The SEOmoz crawl report shows me a large amount of duplicate content sites. Our site is built on a CMS that creates the link we want it to be but also automatically creates it's own longer version of the link (e.g. http://www.federalnational.com/About/tabid/82/Default.aspx and http://www.federalnational.com/about.aspx). We set the site up so that there are automatic redirects for our site. Google Webmaster does not see these pages as duplicate pages. Why does SEOmoz consider them duplicate content? Is there a way to weed this out so that the crawl report becomes more meaningful? Thanks!
Moz Pro | | jsillay0 -
SeoMoz and incorrect results?
Just recieved my weekly Rankings and On Page report. First thing i noticed is that an important keyword dropped big time. "Rejser til Cypern" dropped from #3 to #40 ... So i checked google.dk myself (using impersonal.me) and saw i was still #3 in SERP. I ran SeoMoz's own Keyword Difficulty Report-tool. It showed me i was #3 in SERP. Now im thinking: Did i just loose my trust in Seomoz, to whom i give access to all my GA-data? What to do? Have anyone else experienced this?
Moz Pro | | alsvik0 -
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 -
Is SEOMoz better than Traffic Travis ?
I've been trying both programs for the free trial and I'm not sure which one is exactly better. they seem to me that both give a similar asepct of research, However SEOMOZ seems to be updating more frequntly. On the seconnd hand, traffic travis is way more cheaper only $97 one time fee as apposed to SEOMoz $100 per month Could someone convince me SEOMOZ is the better tool?
Moz Pro | | ilan_connnect1 -
Forum posting link building
Is answering questions on yahoo answers and forums genuine link building opportunity? I dont mean spamming much, but being a genuine member of the forums
Moz Pro | | CompleteOffice0