Skip to main content

ISBNLab Python client

The official Python client for the ISBNLab book metadata API. Look up a book by ISBN and get its title, authors, publishers, series, BISAC genres, formats, page count, description and every other edition, from a catalog of more than 100 million editions. It also validates and converts ISBN-10, ISBN-13, EAN and Amazon ASIN.

Install

pip install isbnlab

Python 3.10 or later.

Get an API token

Create a free ISBNLab account and copy your API token from your profile. The Free plan includes 1,000 calls a day; see pricing for more.

Quick start

import os
import isbnlab

config = isbnlab.Configuration(access_token=os.environ["ISBNLAB_API_TOKEN"])

with isbnlab.ApiClient(config) as client:
    books = isbnlab.BooksApi(client)
    book = books.get_book_by_isbn("9780765302304")

    print(book.title)               # The Gathering Storm
    print(book.authors[0].name)     # Robert Jordan
    print(book.publish_date.year if book.publish_date else None)

    for edition in book.other_editions or []:
        print(edition.isbn13, edition.title)

Many fields are empty for some books, so every field can be None. Field names are snake_case (book.number_of_pages, book.other_editions); book.to_dict() gives the API's own camelCase names.

Linked records carry ids you can look up directly (author, publisher, subject and genre lookups need a Standard or Pro plan):

with isbnlab.ApiClient(config) as client:
    book = isbnlab.BooksApi(client).get_book_by_isbn("9780765302304")
    author = isbnlab.AuthorsApi(client).get_author(str(book.authors[0].id))

    print(author.bio)

Errors

Any response other than 2xx raises isbnlab.ApiException (or a subclass such as NotFoundException or ForbiddenException). It carries the HTTP status, the headers, and the response body, whose detail explains the reason:

from isbnlab import ApiException

try:
    book = books.get_book_by_isbn("9780000000000")
except ApiException as e:
    if e.status == 404:
        print("Not in the catalog")
    elif e.status == 429:
        print("Daily limit reached; retry after", e.headers.get("Retry-After"), "seconds")
    elif e.status == 403:
        print("Your plan does not include this endpoint")
    else:
        raise

What you can call

Class Method Plan
BooksApi get_book_by_isbn(isbn), get_book_by_asin(asin), get_book_by_id(id) Free
IsbnApi parse_isbn, isbn10_to_isbn13, isbn13_to_isbn10, isbn_to_ean, ean_to_isbn, isbn_to_asin, asin_to_isbn Free
BooksApi get_book_cover_by_isbn(isbn), get_book_cover_by_asin(asin) Standard
AuthorsApi get_author(id), find_author(search) Standard
PublishersApi get_publisher(id), find_publisher(search), get_publishers_by_prefix(prefix) Standard
SubjectsApi get_subject(id), find_subject(search) Standard
GenresApi get_genre(id), find_genre(search) (name or BISAC code) Standard
BooksApi search_books(query, limit=, page=, max_results=) Pro
BooksApi get_editions_by_isbn(isbn), get_editions_by_asin(asin) Pro

Every method also has a ..._with_http_info() version that returns the status code and headers as well (for example the rate-limit headers).

Reference for every method and model: docs/. Field-by-field documentation: API documentation.

Development

isbnlab/ and docs/ are generated from the API's OpenAPI document with OpenAPI Generator, so changes to them are made in the generator and arrive with the next release; please open an issue rather than a pull request for those folders. README.md, pyproject.toml and tests/ are maintained by hand.

pip install -e ".[test]"
pytest

License

MIT. Maintained by ISBNLab, the book metadata API.

Metadata

Release files for isbnlab 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for isbnlab 0.1.0
File Size Uploaded Provenance Actions
isbnlab-0.1.0.tar.gz 34.6 kB With provenance Details for isbnlab-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for isbnlab 0.1.0
File Interpreter ABI Platform Actions
isbnlab-0.1.0-py3-none-any.whl Python 3 none any Details for isbnlab-0.1.0-py3-none-any.whl

Total release size: 108.5 kB

Release files / isbnlab-0.1.0.tar.gz

Download URL isbnlab-0.1.0.tar.gz
Size 34.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4c9834bfa82581d0a5baf2fb20b4ba2af752cccb8e4c7f1e72bea5bf6d5fb126
BLAKE2b-256 checksum
How to use checksums
ecc7ab02a85b8b5235009e743563134652cf35ff16ed4dcd8057dca8da6597ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / isbnlab-0.1.0-py3-none-any.whl

Download URL isbnlab-0.1.0-py3-none-any.whl
Size 74.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de06dd736b6dfd1884ef9b256b60fc42a1c21aa5c72eebd21bf0b2aff929766e
BLAKE2b-256 checksum
How to use checksums
1c1241d9eef63a8519324b19fa0fadd20e990dc2d3fad768d1755c37f2e1e625
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for isbnlab 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for isbnlab-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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