Bing Translate YQL Table

With Yahoo’s babel fish translate webservice gone and Google’s translate service requiring payment there leaves only one free translate API around. Bing Translate. It’s not the easiest API to interface with, but using YQL and the execute block makes it easy. Bing Translate generously gives you 2 million characters a month – for free. Any thing more then that will cost you. (*I will add this table to shortly)

<?xml version="1.0" encoding="UTF-8"?>
<table xmlns="">
        <author>Paul Donnelly (@pjdonnelly)</author>
        <description>Get your Bing translate keys here:</description>
        <sampleQuery>select * from {table} where text="hello world" and client_id="" and client_secret=""</sampleQuery>
        <select itemPath="" produces="XML">
                <key id="text" type="xs:string" paramType="query" required="true" />
              	<key id="from" type="xs:string" paramType="query" default="en" />
              	<key id="to" type="xs:string" paramType="query" default="es" />
                <key id="client_id" type="xs:string" paramType="query" required="true" />
              	<key id="client_secret" type="xs:string" paramType="query" required="true" />
              	<key id="scope" type="xs:string" paramType="query" default="" />
              	<key id="grant_type" type="xs:string" paramType="query" default="client_credentials" />
              		var params = "client_id="+client_id+"&client_secret="+client_secret+"&scope="+scope+"&grant_type="+grant_type;
              		var resp ="").accept('application/json').contentType("application/x-www-form-urlencoded").post(params).response;
              		var MSTranslate =""+text+"&from="+from+"&to="+to).header("Authorization","Bearer " +resp.access_token).get().response;
              		response.object = MSTranslate;
  • E-mail this story to a friend!
  • Yahoo! Buzz
  • TwitThis
  • Digg
  • Facebook
  • DZone
  • Print this article!
This entry was posted in yahoo. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.


  1. Posted July 25, 2012 at 2:26 pm | Permalink

    good table:) translating services online are very poor in terms of development access. That is interesting.

  2. Posted October 23, 2012 at 12:08 pm | Permalink

    !!ITS GOOD!!

    what’s name of the {table} to use it?

Post a Comment

Your email is never published nor shared. Required fields are marked *