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!
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
-
How do Infographics provide links? (example inside)
Hi, I don't get it...
Moz Pro | | BeytzNet
I've encountered the following infographic that seemed to do well: http://www.brilliance.com/4cs-of-diamonds-infograph As you can see, the page has thousands of social shares from Tweets to Facebook and obviously Pinterest. However, when I placed this page on Open Site Explorer (click to view) I see only 9 external links and page authority of 28/100. And this seems to me like a successful infographic. Any explanations? Thanks0 -
Finding affiliate links with opensiteexplorer
Hey guys, I'm trying to develop lists of our competitors affiliates using opensiteexplorer using the following method When logged in to seomoz, go to http://www.opensiteexplorer.org/ Search for<rival company="" domain=""></rival> Select Show ALL links from ALL pages to PAGES ON THIS ROOT DOMAIN and SHOW LINKS UNGROUPED Click 'Filter' Click_ 'Download csv'_ Open the csv in excel and filter the Target URL column for any known part of the affiliate link (example ?a_aid) - this leaves you with a list of the affiliate links Filter out duplicates Is this the best process? I have a feeling I'm missing some as OSE truncates to 25 links per domain. It would be nice also if OSE could do the filtering for me. Any better ways to do this?
Moz Pro | | pilkster2 -
SEOMoz reports and 404 errors
My SEOMoz report shows a 404 error, found today for this url: http://globalheavyhaul.com/google.com i do not have this anchor text anywhere on my website. How did Roger figure out that somebody looked for that page? Do I need to worry about 404 errors that are the result of user mistakes, instead of actual bad links?
Moz Pro | | FreightBoy0 -
SEOMoz Q&A having some issues?
Apologies if this has been asked. I was browsing Q&A and got a Ruby error page, reloaded and everything was fine. However a bunch of the topics are kind of messed up, and it looks like a chunk of them are missing now. For example my 'questions I've answered' section of My Q&A only has the newest question and the oldest question, and when I sort the SEOMoz Tools category by newest I get one recent post and then the next one is from November of last year. You guys having database problems?
Moz Pro | | icecarats0 -
How long does the seomoz crawl take?
It's been doing it's thing for over 48 hours now and Ive got less than 350 pages... is this norma? It's NOT the first crawl.
Moz Pro | | borderbound0 -
Is the Competitive Link Finder having issues?
Hi there, Been trying to use the Competitive Link Finder off-and-on for about an hour now. It keeps telling me it's busy. Is there something known going on right now? And if so, do we know when it comes back? Best Regards, Daniel @ Path Marketing.
Moz Pro | | PathMarketing0 -
Which would you chose? Link on PA56 with 88 OBL's and 80 IBL's or a link on a PA75 with 225 OBL's & 40 IBL (Same Domain)
Which would you chose? Link on PA56 with 88 OBL's and 80 IBL's or a link on a PA75 with 225 OBL's & 40 IBL (Same Domain) Pretty self explanatory. I want to know what metrics SEOMozzers rely on most. If you are not an expert at evaluating links for large scale development please don't muddy the waters on this question with a thin and vague answer.
Moz Pro | | DavidWolf580