That will require that your API has some kind of filter logic so you can be able to filter the records, and you will have to call your API on the Onchange() event of the filter, it won't be the best performance.
I attached an oml with the same principle as above but using a REST API.
Hope it helps!