Searches always use the default (active) index defined in the vault config. This applies to the client and the API methods.
The desktop client can start displaying results a bit sooner due to optimizations, and this is also why results can change a bit after some time (typically <1 second). When using the API that won't happen.
