Is there any way to get algolia result without using the ui

I want to store the results of search in an array in react , but when i do this using the ui it re renders infinitely , is there any way to get the results directly ?