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
-
Old links that need to be removed
We are having a problem trying to get rid of old links that have been removed from a website that no longer exists. See links below-There are several more that we need to deal with. We have tried putting them into Google Search Console, but they keep reappearing with Moz. Since our new website is hosted on Hubspot now and not on WordPress, which these links are referring to, we are trying to determine how to remove them from being indexed since they don't exist anymore? http://intouch-marketing.com/wp-content/uploads/2015/03/mas.png
Moz Pro | | InTouchMK
19 Redirect to 4xx http://intouch-marketing.com/wp-content/uploads/2014/03/TWITTER-HASHTAG.jpg
19 Redirect to 4xx http://intouch-marketing.com/wp-content/uploads/2016/04/Tweet-Activity-analytics-for-DCuevasIM-November-January.png
19 Redirect to 4xx0 -
SEOMOZ Support: Domain Name Change in SEOMOZ
My client is changing their domain name. They are redirecting (301) all of their URLs to the new domain. Do I need to do anything in SEOMOZ to preserve the campaign?
Moz Pro | | DynoSaur0 -
Bug with seomoz level display?
Is anyone else seeing people's moz levels shown incorrectly? Spotted this yesterday, but I am getting the same today. Lots of people showing as Aspirant who shouldn't be.
Moz Pro | | matbennett1 -
Order of urls in SEOMoz crawl report
Is there any rhyme or reason to the order of urls in the SEOMoz crawl report, or are the urls just listed in random order?
Moz Pro | | LynnMarie0 -
Advanced Link Report Different Link # than Total Links??
Hi, I've downloaded a csv report for links in "advanced reports" section. At the very top in blue OSE lists overall metrics, i.e. Domain Auth, Page Auth, Linking Root Domains, and then it lists "Total Links" at 1,769. When I download the advanced report in csv I have 505 total links in Excel. Why is there a difference between Total Links and what I have downloaded? What makes up the Total Links? The report I created included, "inbound links/linking pages, Types of Links: any; Links that come from: Any Page, Any IP; Links that link to: any page on subdomain; links with properties: any; Thanks!
Moz Pro | | toby-020 -
Seomoz keyword research
Hi, does seomoz have keyword research tool? or any plan to have one in near future?
Moz Pro | | imsameer0 -
Quantity of Internal Followed Links
We compared our and competitor pages. And we have got next statistics: Internal Followed Links: 184 4,496 We are thinking about changing our shopping cart links format from /product_info.php?products_id=3547 to /product_name.html This should increase "number of our pages" and "number of links" from them.
Moz Pro | | ctam
But in case a description of products from the same category often is very similar. We worry about duplicating page content. Could you give any advice in that situation? Do Internal Links play a big role in page rank? Thanks. PS: at attached image you can find full page metrics from open site explorer. Our metrics are at left, competitors - right. BtTap.jpg0 -
How to track with SEOMOZ a website in several language
Hi, We have a customer with a website in EN, FR and ES. They used Joomfish, so each language is in a subdirectory : sitename/en sitename/fr sitename/es and they want their website to be well placed on the web for all that languages and countries: English, French, Spanish, German and Italian. It is a website for specific affiliation, that's why there is no barriers. What I need to do to use the best way SEOmoz. For the moment I created one campaign following Google US, google Germany and Google France. To go deeper, I would need to create different campaigns in my account? And also, your robot will be able to recognize the different subdirectories and languages? And to improve the SEO of this website, it wouldn't be better to have 3 domains name, one for each country? Thanks a lot in advance for your answer, Anne
Moz Pro | | ahernoux1