
WWW::SEOmoz - Perl wrapper for the SEOmoz API

version 0.02

use WWW::SEOmoz;
my $seomoz = WWW::SEOmoz->new({ access_id => 'foo', secret_key => 'bar' });
my $url_metrics = $seomoz->url_metrics( 'www.seomoz.org' );
my $links = $seomoz->links( 'wwww.seomoz.org', 100 );

WWW::SEOmoz is a simple Perl wrapper for the SEOmoz API. It currently supports the URL Metrics and Link methods of the API. Patches welcome if you'd like more of the API supported.

my $seomoz = WWW::SEOmoz->new({ access_id => 'foo', secret_key => 'bar });
Returns a new WWW::SEOmoz object. The access id and secret key can be obtained by signing up for an API account.
my $url_metrics = $seomoz->url_metrics( 'www.seomoz.org' );
Returns a WWW::SEOmoz::URLMetrics object, which encapsulates the data returned from the API for the URL passed in.
Note that the API seems to prefer URLs with the URL protocol ('http://') removed.
my $links = $seomoz->links( 'www.seomoz.org', 30 );
warn $links->all_links;
Returns a WWW::SEOmoz::Links object, which encapsulates information about the links pointing to a domain.
The second paramater is a limit to the number of results returned; if not provided it will default to thirty.
Note that the API seems to prefer URLs with the URL protocol ('http://') removed.
Also, this method call is likely to change in the future to make it more flexible and allow it to support this part of the API properly.

http://www.seomoz.org/api http://apiwiki.seomoz.org/

Adam Taylor <ajct@cpan.org>

This software is copyright (c) 2011 by Adam Taylor.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.