Simply use the API as an image in HTML. This will return a PNG image,
ready to be embedded in your web app.
<img src="https://flags.swcdn.org/small/en_US">
The URL should always be structured like this:
https://flags.swcdn.org/{size}/{country_code}
Replace size with either tiny, small, or large to determine the image size. Then, include
your country code at country_code.
This service uses flag images from flagpedia.net.
It was developed by Sebastian Walker, because he needed something like this for one of his own projects and couldn't find something similar.
You can find the source code of this site on Github.