To get JSON from another domain (e.g. googleapis.com), you should use JSONP and not plain JSON (for more information, check out the same origin policy ).
Fortunately, adding a GET parameter whose value is a question mark ( callback=? In your code) causes jQuery to try to make a JSONP call. Unfortunately, the site ignores your JSONP request and serves directly JSON.
Two possible reasons: the site does not support JSONP (which would be strange for the Google public API) or that it expects the name to be something else (i.e. not callback= ). Check out the Google API docs for what they expect / support.
source share