`/usr/bin/mdimport -d3 -t`-like C-api

I'd like to use the mdimport libraries to provide data to a MacOS application, specifically to extract kMDItemTextContent from a file. Is there an available API to that allows this so as to not fork/exec /usr/bin/mdimport -d3 -t <file> as a sub-program?
`/usr/bin/mdimport -d3 -t`-like C-api
 
 
Q