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
-
Thoughts on scraping SERPs and APIs
I'm perplexed about a couple of things. Google says that scraping keyword rankings is against their policy from what I've read. Bummer. We comprise a lot of reports and manual finding and entry was a pain. Enter Moz! We still manually check and compare, but it's nice having that tool. I'm confused now though about practices and getting SERPs in an automated way. Here are my questions Is it against policy to get SERPs from an automated method? If that is the case, isn't Moz breaking this policy with it's awesome keyword tracker? If it's not, and we wanted to grab that kind of data, how would we do it? Right now, Moz's API doesn't offer this data. I thought Raven Tools at one point offered this, but they don't now from what I've read. Are there any APIs out there that we can grab this data and do what we want with it? (let's day build our own dashboard)? Thanks for any clarification and input!
Moz Pro | | Boogily1 -
Finding affiliate links with opensiteexplorer
Hey guys, I'm trying to develop lists of our competitors affiliates using opensiteexplorer using the following method When logged in to seomoz, go to http://www.opensiteexplorer.org/ Search for<rival company="" domain=""></rival> Select Show ALL links from ALL pages to PAGES ON THIS ROOT DOMAIN and SHOW LINKS UNGROUPED Click 'Filter' Click_ 'Download csv'_ Open the csv in excel and filter the Target URL column for any known part of the affiliate link (example ?a_aid) - this leaves you with a list of the affiliate links Filter out duplicates Is this the best process? I have a feeling I'm missing some as OSE truncates to 25 links per domain. It would be nice also if OSE could do the filtering for me. Any better ways to do this?
Moz Pro | | pilkster2 -
Seomoz on-page analysis, how strict to be
Hello, In a competitive niche, how important is it to be strict with the seomoz on-page analysis? If it gives a page/keyword an A, am I good to go? Or do I need to be more strict in that. We've had some competition move above us and we want to make sure we're on-site optimized well. site: nlpca(dot)com Thanks.
Moz Pro | | BobGW0 -
DA or PA for link building strenght
Hello, We're doing link building for nlpca(dot)com with Open Site Explorer. 90% of the sites found that we're targeting have NLP resource sections that will probably list our site because we are an authority. My Excel Spreadsheet has the following values: Backlink Holder Site Name Site URL Site Type Tactic PA Ease (1-5) Estimated Value (1-5) Priority (Ease x Est. Value) Contact Info -- I'm only interested in strong sites - sites that will be around for the long haul, and I'm stopping aquiring sites that their resource section has a PA lower than 20. Should I be incorporating DA in some way as well? What other feedback do you have for me?
Moz Pro | | BobGW0 -
SEOmoz API - Links and Anchor Text Calls
Hi, I'm testing out the SEOmoz API - however I'm stuggling to understand the use of the Cols parameter within the "anchor-text" method. I've looped through increasing numbers of "Cols" for a standard query and there just seems to be no logical pattern.
Moz Pro | | AlexThomas
** - Could someone please enlighten me as to how this works?** E.g. of results for query: http://lsapi.seomoz.com/linkscape/anchor-text/www.seomoz.org/?Scope=term_to_page&Sort=domains_linking_page&Cols=1 1Array ( [0] => Array ( [aturid] => 86128451138 ) [1] => Array ( [aturid] => 86128451144 ) [2] => Array ( [aturid] => 86128451131 ) ) 2Array ( [0] => Array ( [atut] => seomoz ) [1] => Array ( [atut] => seomoz.org ) [2] => Array ( [atut] => seo ) ) 3Array ( [0] => Array ( [aturid] => 86128451138 [atut] => seomoz ) [1] => Array ( [aturid] => 86128451144 [atut] => seomoz.org ) [2] => Array ( [aturid] => 86128451131 [atut] => seo ) ) 4Array ( [0] => Array ( [atui] => 38845159274 ) [1] => Array ( [atui] => 38845159274 ) [2] => Array ( [atui] => 38845159274 ) ) 5Array ( [0] => Array ( [atui] => 38845159274 [aturid] => 86128451138 ) [1] => Array ( [atui] => 38845159274 [aturid] => 86128451144 ) [2] => Array ( [atui] => 38845159274 [aturid] => 86128451131 ) ) 6Array ( [0] => Array ( [atui] => 38845159274 [atut] => seomoz ) [1] => Array ( [atui] => 38845159274 [atut] => seomoz.org ) [2] => Array ( [atui] => 38845159274 [atut] => seo ) ) 7Array ( [0] => Array ( [atui] => 38845159274 [aturid] => 86128451138 [atut] => seomoz ) [1] => Array ( [atui] => 38845159274 [aturid] => 86128451144 [atut] => seomoz.org ) [2] => Array ( [atui] => 38845159274 [aturid] => 86128451131 [atut] => seo ) ) 8Array ( [0] => Array ( [atuiu] => 1 ) [1] => Array ( [atuiu] => 1 ) [2] => Array ( [atuiu] => 0 ) ) 9Array ( [0] => Array ( [atuiu] => 1 [aturid] => 86128451138 ) [1] => Array ( [atuiu] => 1 [aturid] => 86128451144 ) [2] => Array ( [atuiu] => 0 [aturid] => 86128451131 ) ) 10Array ( [0] => Array ( [atuiu] => 1 [atut] => seomoz ) [1] => Array ( [atuiu] => 1 [atut] => seomoz.org ) [2] => Array ( [atuiu] => 0 [atut] => seo ) ) Links API: Similar confusion here for:
"TargetCols"
"SourceCols"
"LinkCols" The description here http://apiwiki.seomoz.org/w/page/13991141/Links API - is a bit vague It appears that the links API spits out everything anyway - that one's less of an issue. So... could anyone explain how the Anchor-text API parameter Cols works?? Cheers!0 -
OpenSiteExplorer is not seeing all my inbound links
I know I have back links to my site from about 5 or 6 websites and most of them even show in my Google webmaster account but according to OSE I only have 1 inbound link. Is it normal for the OSE stats to be wrong? I really want to use it but am worried the info isn't going to be accurate.
Moz Pro | | JasonHegarty0 -
Competitive link finder not working
Hi guys, I just wanted to check the status of the Competitive Link Finder. I've been trying to use it for well over a week, literally trying it every day and every single time I get the "we may be a little busy" message. Are there any plans to upgrade it? I realise its a labs tool, but its actually a really useful tool which I just don't seem to be able to benefit from whatsoever. Would love to hear what the plans for this tool are. Thanks Al
Moz Pro | | dotcentric0 -
What is the best way to analyze all of the outgoing links from a website to determine which links are not beneficial?
I've recently been tasked with the SEO on an old site that was ranking somewhere on page two for desirable keyword phrases. The site was taken completely offline for a few months and started ranking on page one for the same desirable keyword phrases. The site has a lot of link partners and I think that some of the links from the site are going to undesirable pages and I'm looking for the best way to get rid of the links that are hurting the sites rankings.
Moz Pro | | kerrick-955310