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
-
ERROR: Too Many on-page links!
User wise, my product menu @LEDSupply.com is user friendly, but I'm concerned that it might be seen by crawlers as bad because of the TOO MANY ON-PAGE LINKS error I am getting in my moz crawl report. Is it really counting all the links in every drop-down menu? If so, is there are resource on how to fix it????
Moz Pro | | saultienut0 -
Not able to find Do follow Link as shown in Seomoz Toolbar
SEO Moz Toolbar showing 1 do follow link in every forum question page Have checked source twice thoroughly - not able to trace that do follow link - to which site is that do follow link going to Some sample links - http://www.mycarhelpline.com/index.php?option=com_easydiscuss&view=post&id=426&Itemid=78 - http://www.mycarhelpline.com/index.php?option=com_easydiscuss&view=post&id=63&Itemid=78 Facebook & Google plus - both are no follow can some one help please so as to know this mysterious do follow link as shown in as letted know by SEOMOZ Toolbar
Moz Pro | | Modi0 -
Difference in data between http://pro.seomoz.org/tools/keyword-difficulty and http://lsapi.seomoz.com/linkscape/url-metrics/
Hi, Has any once else experienced any difference in data between http://lsapi.seomoz.com/linkscape/url-metrics/ and http://pro.seomoz.org/tools/keyword-difficulty Please look at the attached image. For "http://www.webmd.com/diet/guide/choosing-weight-loss-program" and "http://www.freedieting.com/" page authority and domain authority match exactly. But for "http://www.fitnessmagazine.com/weight-loss/plans/" data does not match. The data from "http://lsapi.seomoz.com/linkscape/url-metrics/" was retrieved brely 60 seconds latter after data from "http://pro.seomoz.org/tools/keyword-difficulty". We used our custom app for retrieve data from "http://lsapi.seomoz.com/linkscape/url-metrics/". The columns were matched against the specs given in "http://apiwiki.seomoz.org/w/page/13991153/URL-Metrics-API". We are retrieving following columns 1)ut(Title) 2)ueid(External Links) 3)uid(Links) 4)umrp(mozRank) 5)upa(Page Authority) 6)pda(Domain Authority) Any help will be greatly appreciated. zvFif.jpg
Moz Pro | | claytons0 -
SEOMoz Crawling Only 1 Page
I entered a new site into my dashboard 2 days ago - everything looked kosher, there were a few hundred pages crawled and a whole bunch of errors. I came back this morning to start work on the site and SEOMoz has crawled the site again, this time returning only 1 page and 0 errors. I haven't even logged in to the site since the first crawl, so I couldn't have broken anything. Has anyone seen this before?
Moz Pro | | Junction0 -
I have signed up for an seomoz trial .......
i have signed up for an seomoz trial but tried to access my account from a different laptop yesterday and could not a login. Is the trial version only accessible via the laptop i set it up from?!
Moz Pro | | GreatGifts4Kids0 -
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 -
SEOmoz LDA tool experience?
http://www.seomoz.org/labs/lda Does anyone presently use this tool as a regular part of their SEO analysis? Does anyone have any updates regarding this tool? It is still in the lab despite no updates for over 6 months. Is it being retired? Or promoted to production? If you do use the tool, what % of relevance is your goal when optimizing pages?
Moz Pro | | RyanKent0 -
SEOmoz keyword rankings in campaign report
Hi. Does anybody know where the rankings summary has moved to in the campaign reports? I want to know how many keywords have moved up or down in the last week and can't find it anywhere!
Moz Pro | | neooptic1