Sites with public API with CORS - Cross-Origin Resource Sharing enabled
There are tons of web sites with public API that we could access, but most of them use the default CORS security setting (by not setting Access-Control-Allow-Origin) which means we can only access their API from the command line or from the server and not from the browser.
On this page you'll find a collection of web sites that provide public APIs with Access-Control-Allow-Origin enabled. You can access them to fetch data via Ajax requests.
The Flickr an example is https://api.flickr.com/services/rest/?&method=flickr.people.getPublicPhotos&format=json&api_key=API_KEY&user_id=USER_ID You can get an API Key from the App Garden, and you can find the user_id based on a username via the Flickr username finder.
There lots of stes with public APIs, but many of those will refuse to work if we try to access them from the browser. (The don't set Access-Control-Allow-Origin)
Published on 2015-08-18