Fastest way to submit Queries? overhead and speed

I want to make an app with 32-bit big-endian input that I want to use to generate queries to engine, What is the best method to use, I am leaning towards using API, but seems there are a few different options out there, I was wondering are there any other suggestions?