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
-
Link Building Webinars
Hello all, Does anyone know of any good link building webinars coming up? thanks, Beth
Moz Pro | | cmuknbb0 -
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 -
I cant generate my Mozscape API
I have tried to generate my Mozscape API numerous times after waiting at least 20 mins between. Any help would be great.
Moz Pro | | MLMLEADZONE1 -
SEOmoz Campaign Setup: What would you do?
I've been using moz for nearly a year now. Initially when I set up our site (rac.com.au) it was as a single campaign for the rac.com.au domain. However, our business has a number of different product offerings and marketing teams (Insurance, finance, travel/tourism, automotive, security etc) - would I be better off setting each of these 'sub' brands as a campaign on their own using the 'folder' campaign setup? For example, have a campaign setup for the Insurance business (rac.com.au/insurance) folder, Finance business (rac.com.au/finance) and so forth? The advantage I see to the folder campaign setup is more specific reporting for each of the business units. Are there disadvantages to this? Any recommendations would be greatly appreciated. Cheers Ryan
Moz Pro | | Hutch_e0 -
Plurals and the SEOmoz On Page Report Card
I have some pages on my website that receive an "A" grade with the SEOmoz On Page Report Card if I use a plural term in a phrase (say, "landscape designers in Dallas") but an "F" grade if I use the singular term (say, "landscape designer in Dallas"). Is this a true and accurate reflection of how search engines see the page? Am I going to rank well for plural terms but not for singular, given the specific on-page content I'm using in this example? Or is this an opportunity for SEOmoz to tweak its' algorithm to better reflect the search engines?
Moz Pro | | ahirai1 -
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 -
SEOmoz Q&A down last few days
It seems the Q&A section had some issues since the 25th. Users could post new Q&As but they were not visible to most users. Roger was caught slacking! The issue appears to be resolved at this time. I just wanted to share to anyone who asked a question the past few days who did not receive a response you may wish to repost your question as many readers will not go back and check questions from prior days.
Moz Pro | | RyanKent1 -
Competitive Link Analysis
How can I make the a new report for the Competitive Link Analysis? My report has a date from two weeks ago and I would like to see an update.
Moz Pro | | CalgaryRealtor390