22

What is the meaning of all Google Translate query params?

client:t
sl:auto
tl:sk
hl:sk //language of the interface (default:en, you can try xx-bork or xx-hacker)
dt:bd
dt:ex
dt:ld
dt:md
dt:qc
dt:rw
dt:rm
dt:ss
dt:t
dt:at
dt:sw
ie:UTF-8 // encoding of the input (default: utf-8)
oe:UTF-8 // encoding of the output, the results (default: utf-8)
otf:1
srcrom:1
ssel:3
tsel:0
q:translate // query, what you type in the search box

I already discovered some of them.

Daniil Ryzhkov
  • 7,416
  • 2
  • 41
  • 58
To Kra
  • 3,344
  • 3
  • 38
  • 45

2 Answers2

38

I'm developing an online translator app, and this is what I found out empirically:

  • sl - source language code (auto for autodetection)
  • tl - translation language
  • q - source text / word
  • ie - input encoding (a guess)
  • oe - output encoding (a guess)
  • dt - may be included more than once and specifies what to return in the reply.

Here are some values for dt. If the value is set, the following data will be returned:

  • t - translation of source text
  • at - alternate translations
  • rm - transcription / transliteration of source and translated texts
  • bd - dictionary, in case source text is one word (you get translations with articles, reverse translations, etc.)
  • md - definitions of source text, if it's one word
  • ss - synonyms of source text, if it's one word
  • ex - examples
  • rw - See also list.
  • dj - Json response with names. (dj=1)
pcldny
  • 3
  • 2
Oleksii Serdiuk
  • 466
  • 5
  • 4
  • oh great, thanks. btw you are using google translate in your translator ? is that legal ? – To Kra Apr 09 '15 at 14:40
  • Well, I'm not sure about how legal this is, but a lot of apps seem to use this method to access Google Translate since free API was closed. I don't earn anything from my app (it's free and Open Source), so buying access to paid API would be a burden to me. – Oleksii Serdiuk Apr 10 '15 at 11:19
  • I was also thinking this way as you but then I was worried if i would release open source app that Google could legally attack me for violating, stoling their content.. You could look at this also from their perspective. – To Kra Apr 10 '15 at 11:50
  • 1
    They could but it doesn't make much sense for them from the financial point of view, I think. They won't get that much money from you, spend more paying their lawyers, and, most probably, will get some bad publicity if you manage to attract enough attention to the issue. They can, of course, request you to remove Google Translate support from your app or to completely stop distributing it. But I don't think they will drag you to court just because of this. – Oleksii Serdiuk Apr 27 '15 at 10:58
  • I hope :) I haven't published it yet – To Kra Apr 28 '15 at 08:10
5

Here are a few more:

  • client t probably represents the standalone google translate web app (as opposed to a mobile app, or the widget that pops up if you google search "translate")
  • sl is source language
  • tl is translate language (the language you want to translate into)
  • srcrom seems to be present when the source text has no spelling suggestions
Cody
  • 2,467
  • 2
  • 21
  • 30