Google Translate API Python Client
Extract Google Translate data with our Google Translate API Python client. Get programmatic access to auto language detection, wide language support, translates text, structured JSON output, batch processing, and more using simple Python code. Start free, no credit card required.

Trusted by industry leaders all over the world
Integrate our Google Translate API
The Apify API client for Python is the official library that allows you to use Google Translate API in Python, providing convenience functions and automatic retries on errors. Get started with simple pip installation and robust error handling built-in.
Python
JavaScript
HTTP
MCP
1from apify_client import ApifyClient2
3# Initialize the ApifyClient with your Apify API token4# Replace '<YOUR_API_TOKEN>' with your token.5client = ApifyClient("<YOUR_API_TOKEN>")6
7# Prepare the Actor input8run_input = { "batch_items": [9        {10            "text": "Hello, how are you?",11            "source_lang": "en",12            "target_lang": "es",13        },14        {15            "text": "Bonjour tout le monde",16            "source_lang": "fr",17            "target_lang": "en",18        },19        {20            "text": "مرحبا بالجميع",21            "source_lang": "ar",22            "target_lang": "de",23        },24        {25            "text": "Guten Morgen",26            "target_lang": "it",27        },28    ] }29
30# Run the Actor and wait for it to finish31run = client.actor("maged120/google-translate-scraper").call(run_input=run_input)32
33# Fetch and print Actor results from the run's dataset (if there are any)34print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])35for item in client.dataset(run["defaultDatasetId"]).iterate_items():36    print(item)37
38# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-startGet data with Google Translate API Python client
Use our Python API client to extract Google Translate data by providing batch items with text, source language, and target language parameters. The API returns structured data, including translated text, detected source language, target language, success status, and item index for each translation request.
Input
{ "batch_items": [  {   "text": "hello everyone",   "source_lang": "en",   "target_lang": "es"  },  {   "text": "bonjour tout le monde",   "source_lang": "fr",   "target_lang": "en"  } ]}Output
{ "success": true, "item_index": 0, "original_text": "hello everyone", "source_language": "en", "target_language": "es", "translated_text": "hola a todos"}Sign up for Apify account01
Creating an account is quick and free — no credit card required. Your account gives you access to more than 5,000 scrapers and APIs.
Install Apify Python client02
Install the Apify Python client using pip: pip install apify-client. This package provides a simple interface to interact with Google Translate API from your Python applications.
Get your Apify API token03
Go to settings in the Apify console and navigate to the “API & Integrations” tab. There, create a new token and save it for later.
Integrate Google Translate API04
Navigate to the Google Translate API page and click on the API dropdown menu in the top right corner. In the dropdown menu, you can see API clients, API endpoints, and more. Use the provided Python code examples to integrate Google Translate API into your Python application..
Get your Google Translate data via API05
The Google Translate API returns structured JSON data that works perfectly with pandas, NumPy, and other Python data analysis libraries.

Why use Apify?
Never get blocked
Every plan (free included) comes with Apify Proxy, which is great for avoiding blocking and giving you access to geo-specific content.
Customers love us
We truly care about the satisfaction of our users and thanks to that we're one of the best-rated data extraction platforms on both G2 and Capterra.
Monitor your runs
With our latest monitoring features, you always have immediate access to valuable insights on the status of your web scraping tasks.
Export to various formats
Your datasets can be exported to any format that suits your data workflow, including Excel, CSV, JSON, XML, HTML table, JSONL, and RSS.
Integrate Apify to your workflow
You can integrate your Apify runs with platforms such as Zapier, Make, Keboola, Google Drive, or GitHub. Connect with practically any cloud service or web app.
Large developer community
Apify is built by developers, so you'll be in good hands if you have any technical questions. Our Discord server is always here to help!
Python-ready Google Translate data extraction
Connect to hundreds of apps right away using ready-made integrations, or set up your own with webhooks and our API.
Yes, Google does provide an official Google Translate Python API client through Google Cloud Platform. However, this Apify Actor offers an alternative scraping-based solution that uses the googletrans library to access Google Translate functionality without requiring official Python API credentials or being subject to the same rate limits and pricing structure as the official Python API client.
Yes, you can try this Google Translate Python API client for free on Apify. The API client is available with Apify's free tier, which includes monthly free usage credits. You can test the translation functionality with small batches before committing to a paid plan. The pricing is $10.00/month plus usage-based costs.
You can extract comprehensive translation data including the original text, translated text, detected or specified source language code, target language code, success status, and item index for batch processing. The Python API client supports automatic language detection when source language isn't specified and can handle multiple translation requests in a single batch operation with structured JSON output.
Yes, it is generally legal to scrape Google Translate data using Python API clients for personal use, research, or small-scale applications. However, you should review Google's Terms of Service and consider the scale and purpose of your Python implementation. For commercial applications or high-volume Python scripts, it's recommended to use Google's official Translate API with Python client libraries to ensure compliance and avoid potential service disruptions.
Getting started with our Google Translate Python API is easy — simply create a free Apify account, get your API token, and start using the Google Translate API in Python, JavaScript, CLI, cURL, OpenAPI, or MCP.