Google Books Highlights Export
Export your highlights from Google Books into a convenient format.
Google Books is able to sync your highlights to a folder in your Google Drive account, typically called "Play Books Notes", but extracting these highlights to a more useful form does not appear to be supported.
Given the folder ID of your "Play Books Notes" folder in Google Drive, this tool can save your highlights, including links back to the original sections in your books.
It outputs a single JSON file by default, or Markdown with --format markdown
(one .md file per book plus an index.md).
Setup
Getting your folder ID
You will need to find the folder ID for your Play Books notes. To do this,
navigate to your Play Books notes folder in Google Drive, and take the folder
ID from the URL. The URL should look like
https://drive.google.com/drive/folders/xxxxxxxxx; the folder ID is xxxxxxxxx.
Installing the tool
uv tool install google-books-highlights-export
Or, to run from a checkout of this repo:
cd cli
uv run google-books-highlights-export <FOLDER ID>
Running
You are then ready to run
$ google-books-highlights-export [--format json|markdown] -o OUTPUT <FOLDER ID>
With the default --format json, the script writes all your highlights to a
single JSON file at the path given by -o. For example (pretty-printed here;
the file itself is written on one line):
[
{
"title": "Pride and Prejudice",
"notes": [
{
"content": "It is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife.",
"link": "https://play.google.com/books/reader?id=AAAAAAAAAAAA&pg=GBS.PA1"
},
{
"content": "I could easily forgive his pride, if he had not mortified mine.",
"link": "https://play.google.com/books/reader?id=AAAAAAAAAAAA&pg=GBS.PA18"
}
]
},
{
"title": "Moby-Dick",
"notes": [
{
"content": "Call me Ishmael.",
"link": "https://play.google.com/books/reader?id=BBBBBBBBBBBB&pg=GBS.PA1"
}
]
}
]
With --format markdown, the script will output:
- One file per file in the specified Google Drive folder. Google Play Books creates one file per book you take notes in, so this means the script will generate one file per book. Each file will contain the text for all your highlights for that book, and each highlight will have an associated URL that will open the highlighted section of the book in the web reader.
- An index file, linking to all the generated files.
These go in the directory given by -o. For example, index.md:
# Books
- [Pride and Prejudice](<Pride and Prejudice.md>)
- [Moby-Dick](<Moby-Dick.md>)
and Pride and Prejudice.md:
# Pride and Prejudice
> It is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife.
[Open in Google Books](https://play.google.com/books/reader?id=AAAAAAAAAAAA&pg=GBS.PA1)
> I could easily forgive his pride, if he had not mortified mine.
[Open in Google Books](https://play.google.com/books/reader?id=AAAAAAAAAAAA&pg=GBS.PA18)
Google OAuth
The tool comes with its own Google OAuth client config, so there's nothing to set up. (For desktop apps, Google doesn't treat the OAuth client secret as confidential, which is why it can be shipped with the tool.)
You can use a different OAuth client with --client-config path/to/config.json.
The tool only has the drive.file scope, so your client's Google Cloud project
will need to have been granted access to your Play Books notes files.
When you run the tool for the first time, it will launch your web browser which will ask you to authenticate your project against your Google account to access the files from Google Drive.
Metadata
Release files for google-books-highlights-export 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| google_books_highlights_export-0.3.0.tar.gz | 5.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| google_books_highlights_export-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.3 kB
Release files / google_books_highlights_export-0.3.0.tar.gz
| Download URL | google_books_highlights_export-0.3.0.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c662de371f7a722b7daae02d647e1e3a6af5b5ee73df05f76cbbc059d1b269c6
|
|
BLAKE2b-256 checksum How to use checksums |
7c3412ad9a65c9c7cdee21942c0e53ff56bad94f0c4eb2e4f48920358ea74240
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / google_books_highlights_export-0.3.0-py3-none-any.whl
| Download URL | google_books_highlights_export-0.3.0-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
52f231579f49984f6000303bccbdfbaeae55931807a34c0db4773bacd5060ece
|
|
BLAKE2b-256 checksum How to use checksums |
99e4d8c0297c07415916360c736dfc2f2935586eea04c3399b1da4793dc9905b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for google-books-highlights-export 0.3.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.