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
-
Does SEOmoz have a Keyword Research tool similar to, say, the Google AdWords tool or the WebCEO Keyword Research Tool? And where might that be? (Sorry, I'm very new to SEOmoz Pro.)
I'm looking for an SEOmoz version of the classic WebCEO Keyword Research that would give you effective suggestions based on a keyword inquiry. I've made the switch from WebCEO, but I'm trying to find something similar to that Keyword Research tool. Am I going to just need to use the Google AdWords tool for this function or does SEOmoz have it's own version?
Moz Pro | | SmokewagonKen0 -
I keep getting Authentication Failed on the API
I have the credentials in the URL correctly but it will continue to fail authentication. I will not post them obviously but is there a problem with the API currently? I tried creating new credentials Also I have used this before so I am sure it is not a problem with the credentials. I somehow managed to get Chrome to show the data. Firefox will not and the code i have written also return authentication failed. This is a bug on your end. Please fix it ASAP.
Moz Pro | | ColumK0 -
How do you track new inbound links?
Hello Fellow SEOs, I've been charged with managing and tracking my company's linkbuilding efforts. I'd love to hear from others experienced in this area: -is there a way in OSE to sort links by date? -if this isn't possible, how can you tell what new links come in every month? Is this a manual process of downloading and comparing inbound links every week? This seems pretty tedious and I would love to hear what you all do and if there is a better way. I do have a Google Alert out for my company name, but that doesn't necessarily give me what I need. Thank you!
Moz Pro | | Jenny8675309
Jenny0 -
SEOmoz Toolbar - Am I the only one who figured this out?
I have been using the SEOmoz toolbar for a while. In the course of a day, and with so many projects going on I end up having about 15-20 tabs in Firefox open at once. Because of the toolbar, my browsing session slows to a crawl and I hate to disable the toolbar because then I have to shut down the 10 projects I am working on. I usually close down my browser when I can't take it anymore and it feels like I am browsing on my 1990's palm device. What I decided to do is install the toolbar on Google Chrome. I don't use this browser very often so now whenever I need to check out a website, I just use Chrome instead of Firefox. Maybe there is a way to turn off the toolbar that I don't know about. Any other toolbar tips?
Moz Pro | | Czubmeister0 -
Find pages containing broken links.
hi everyone, for each internal broken links I need to find all the pages that contain it. In the Seomoz report there is only a refferer link for each broken link, but google webmaster tools indicates that the dead link is present in many pages of the site. there is a way to have these data with SEOmoz or other software, in a csv report ? thanks
Moz Pro | | wwmind0 -
MozRank per Link: Valuable or Worthless?
Since the MozRank and MozTrust metrics are on a logarithmic scale, I'm wondering if it's still valuable to get a general idea of the quality of a site's link profile by calculating: MozRank / Total Links MozTrust / Total Links Would this be useful, or is it always going to be higher for sites with lower MozRank & MozTrust since it's "easier" to achieve the lower values?
Moz Pro | | conquerapathy-644120 -
Link from home page
I see an abundance of websites that don't link out at all, and there is no data available to seoMoz for the sites, some like http:// regal - diving dot com (trying not to get moderated AGAIN Innocent need to show which link and its a competitor kind of) are not linking to anyone else just internal links. How come they dont show info to SEOMOZ Should I link out from home page, is this detrimental does ANY single link from home page show google that I am not a PROPER web business. thanks
Moz Pro | | landed0 -
How to get seomoz to re-crawl a site?
I had a lot of duplicate content issues and have fixed all the other warnings. I want to check the site again.
Moz Pro | | adamzski0