pass the text into api retriver