protected function query($yql)
    {
        $params = $this->urlParams;
        $params['q'] = $yql;
        $url = $this->url . '?' . http_build_query($params);

        // query the API
        try {
            $response = $this->guzzle->request('GET', $url);
        } catch (TransferException $e) {
            throw new ConnectionException($e->getMessage());
        }

        // process response
        $response = json_decode($response->getBody(), true);

        if (isset($response['query']) && isset($response['query']['results'])) {
            return $response['query']['results'];
        } else {
            throw new ResponseException('Response body is malformed.');
        }
    }