Jsoup returning an error 400 on Google Maps API-Collection of common programming errors

I’m working on a project that requires me to find the coordinates of some shops on Google Maps. I already have the address of each shop.

I have played a little with the Google Geocoding APIs and I think they are what I need: all my code needs to do is connect to the DBMS, retrieve item_id and address, generate a valid URL for the geocoding API and process the JSON data it will get.

I don’t understand why, but the URL I generate works in my browsers (Chrome 23 & latest Safari, OS X) but won’t work in Jsoup. I have looked at the source of the page in Chrome, and it looks like it is perfectly valid HTML. So what’s Jsoup doing wrong?

Code snippet (runnable, will give you the same exception I get):

import java.io.IOException;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

public class RandomClass {
     public static void main(String args[]) {
     Document doc = null;
     try {
        String url = "http://maps.googleapis.com/maps/api/geocode/json?address=0+164+W+75th+St,+New%20York,+NY+10024&sensor=false";

        String ua = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17";
        doc = Jsoup.connect(url).timeout(60 * 1000).userAgent(ua).get();
    } catch (IOException e) {
        e.printStackTrace();
    }
}

}

throws

org.jsoup.UnsupportedMimeTypeException: Unhandled content type. Must be text/*, application/xml, or application/xhtml+xml. Mimetype=application/json; charset=UTF-8, URL=http://maps.googleapis.com/maps/api/geocode/json?address=164+W+75th+St,+New%20York,+NY+10024&sensor=false
at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:436)
at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:393)
at org.jsoup.helper.HttpConnection.execute(HttpConnection.java:159)
at org.jsoup.helper.HttpConnection.get(HttpConnection.java:148)
at asdru.RandomClass.main(RandomClass.java:16)