NAME

Net::EANSearch - Perl module for EAN and ISBN lookup and validation using the API on https://www.ean-search.org

SYNOPSIS

use Net::EANSearch;

my $eansearch = Net::EANSearch->new($API_TOKEN);

my $product = $eansearch->barcodeLookup('5099750442227');

my $book = $eansearch->isbnLookup('1119578884');

DESCRIPTION

Net::EANSearch is a class used to search the ean-search.org barcode database by EAN, ISBN or keyword.

METHODS

new($token)

Constructs a new Net::EANSearch object, used to send queries. Set the API token used for all subsequent queries.

barcodeLookup($ean [, $language])

Search the database for an EAN barcode.

Optionally, you can specify a preferred language for the result. See appendix B in the manual for all supported language codes.

isbnLookup($isbn)

Lookup book data for an ISBN number (ISBN-10 or ISBN-13 format).

barcodePrefixSearch($prefix [, $language, $page])

Search for all EANs starting with a certain prefix.

Optionally, you can specify a preferred language for the results.

If there are many results, you may need to page through the results to retrieve them all. Page numbers start at 1.

productSearch($name [, $language, $page])

Search the database by product name or keyword (exact search, all parts of the query must be found). If you get no results, you might want to try a similarProductSearch().

Optionally, you can specify a preferred language for the results.

If there are many results, you may need to page through the results to retrieve them all. Page numbers start at 1.

similarProductSearch($name [, $language, $page])

Search the database by product name or keyword (find similar products, not all parts of the query must match). You probably want to try an exact search (productSearch()) before you do a similarProductSearch().

Optionally, you can specify a preferred language for the results.

If there are many results, you may need to page through the results to retrieve them all. Page numbers start at 1.

categorySearch($category, $name [, $language, $page])

Search a certain product category for a product name or keyword. See appendix C in the API manual for category numbers.

Optionally, you can specify a preferred language for the results.

If there are many results, you may need to page through the results to retrieve them all. Page numbers start at 1.

issuingCountry($ean)

Look up the country where the EAN code was registered. This may or may not be the country where the product was manufactured.

barcodeImage($ean [, $width, $height])

Generate a PNG image with the barcode for the EAN number.

verifyChecksum($ean)

Verify if the checksum in the EAN number is valid.

HOMEPAGE

The EAN database is hosted at https://www.ean-search.org.

For API keys visit https://www.ean-search.org/ean-database-api.html.

SOURCE

Source repository is at https://github.com/eansearch/perl-ean-search.

AUTHOR

Relaxed Communications GmbH, <info@relaxedcommunications.com>

COPYRIGHT AND LICENSE

Copyright 2024 by Relaxed Communications GmbH, <info@relaxedcommunications.com>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.30.0 or, at your option, any later version of Perl 5 you may have available.