Hi,
Thank you for reaching out.
For the keyword text, you can use: googleAdsRow.getSegments().getKeyword().getInfo().getText().getValue()
For the ad group criterion ID, you have to get the resource name by using the following: googleAdsRow.getSegments().getKeyword().getAdGroupCriterion().getValue()
As a tip for getting these values, you can print the whole GoogleAdsRow to the console and follow the printed hierarchy.
Regards,
Mitchell
Google Ads API Team

ref:_00D1U1174p._5004Q219gK4:ref