{"_id":"google-translate-token","_rev":"4-4b780d18e35183adda2f8f655b453af6","name":"google-translate-token","description":"A package that generates the necessary token to use the Google Translate API for free","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"google-translate-token","version":"1.0.0","description":"A package that generates the necessary token to use the Google Translate API for free","main":"index.js","scripts":{"test":"xo && ava"},"repository":{"type":"git","url":"git+https://github.com/matheuss/google-translate-tk.git"},"keywords":["translate","translator","google","translate","api","free","language","tk","token"],"author":{"name":"Matheus Fernandes","email":"npm@matheus.top","url":"http://matheus.top"},"license":"MIT","bugs":{"url":"https://github.com/matheuss/google-translate-tk/issues"},"homepage":"https://github.com/matheuss/google-translate-tk#readme","dependencies":{"configstore":"^2.0.0","got":"^6.3.0"},"devDependencies":{"ava":"^0.15.2","webdriverio":"^4.1.1","xo":"^0.16.0"},"xo":{"space":4,"rules":{"xo/no-abusive-eslint-disable":"warn","no-eval":"warn"}},"gitHead":"0921e90f1490bf761d7ded4164bd3f16506d2fa8","_id":"google-translate-token@1.0.0","_shasum":"be943445786f00c3765dec31f490dac21228d3f8","_from":".","_npmVersion":"3.8.6","_nodeVersion":"5.11.0","_npmUser":{"name":"matheuss","email":"me@matheus.top"},"dist":{"shasum":"be943445786f00c3765dec31f490dac21228d3f8","tarball":"https://registry.npmjs.org/google-translate-token/-/google-translate-token-1.0.0.tgz","integrity":"sha512-X+cONF24KI3PP94ih3L8QlqNgVxZxsfOyJtX93UISO7TRdTSrFpp4rmDpyS/x6xRxJOLcd6ApCTAkB+tNFtc3g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBnrsNfxZqJwAtGM+f2RUgf5FjeC0JpGwX4q8SpG0znvAiBSO8zms41YCuwhAcLPCFWd0FwgjWfnyTPX6HnT6JSKLg=="}]},"maintainers":[{"name":"matheuss","email":"me@matheus.top"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/google-translate-token-1.0.0.tgz_1467338837594_0.5561245221178979"}}},"readme":"# google-translate-token [![Build Status](https://travis-ci.org/matheuss/google-translate-token.svg?branch=master)](https://travis-ci.org/matheuss/google-translate-token) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)\nA package that generates the necessary token to use the [**Google Translate API for free** :dollar::no_entry_sign:](https://github.com/matheuss/google-translate-api)\n\n## Why\n\n[translate.google.com](https://translate.google.com) uses a token to authorize the requests. If you are not Google, you do not have this token and will have to [pay $20 per 1 million characters of text](https://cloud.google.com/translate/v2/pricing).\n\nThis package is the [result](https://github.com/matheuss/google-translate-token/blob/master/index.js#L12-110) of reverse engineering on the [obfuscated and minified code](https://translate.google.com/translate/releases/twsfe_w_20160620_RC00/r/js/desktop_module_main.js) used by Google to generate such token.\n\n## How it works\n\nThe token is based on a seed which is updated once per hour and on the text that will be translated. Both are combined – by some strange math – in order to generate a final token (e.g. `820594.703830`) which is used by the API to validade the request. \n\n\n## Install\n\n```\nnpm install --save google-translate-token\n```\n\n## Usage\n\n``` js\nconst token = require('google-translate-token');\n\ntoken.get('Hello').then(console.log);\n//=> { name: 'tk', value: '159402.284291' }\n```\n\n## Related\n\n- [`google-translate-api`](https://github.com/matheuss/google-translate-api) – A **free** and **unlimited** API for Google Translate :dollar::no_entry_sign:","maintainers":[{"name":"matheuss","email":"me@matheus.top"}],"time":{"modified":"2022-06-18T13:31:43.856Z","created":"2016-07-01T02:07:19.943Z","1.0.0":"2016-07-01T02:07:19.943Z"},"homepage":"https://github.com/matheuss/google-translate-tk#readme","keywords":["translate","translator","google","translate","api","free","language","tk","token"],"repository":{"type":"git","url":"git+https://github.com/matheuss/google-translate-tk.git"},"author":{"name":"Matheus Fernandes","email":"npm@matheus.top","url":"http://matheus.top"},"bugs":{"url":"https://github.com/matheuss/google-translate-tk/issues"},"license":"MIT","readmeFilename":"README.md","users":{"fahri5567":true}}