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
-
Not provided Data in SEOMoz reports
Hi How do SeoMoz reports deal with 'not provided' data I see my total visits from organic search for a month are same as total of both my branded and non branded keyword traffic combined yet GA is reporting 157 visits from non provided data so is SEOMoz being very clever and finding a way to decipher this not provided data and allocate it accordingly in the reports ? Or if not what ? Many Thanks Dan
Moz Pro | | Dan-Lawrence0 -
SEOmoz link report VS. open site explorer
Hi, I run a campaign on one of my new clients in the links report - i see 1970 - external links and i can press " see more in open site explorer) when i press the button, open site explorer is opened but with a message that there is no link data on this website any advice? Are you familiar with another tool that can help me investigate links to website? Thank you SEOwise
Moz Pro | | iivgi0 -
NoFollow Links from Subdomain to root domain better than DoFollow Links?
Our service at fotograf.de is a shopsystem for professional photographers. The customers can build their own website with our tool including an onlineshop to sell their pictures. Here is my question: One part of the customers use subdomains of our site like photographers.fotograf.de. On each customer website we include a backlink to our homepage www.fotograf.de. From SEO view is it better to set these links as NoFollow Links? Or should we put one Follow Link on the starting page on each site and on the other pages only NoFollow Link? Are these links bad for our SEO regarding link diversity because they all come from one root domain? Thanks for the answers! Sebastian
Moz Pro | | Sebastian230 -
Loss of Google AdWords API
Since August, we've had intermittent access to the Google Adwords API. Like others in this space, they've let us know that our access has been revoked. We've been working to restore this access, but unfortunately, we have not been able to do so. In the meantime we are working hard to find a suitable replacement that is both stable and a good fit for our customers’ needs. We wanted to let our PRO members know, first to apologize, and second to explain how this has impacted your PRO access. We understand how important it is to have all your keyword data in one place, and we're sorry for any disruptions you've experienced from not having this data source in our app.We do want to clarify that this change does not affect your data from Google Analytics. The products affected by this change are our **Keyword Analysis tool and the keyword details and **keyword analysis pages within our web app. We removed this keyword query volume data within PRO a little earlier this year. You can still generate reports, but the metrics previously pulled from the Google Adwords data source is no longer there.The good news is, we don't actually use the Google AdWords data in our calculation of keyword difficulty, so these reports are still 100% accurate—they're just missing the information we usually pull from the API, which you can find on the Google AdWords Keyword Tool here. We're so sorry about this, and understand how frustrating the loss of this data is. We're hoping to have an alternative data source soon, and we will keep you posted as we make progress. Please feel free to comment, ask questions, and get help by replying to this post. Thank you!
Moz Pro | | AaronWheeler7 -
Competitive Link Analysis not showing links.
Hate asking such a vague question, but my SEOMoz link analysis report is not showing any backlinks for a client of mine. I loaded the information the same way I did my other clients, which show all links. www.domain.com is being forwarded properly to domain.com. I know there are backlinks because I put many of them there myself over the last couple of months. Clearly this is affecting my Moz score. Not sure how to troubleshoot this. Can anyone offer suggestions? Grazie mille! Regards, Dino
Moz Pro | | Dino640 -
Can SEOMOZ do Local SEO ?
Most of our clients are local but we can not get local or regional (for example VA State or Washington DC) SERP results within SEOMOZ. it would be nice to create custom search profiles based on region (State or County) and track SERP within SEOMOZ. Ranking reports and even keyword difficulty analysis etc. within SEOMOZ are misleading for local web sites. SEOMOZ default site setup assumes every business doing SEO serves all over the US. I think it will be very beneficial if we have a choice to select State or County of local web sites during initial campaing set up at SEOMOZ. what do you think? do you know any work around of this problem? Thanks,
Moz Pro | | CertifiedSEO
Lewis2 -
How are our competitors getting these inbound linking domains?
I'm currently managing SEO for my company's website, and I'm getting into link building for the first time. As part of the process, I'm using Open Site Explorer to see who's linking into our competitor sites, to get a better sense of what's available to us in our particular avenue of e-commerce. However, I'm finding that our competitors are getting inbound links from high-authority sites pretty far afield from selling jewelry - census.gov, parallels.com, warnerbros.com, and others. I try clicking through to these links, but each link starts a download of a file. I've seen .f4v, .7z, and .apk files listed as inbound links to our competitor. How is this happening? Again, I'm new to link building, so there may be a simple answer here, and if so I apologize for asking. However, this seems really strange to me, and a difficult situation to confront.
Moz Pro | | jozaksut0 -
Historical error info on SEOMoz?
Is it possible to get a report of errors that were on a site back in April? Does SEOMoz keep that data available? There was a big decline in the number of errors on one of my sites and I'm trying to go back and see what it was. --Steve
Moz Pro | | Aggie0