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
-
Difference Between equity passing and follow links
Hi, I am recently seeing two more new options in the Opensiteexplorer filter options. equity passing links
Moz Pro | | Dexjj
non equity passing links
nofollow
dofollow What is the difference between an equity passing links and dofollow links. Can you guys help me.4 -
Difference between Seomoz Competitive Domain Analysis and OSE link data?
Any reason these numbers are so much different? SeoMoz Competitive Domain Analysis:
Moz Pro | | fibers
Followed Linking Root Romains: 288
Total Linking Root Domains: 338 Open Site Explorer
Linking ROot Romains: 1270 -
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 -
Quantity of Internal Followed Links
We compared our and competitor pages. And we have got next statistics: Internal Followed Links: 184 4,496 We are thinking about changing our shopping cart links format from /product_info.php?products_id=3547 to /product_name.html This should increase "number of our pages" and "number of links" from them.
Moz Pro | | ctam
But in case a description of products from the same category often is very similar. We worry about duplicating page content. Could you give any advice in that situation? Do Internal Links play a big role in page rank? Thanks. PS: at attached image you can find full page metrics from open site explorer. Our metrics are at left, competitors - right. BtTap.jpg0 -
Viewing links gained over time
Is there a way to see how the number of inbound links has changed over time for a campaign? It is hard to tell whether links are increasing for a campaign without historical data being stored so trends can be shown
Moz Pro | | MulberrySqCraig0 -
Why doesn't the BBB / Trustlink.org links show up in the Link Analysis?
I am curious why one of my client's main competitors (www.allbayhardwood.com) shows links from the Better Business Bureau and Trustlink.org (associated with BBB) but links from those sources do not show up for his domain (www.sanjosehardwoodfloors.com). He has been a BBB Acredited Business since 12/2010 and on file with them for probably as long as they have had the online version, which seems like plenty of time for the link to have been picked up. BBB has a very nice domain authority and it would be great to see these links show up. (they don't show up in webmaster tools either) Is there something I am missing? Thanks in advance guys and gals! (I know the site has other SEO issues - just getting started on pounding everything out.)
Moz Pro | | SnoBaer0 -
How often does SEOmoz reports get refreshed?
Is there a way I can refresh the reports manually instead of waiting for it to pull the updated data?
Moz Pro | | RBA0 -
I want to hire someone to write some PHP code using the SEOmoz API.
...but I'm not sure how to go about it. What I need is simple: all I want is to be able to paste a list of URLs (different domains), and have the program return the Page Authority for all those URLs. I understand I can use the free SEOmoz API, particularly the URL Metrics API. Then I want to export the data to an Excel file. That's it. Problem is, I have absolutely no clue how to do it. Obviously I'd pay someone to do it. Pay very well if you can do it professionally and quickly. How can I go about finding the right person for the job? Apologies if this is not the right place to ask this, but I don't know where else to go. Thanks.
Moz Pro | | thegreatpursuit0