NAME

WWW::SEOmoz - Perl wrapper for the SEOmoz API

VERSION

version 0.02

SYNOPSIS

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 );

DESCRIPTION

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.

METHODS

new

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.

url_metrics

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.

SEE ALSO

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

AUTHOR

Adam Taylor <ajct@cpan.org>

COPYRIGHT AND LICENSE

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.