starting process of querying api