PowerShell to translate text with Google Translator Endpoint API without api key

i been working on some Bot to search around internet and find popular search terms across all countries and came across situation where the search terms were same but but difficult to compare due to different language.
I wanted to find some translator API like google translator API or Microsoft translator API but they work with token and come with some limitations so decided to find something without token of limitation. during search i came across google translator endpoint/api url without api key @ https://github.com/ssut/py-googletrans/issues/268
Below is sample code to translate and text via PowerShell:
function PS-Translate {
param (
[Parameter(Mandatory)]
[string]$Text,
[Parameter(Mandatory)]
[string]$TargetLanguage,
[Parameter()]
[string]$SourceLanguage="auto"
)
$Url = “https://translate.googleapis.com/translate_a/single?client=gtx&sl=$($SourceLanguage)&tl=$($TargetLanguage)&dt=t&q=$Text”
$Res = Invoke-RestMethod -Uri $Url -Method Get
$Translation = $Res[0].SyncRoot | foreach { $_[0] }
return $Translation
}
PS-Translate -SourceLanguage auto -TargetLanguage nl -Text “good morning”
(Visited 86 times, 1 visits today)