The joplin API works pretty well from my experience, although the note to note linkage is not great.
The export of notes dumps as guid.md file name.
I personally like it because it has the features I want, works well on mobile, local first backed up by sync (you provide the target) and the API isn't hard to use.