AngularJS
JavaScript

Search for '{{search_term}}'

Sites with public API with CORS - Cross-Origin Resource Sharing enabled

CMOS is the Code-Maven Open Source podcast that also includes video interviews. Subscribe to this feed RSS feed with your Podcast listener app or via iTunes iTunes.

When learning AngularJS, or any other JavaScript framework for building Single Page Web Applications you can go only so far without a back-end to access.

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.

URL: {{url}}
Result: {{ data }}
Failed

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)

Comments

In the comments, please wrap your code snippets within <pre> </pre> tags and use spaces for indentation.
comments powered by Disqus