Can you export your highlights and notes from Apple Books?
Not as a file. Apple's user guides for Books on the Mac, the iPhone, and the iPad name no command that exports highlights and notes. What Books has is Share: on a Mac you share one note at a time, and on an iPhone or iPad you can tick several highlights and notes and send them together through the share sheet. That's the nearest thing to an export that Apple supports.
On a Mac
Apple's guide Highlight and add notes in Books on Mac covers making, changing, and removing highlights, and seeing them all: move the pointer to the top of the page and click the Highlights button in the toolbar. A click on a highlight or a note in that list takes you to its page. The same page offers them as study cards, and says that highlights and notes might not be available for every type of book.
Getting them out is on a separate page, Share book or audiobook information in Books on Mac. Under "Share book notes" the steps are to open the same list, Control-click a note, choose Share, and then choose a sharing option. The page describes this for a single note and says nothing about selecting several.
The same page has "Share book quotes", which works from the page of the book rather than from the list: select text, Control-click it, and choose Share. Apple limits a quote to 200 words, and says this kind of sharing is available only in the United States.
The person who started an Apple Community thread on this in 2023, on Big Sur, couldn't find a Share button at all, and had been taking screenshots of every page of notes instead.
On an iPhone or iPad
The phone and the tablet do better. Apple's iPhone guide and iPad guide give the same tip: tap the page, open the menu, tap Contents, then Highlights, tap the select button, tick the highlights and notes that you want, and share them in one go. The same selection deletes several at once.
So the practical route for a long book is to do it on the phone. Highlights you make on the Mac reach the phone through iCloud if the sync is on. Apple's page Use iCloud to read and listen on all your devices puts the switch in Books > Settings > General, as “Collections, bookmarks, and highlights”, and Apple's troubleshooting article says to check that option and, on the iPhone or iPad, that Home and iCloud Drive are on in the Books settings.
Apple's guides stop at the share sheet: they name no format that another reading app can import. Why highlights don't move from one reading app to another explains what a second app would need to place them again.
The database on the Mac
Books keeps its annotations in a SQLite file. Apple doesn't document it, but a March 2024 reply in that same thread, written for macOS Sonoma, gives the file as AEAnnotation_v10312011_1727_local.sqlite in ~/Library/Containers/com.apple.iBooksX/Data/Documents/AEAnnotation/, with the annotations in the table ZAEANNOTATION. The reply opens it with sqlite3 in Terminal. On a newer Mac, macOS may refuse even a listing of the Books container with “Operation not permitted” (where Apple Books keeps its files). Treat that as reading a private file: Apple could rename it or change its tables in any update, and copying the file before you open it is the safe habit.
Other readers, for comparison
Kobo and Kindle each give you a file. Kobo.com writes PDF, HTML, plain text, or Markdown for books bought from Kobo or read through Kobo Plus, where the author allows it, and on a Mac the highlights can also come off the device itself (how to export Kobo highlights on a Mac). A Kindle keeps My Clippings.txt on the device (where your Kindle highlights are). In Readwyn, the Notebook's “Export” saves the highlights and notes of one book, made in its reader or brought in from a Kobo or a Kindle, as Markdown or plain text, with the chapter titles, the page of each highlight, and its note.