Skip to main content

EANSearch

A Python class for EAN and ISBN name lookup and validation using the API on https://www.ean-search.org

Compatible with Python 2.x and 3.x

You can install the eansearch module directly with pip:

python -m pip install eansearch

Then use EANSearch in your own scripts like this:

from eansearch import EANSearch

# get a token from https://www.ean-search.org/ean-database-api.html
apiToken = "secret"
ean = "5099750442227" # Thriller

eansearch = EANSearch(apiToken)

name = eansearch.barcodeLookup(ean)
print(ean, " is ", name)

# more detailed result, preferrably in English (1)
product = eansearch.barcodeSearch(ean, 1)
print(ean, " is ", product["name"].encode("utf-8"), " from category ", product["categoryName"], "(Google ID", product["googleCategoryId"], ") issued in", product["issuingCountry"])

# search for ISBN-10, use barcodeLookup() for ISBN-13
isbn = "1119578884"
title = eansearch.isbnLookup(isbn)
print(isbn, " is ", title)

ean = "5099750442227" # Thriller
ok = eansearch.verifyChecksum(ean)
print(ean, " is ", "OK" if ok else "Not OK")

# search for product name "iPod", get the first page of the results, only English results
eanList = eansearch.productSearch("iPod")
for product in eanList:
	print(product["ean"], " is ", product["name"].encode("utf-8"))

# search for similar product names, get the first page of the results, in any language
eanList = eansearch.similarProductSearch("iPod with extra features", 0, 99)
for product in eanList:
	print(product["ean"], " is ", product["name"].encode("utf-8"))

eanList = eansearch.categorySearch(45, "thriller")
for product in eanList:
	print(product["ean"], " is ", product["name"].encode("utf-8"))

eanList = eansearch.barcodePrefixSearch("4007249146")
for product in eanList:
	print(product["ean"], " is ", product["name"].encode("utf-8"))

# lookup the EAN for an ASIN
asin = "B00000J1V5"
ean = eansearch.findEanForAsin(asin)
print("ASIN ", asin, " is EAN ", ean)

# lookup the ASIN for an EAN
ean = "0722868396643"
asin = eansearch.findAsinForEan(ean)
print("EAN ", ean, " is ASIN ", asin)

# lookup the LCCN for and ISBN-13 / EAN
isbn13 = "9780815346333"
lccn = eansearch.findLccnForEan(isbn13)
print("ISBN-13 ", isbn13, " is LCCN ", lccn)

# lookup the EAN / ISBN-13 for and LCCN
lccn = "2020691629"
ean = eansearch.findEanForLccn(lccn)
print("LCCN ", lccn, " is EAN ", ean)

country = eansearch.issuingCountryLookup("5099750442227")
print(ean + " was issued in " + country)

barcode = eansearch.barcodeImage("5099750442227", 300, 200)
print("HTML: <img src=\"data:image/png;base64," + " encoded + "\">")

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eansearch-1.12.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eansearch-1.12.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file eansearch-1.12.0.tar.gz.

File metadata

  • Download URL: eansearch-1.12.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for eansearch-1.12.0.tar.gz
Algorithm Hash digest
SHA256 2bcde90e8ff3096f4547552638751fb112f7c8c823e57aee8b7d1888704925a2
MD5 98b0128a6157fc4e15c58c373ad61802
BLAKE2b-256 69b67a59d853c3c2a223f53905bcf03a0b75817bd0b6d7babb038d386adf8abc

See more details on using hashes here.

Provenance

The following attestation bundles were made for eansearch-1.12.0.tar.gz:

Publisher: release.yml on eansearch/python-ean-search

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eansearch-1.12.0-py3-none-any.whl.

File metadata

  • Download URL: eansearch-1.12.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for eansearch-1.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e478baad6942fed0b5ecba4a575ac235f31e3453cb43cd0b228dc582cddb3514
MD5 1428379612ea8e626b04009340fed663
BLAKE2b-256 c5d3e3998749f37c7381829058e847116fe2cb14cfa7e3aa93be84be62cb283d

See more details on using hashes here.

Provenance

The following attestation bundles were made for eansearch-1.12.0-py3-none-any.whl:

Publisher: release.yml on eansearch/python-ean-search

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.12.0 This release

2 files

1.11.0

2 files

1.10.0

2 files

1.9.0

2 files

1.8.3

2 files

1.8.1

2 files

1.7.0

1 file

1.5.0

1 file

1.4.0

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page