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
-
I have a site that is showing Internal 0 Equity-Passing Links, 0 Internal links, and every page bar the homepage has a PageAuthority of 0\. Any suggestions on why this could be?
The website has been around for several years, although did undergo a significant redesign at the end of last year. I greatly appreciate any help.
Moz Pro | | embracedarrenhughes0 -
Is SeoMOZ Crawl Diagnostics wrong here?
We've been getting a ton of critical errors (about 80,000) in SeoMoz' Crawl Diagnostics saying we have duplicate content in our client's E-commerce site. Some of the errors are correct, but a lot of the pages are variations like: www.example.com/productlist?page=1 www.example.com/productlist?page=2 However, in our source code we have used rel="prev" and rel="next" so in my opinion we should be alright. Would love to hear from you if we have made a mistake or if it is an error in SeoMoz. Here's a full paste of the script:
Moz Pro | | Webdannmark0 -
API Limit
I have some problems with API Access. All time i send more than 10 requests per second i got HttpError() {\n "status" : "503",\n "error_message" : "This request exceeds the limit allowed by your current plan. To increase your request limit, see: http://www.seomoz.org/api/pricing"\n}. My Plan is Low Volume and continually got this 503 error. How to solve this?
Moz Pro | | Predicta0 -
Inbound Links to Subdomains
Hi I want to gather a list of sites that are linking to individual blog items. Is there a way of gathering this data easily in Open Site Explorer? I've tried putting in the url/blog domain in the search box, and this just brings up those sites that link to the blog home page. I want to see all the inbound links that link to ALL subdomains within a particular URL. Any help appreciated. thanks
Moz Pro | | goodge0 -
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 Crawler unicode bug
for the last couple of weeks the SEOMOZ crawls my homepage only and gets 4xx error for most of the URL's. the crawler have no issues with English url's only with the unicode(Hebrew) ones. this is what is see in the csv export for the crawl (one sample) : http://www.funstuff.co.il/׳ž׳¡׳™׳‘׳×-׳¨׳•׳•׳§׳•׳× 404 text/html; charset=utf-8 you can see that the URL is Gibberish please help.
Moz Pro | | AsafY0 -
Need assistance with tool development using SEOMoz & Google APIs
I don't know where the right place to ask this is, but I work for an SEO agency, and we are looking for someone to help us with development of some tools utilizing the SEOMoz API and probably the Google API as well. Does anyone know where I could find a person with some previous experience with development using these APIs? We've had poor luck just trying to use a developer without specific experience in this area or at least some SEO knowledge. If you're a developer and would like to talk with us, you can contact me directly if you prefer, rather than post your contact info publicly, but I welcome any helpful thoughts or ideas regarding development of SEO tools. Thanks,
Moz Pro | | BandLeader
John
jmaher [at] mcdia.com0 -
Internal link question - compared with my competitors
Dear all, I started to working on SEO on my website http://www.techstation.it and I have some thing that I would clarify. I see a lot of differences between internal links of my website and my competitors that usually are placed a bit better. (Please check attached image). They have A LOT of internal links, about 2.000+ instead 137 (mine), that's wrong in my SEOMOz dashboard. Every news and article page has 120-130 links to other contents. About teh external followed links: Mine: 1,674 #1: 2,018 #2: 316 (????) - this is placed really good for some competitive keywords #3 (best ranked): 7,905 links I have two more points that I would fix: Articles ranking We were one of the first 5-6 website that published at the launch day the review of Intel Core i7 3960X CPU and started with a ranking in the last first page results, a few days alter in the second and now we are at the end of the second page. This happens .. I think... every time 😕 All my article pages are graded with "A grade" in the control panel. So what should I do for increase my rankings? Thank you very much in advance! Alex
Moz Pro | | techstation0