Maybe this is of interest https://laurentcazanove.com/blog/obsidian-rag-api