PHPackages                             imonroe/bookscanner - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. imonroe/bookscanner

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

imonroe/bookscanner
===================

Scan the barcode on a book, get back data on the book based on ISBN

1.0.4(6y ago)3531MITPHPPHP ^7.0CI failing

Since Jul 25Pushed 6y ago2 watchersCompare

[ Source](https://github.com/imonroe/bookscanner)[ Packagist](https://packagist.org/packages/imonroe/bookscanner)[ Docs](https://github.com/imonroe/bookscanner)[ RSS](/packages/imonroe-bookscanner/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)Dependencies (2)Versions (6)Used By (0)

bookscanner
===========

[](#bookscanner)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ae735e81bfb00a1115f0012a99fed1d4352445cc9b202036af5c47a3cd053a4a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696d6f6e726f652f626f6f6b7363616e6e65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/imonroe/bookscanner)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/01c286dadbb28098e1d9a3bc4fc35c14c5e8c95885d58c0ee5b5a24111447bc3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696d6f6e726f652f626f6f6b7363616e6e65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/imonroe/bookscanner)

Give Bookscanner a barcode or ISBN number, look it up via the OpenLibrary api (), and then return you a nice PHP array with relevant details.

Works with 10-digit or 13-digit ISBNs. It will happily take input from a text field that has been populated by a standard handheld barcode scanner. It will clean it up a little, validate the ISBN with its checksum, and then send a request to the excellent OpenLibrary API via cURL. It will parse the response, and it will return you a PHP array with all the available information.

For fields with more that one element, e.g., a book with several authors, the field will be returned as a comma-separated string.

Install
-------

[](#install)

Via Composer

```
$ composer require imonroe/bookscanner
```

Usage
-----

[](#usage)

```
$isbn_data = imonroe\bookscanner\Bookscanner::get_isbn_data($isbn_string); // from a text input, presumably a scanned barcode

$isbn = $isbn_data['isbn'];  // formatted ISBN number
$info_url = $isbn_data['info_url'];  // OpenLibrary URL to information page
$title = $isbn_data['title'];  // The title of the work
$subjects = $isbn_data['subjects']; // A string of subjects, separated by commas
$publisher = $isbn_data['publisher'];  // The publisher of the work
$author = $isbn_data['author']; // The author. If there are multiple, this will be a comma-delimited string
$publication_date = $isbn_data['publication_date'];  // The date the work was published
$number_of_pages =$isbn_data['number_of_pages'];  // Number of pages
$physical_format =$isbn_data['physical_format'];  // A string describing the physical format
$thumbnail_url = $isbn_data['thumbnail_url'];  // A URL to OpenLibrary's cover thumbnail.
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Ian Monroe](https://github.com/imonroe)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~213 days

Total

5

Last Release

2363d ago

PHP version history (2 changes)1.0.0PHP ~5.6|~7.0

1.0.3PHP ^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/afb5927cefc4188816f1829f1c3332f83a18a8badcf42db1befb2d08df3a9cb5?d=identicon)[imonroe](/maintainers/imonroe)

---

Top Contributors

[![imonroe](https://avatars.githubusercontent.com/u/1263892?v=4)](https://github.com/imonroe "imonroe (7 commits)")

---

Tags

barcodeISBNimonroebookscanner

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/imonroe-bookscanner/health.svg)

```
[![Health](https://phpackages.com/badges/imonroe-bookscanner/health.svg)](https://phpackages.com/packages/imonroe-bookscanner)
```

###  Alternatives

[mike42/escpos-php

PHP receipt printer library for use with ESC/POS-compatible thermal and impact printers

2.7k1.9M22](/packages/mike42-escpos-php)[fale/isbn

ISBN library

88524.8k6](/packages/fale-isbn)[barcode-bakery/barcode-1d

Generates 1D barcodes from a PHP server to a file or HTML document.

10146.1k1](/packages/barcode-bakery-barcode-1d)[ayeo/gs1_barcode

Generate GS1-128 standard barcode

52112.1k](/packages/ayeo-gs1-barcode)[nicebooks/isbn

ISBN tools

29336.9k3](/packages/nicebooks-isbn)[bitgrave/barcode-bundle

provide barcode rendering service into your Symfony2 application.

25444.0k1](/packages/bitgrave-barcode-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
