properly urlencode search queries to api