Using an API can be a tricky challenge, with issues like authentication, rate limiting, different data formats, and various HTTP verbs to master. But some APIs can be simple, requiring little more than a browser or the curl command-line tool.
These APIs are easy to use and provide tangible benefits in a simple format, from Markdown formatting to everything you ever wanted to know about cats.
Convert markdown into HTML
A universal, speedy way to format your writing
The GitHub REST API is enormous, with approximately 700 different endpoints. Of course, the difference between some of these is minimal, but the entire set covers many diverse features, from following a user to getting a billing report.
Some of the most interesting calls, that are useful in a wider context, are quite well hidden. But if you go looking, you can uncover some real gems, like the /markdown endpoint. This call carries out a simple, but much-used action: converting markdown into HTML.
Naturally, this API call requires you to provide the Markdown you want to convert as POST data, via the text parameter. You can do this with one of curl’s many options, using -d to supply the input Markdown:
curl https://api.github.com/markdown -d '{"text": "This is *really* important..."}'
The response is raw HTML that you can save to a file or pipe to another process:
You could even integrate this API into a more complex workflow, like a simple static site generator to turn your markdown into a blog. Of course, there are libraries in many programming languages to convert Markdown, and tools like pandoc to convert many formats, including Markdown. But GitHub’s API could be invaluable if either option is unavailable, and it’s perfect for shell scripting.
Find images of emoji
Express yourself
Another somewhat unexpected endpoint that GitHub’s API provides is /emojis. It’s another one with plenty of potential use, that’s still very easy to understand. This call returns a map of emoji names to URLs of images that represent each emoji.
If you ever need to search for emojis by keyword or view a list of thumbnails, this is a very useful source. If your terminal supports graphics, it can be even more useful. For example, the powerful kitty terminal lets you output an image using the icat kitten:
Again, you could include this in a startup script to make your terminal a bit more welcoming, or you could use emoji images in any script for some added visual flavor.
Get a cat fact
Fun feline facts for free
OK, this one might not be as useful to you if you’re a dog person, but I hope you can still appreciate the utility! The host of this API, catfact.ninja, presents it in a minimalist style, using the API documentation tool, Swagger:
So, not only does this API provide an insight into feline friends, but it will also introduce you to Swagger and the underlying OpenAPI Specification it uses to describe APIs.
Cat Fact is a tiny API, so it’s great for beginners to get their head around. The basic endpoint is /fact, which returns a random fact from a database of several hundred. Facts range from the common (“Cats dislike citrus scent.”) and the fascinating (“A domestic cat can run at speeds of 30 mph.”) to the pretty unsavory (“Approximately 24 cat skins can make a coat.”).
Since the app does not require authentication, and the output format is so straightforward, it’s easy to use on the command line, e.g.:
curl -s https://catfact.ninja/fact | jq -r .fact
You could set this up as a script to inject a random fact into your website’s homepage or have your terminal greet you with one on startup, by editing your .bashrc file, for example. Bonus points are available for creative use of a useless Linux command like cowsay:
Look up country data
Get to know the world around you
There are many different geographic APIs, probably because location data is so fundamental to many modern services. If you’re not delivering something to somebody’s address, you’re using their location to select a currency or divert them to a language-specific translation. These services have many different selling points, but ease of use and low price aren’t often high up on the list.
I’ve picked the REST Countries API because it bucks the trend. Although it features several endpoints, the focus here is on countries, searching for them, and filtering the information received.
The simplest endpoint, all, returns data for every country, according to the fields requested in the fields parameter. So /all?fields=name will return name information about every country, while /all?fields=cca2,population gives an ISO 2-letter country code alongside the population.
Other endpoints restrict the set of countries returned, letting you filter them by criteria like currency, for example: /currency/gbp. Using these endpoints, you’ll see all fields, but you can restrict them in a similar way to /all, using the fields parameter, e.g., /currency/usd?fields=name.
Fetch a placeholder image
Watch this space
Placeholders can be a vital tool at several points in the design process; when presenting wireframes or a storyboard, for example. Sometimes, you want to plan for an image to exist in a layout, without knowing exactly what that image will be. Placeholders are so useful that some tools, such as Google Slides, have bespoke functionality supporting them.
Many APIs exist to provide a placeholder image on request, but few are as capable—and easy to use—as Placehold. This service generates plain placeholders with text, but you can configure them in many different ways using parameters to control size, format, color, and font. You can even customize the text, which, by default, reflects the image’s dimensions.
If you don’t specify a format, you’ll get an SVG back. Modern browsers will display an SVG if it’s the target of an IMG tag, so you can drop any Placehold URL directly into your page source, e.g.:
<img src="https://placehold.co/900x400" />
Consult a dictionary
Everything you ever wanted to know about words
Your OS may come with a free dictionary, but it’s unlikely to be as useful as this API. Free Dictionary API gives you a wealth of information about a word, including definitions, phonetics, and synonyms. There’s very little documentation because the API is, seemingly, a single endpoint with no parameters:
https://api.dictionaryapi.dev/api/v2/entries/en/<word>
Just replace with whatever word you want to look up and process the JSON response.
This API could come in handy when you just want to quickly look a word up, but it should also be a useful integration for many types of apps. If you’re writing an editor, any kind of translation tool, or a solver for your favorite word game, dictionary lookup could be an integral part.
Plenty of useful APIs are waiting to be discovered
A lot of APIs require quite an initial investment, which is a shame when you’re trying to build a quick prototype or a simple script. But there are accessible, free APIs out there to be discovered.



