# Bing Microsoft Translator (`canadesk/bing-microsoft-translator`) Actor

Translate text with Bing Translator. It's fast and costs little.

- **URL**: https://apify.com/canadesk/bing-microsoft-translator.md
- **Developed by:** [Canadesk Support](https://apify.com/canadesk) (community)
- **Categories:** Automation, SEO tools
- **Features:** Full permissions
- **Stats:** 96 total users, 0 monthly users, 100.0% runs succeeded, 5 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Features

This actor uses Bing to automatically translate your text.

The default limit is 1,000 characters. You can run longer texts but have higher chances of getting blocked.

### Example

```
{
	"text": "The Importance of Clean Code in Software Development\nIn the realm of software development, the concept of \"clean code\" is often emphasized as a cornerstone of effective programming. Clean code refers to code that is easy to read, understand, and maintain. It is not just about making the code work; it is about making the code work well and ensuring that it can be easily modified and extended in the future. This essay explores the importance of clean code, its principles, and the benefits it brings to software development.\n\nPrinciples of Clean Code\nReadability: One of the primary principles of clean code is readability. Code should be written in a way that is easy for other developers to read and understand. This involves using meaningful variable names, consistent indentation, and clear comments. Readable code reduces the cognitive load on developers, making it easier to grasp the logic and flow of the program.\n\nSimplicity: Clean code should be simple and straightforward. This means avo",
	"translation": "L’importance du Clean Code dans le développement de logiciels\nDans le domaine du développement de logiciels, le concept de « code propre » est souvent mis en avant comme la pierre angulaire d’une programmation efficace. Le code propre fait référence à un code facile à lire, à comprendre et à entretenir. Il ne s’agit pas seulement de faire fonctionner le code ; Il s’agit de faire en sorte que le code fonctionne bien et de s’assurer qu’il peut être facilement modifié et étendu à l’avenir. Cet essai explore l’importance du code propre, ses principes et les avantages qu’il apporte au développement de logiciels.\n\nPrincipes du Clean Code\nLisibilité : L’un des principes fondamentaux d’un code propre est la lisibilité. Le code doit être écrit de manière à ce que les autres développeurs puissent le lire et le comprendre. Cela implique l’utilisation de noms de variables significatifs, d’une indentation cohérente et de commentaires clairs. Le code lisible réduit la charge cognitive des développeurs, ce qui facilite la compréhension de la logique et du flux du programme.\n\nSimplicité : Un code propre doit être simple et direct. Cela signifie avo",
	"language": {
		"from": "en",
		"to": "fr"
	}
}
```

### How it works.

1. Enter the text to be translated.

2. Select the destination language (e.g., Spanish).

3. Run it! 🎉

### Support

Always use a strong proxy!

Open a new issue or contact support. Please share your URL or Input.

Cheers!

# Actor input Schema

## `text` (type: `string`):

Text to be translated.

## `source` (type: `string`):

Language in which the text is written.

## `destination` (type: `string`):

Language in which the text will be translated.

## `agent` (type: `string`):

No description

## `delay` (type: `integer`):

Waiting time between requests (s).

## `proxy` (type: `object`):

Select proxies to be used by your crawler.

## Actor input object example

```json
{
  "text": "Let's do this!",
  "source": "auto-detect",
  "destination": "en",
  "agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36",
  "delay": 1,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "text": "Let's do this!",
    "agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36",
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("canadesk/bing-microsoft-translator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "text": "Let's do this!",
    "agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36",
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("canadesk/bing-microsoft-translator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "text": "Let'\''s do this!",
  "agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36",
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call canadesk/bing-microsoft-translator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,canadesk/bing-microsoft-translator"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/rqTxjr25HwoSAQzC3/builds/7OOdl6N4qPEQ40FJA/openapi.json
