What is the best way to store a unique identifier per note?

I’m trying to sync notes using a unique identifier. Currently, I use a field called “unique_id” in order to sync. Is there a better way to do this using Anki’s internals? Trying to figure this out so the notes have less fields.

The internal guid field is a unique identifier that you can access like this:

note = mw.col.get_note(1645723658598)
print(note.guid)
3 Likes