Api format fix to support multiple queries