#!/usr/bin/perl -w

use strict;
use warnings;
use Carp;

use WebService::Browshot;

my $browshot = WebService::Browshot->new(
	key	=> 'my_api_key',
	debug	=> 0, # no more debug information
);


my $list = $browshot->screenshot_search(url => 'google.com', limit => 5, status => 'finished'); # last screenshots of google.com
foreach my $id (keys %$list) {
	my $url = $list->{$id}->{final_url};
	print "#$id $url\n";
}
print "\n";


# no match
$list = $browshot->screenshot_search(url => 'foo.bar');
print "Screenshots for foo.bar: ", scalar(keys %$list), "\n";