Created query API.