How to verify text for value of html tag in api testing?

Hello, how do I verify text (content) between html tags?
Example in this picture, I want to verify that the < title > tag should show the text “Google”

In test case, I try to give script like this

response = WS.sendRequest(findTestObject('Google'))
WS.verifyElementText(response, 'title', 'Google')

And the error response is:

Unable to verify element text (Root cause: groovy.json.JsonException: Unable to determine the current character, it is not a string, number, array, or object

The current character read is '<' with an int value of 60
Unable to determine the current character, it is not a string, number, array, or object
line number 1
index number 0
<!doctype html><html itemscope=""

html code is just xml.
so, you can parse the response using XmlSlurper or XmlParser, locate the node using Gpath and check the value.
see:
https://groovy-lang.org/processing-xml.html