$_collection = Mage::getModel('catalogsearch/query')->getResourceCollection() ->setPopularQueryFilter($storeid) ->setPageSize($count) ->load(true); foreach ($this->$_collection->getItems() as $item): echo $item->getQueryText() endforeach; Mage::getUrl('catalogsearch/result')."?q=". $_item->getName()