Hi, I suggested something similar in Allow to reference blocks in three ways: by ID, name, namespace. Your idea is request’s first point:
Mind voting there?
Concerning block search: AFAIK you can either search blocks by their ID or need to do a full-text search.
For example logseq.api.search("foo")
provides all blocks that include content foo
.