If you're planning to publish the extension, it's best not to abuse Google's services like that, as it's very likely that they'll take it down from their store. You should instead use a cheaper alternative, such as LibreTranslate hosted on a cheap Hetzner server. (LibreTranslate isn't as good at translation as Google's services, which in your case should be a positive!) However, if you don't plan on sharing the extension publicly and don't mind potentially being ratelimited, a good place to start is to look at your browser's network monitor (available in the "Inspect Element" panel) while using the translator. You could also study the code of open-source alternative frontends, such as Lingva Translate.
spam