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
-
Do you get link equity from a redirect service?
When using a redirect service, do you get link equity from the redirect service or only from the linking website? Using opensite explorer in Moz, always shows me directory and redirect services as most important contribution for the domain authority. But I'm questioning if this is true. P.S. I'm not asking if link equity is passed from the linking website. That question has been answered many many many times. (hint: the answer is yes). H58xHAl.png pGH7e48.png
Moz Pro | | jasny0 -
Link Analysis-Moz analytics
Good afternoon, I relay hope someone can help me out with this report In link analysis I have viewed inbound links where I see many links linking to our site but among them I see also many times our site listed with various anchor text. How is this possible. Our site is linking to our site or what? It realy does not make sense to me. Can somebody explain me this please?
Moz Pro | | Rebeca10 -
Does SEOMOZ planing to restructure OSE metrics?
As you know SEO slowly turning into SEM and some metrics and numbers from Open Site Explorer are no so relevant any more. As a customer of SEOMOZ product i am warning if you guys are planning to add more value and ranking metrics according to the new ranking metrics and factors to your tools?
Moz Pro | | JasonOliveira0 -
Organic search visits in SEOMoz reporting
hi Are the organic search visit figures in SEOMoz traffic reporting unique or total visits ? cheers dan
Moz Pro | | Dan-Lawrence0 -
Question about how to do keyword research on SEOMoz
Is there a way I can check what are the Keywords that drive traffic to a specific website using SEOMoz?
Moz Pro | | theLotter0 -
Competitive Link Finder
Hi, just wondering if I am the only one who is not having much luck lately using the Competitive Link Finder . In the past it has worked pretty well. But as of the past week or so, it has only returned on link. I know there are many of them which should be found. Anyway, just curious if I am solo with this issue.
Moz Pro | | APICDA0 -
Is the SEOMoz Rank Tracker still accurate?
I monitor several keywords on several domains and i have found that rank tracker gives me one result yet when searching via Google myself (on different machines) i get a different result. I've tried several devices on different networks so there is no chance that Google is remembering my searches as such and i ensure that i am always signed out of my account. All devices provide the same results yet Rank Tracker provides a completely different result. It's as though Rank Tracker is a day ahead or something. Can anyone shed any light for me please?
Moz Pro | | MarkHincks0 -
External Links through Open site explorer
I have just ran an Open site explorer query on our site due to having one of a constant ranking keywords drop, and found that we have 48 new links appear on the report under the anchor text 'home' These are not normal links, and I cannot see where or how these have been connected to our site for example: <colgroup span="1"><col span="1" width="696"></colgroup>
Moz Pro | | hickboy5
| http://regvac.com/TrIsland.swb <colgroup span="1"><col span="1" width="696"></colgroup>
| http://meteonorm.com/fileadmin/tmy3/722066ndry3.rdm | <colgroup span="1"><col span="1" width="696"></colgroup>
| http://www.sexintheshower.net/downloads/SS960-12-pack.psd?ActDo=ShowArt&Information_ID=2396&Parent_ID=&type=&Langue_ID=An&rubID=3068473 | My question is how and why are these appearing on the seomoz open site explorer report? What are they? How can I get them removed, and let google know this was nothing to do with us? Thanks S |0