Selling Micro-Services for Bitcoin

This blog post is no longer relevant since the technology that was used to create these apps doesn’t work anymore. — 11/28/17

An interesting way of thinking about bitcoin is as a spendable resource between different machines. Approaching it this way opens up a slew of new ideas and ways to pay machines a certain amount of money and get access to resources we may not have been able to reach before. We can call this the machine-payable web, where machines transact with other machines for bitcoin (or some other crypto-currency), to access some digitally scarce resource. Those resources can be anything from types of data; such as access to economic data in another part of the world, to even selling energy between mobile devices. (How great would it be if instead of plugging your phone in to the wall, you could pay for battery life from other phones selling it.)

I would like to share three simple micro-services I’ve made that can be easily purchased and used with bitcoin on the command line. My reason for doing this is that I think it is important to share ideas in hopes that other developers and creators will contribute and make some interesting tools as well. If you are interested in trying these out you will need to have the 21 library installed as well as joining the 21 market. You can go here to learn more.


The first micro-service was built to solve a problem that I have to deal with which is getting random phone calls almost everyday. I searched for some open-source API’s, and built this tool in about an hour. The idea behind it is easy, just type “phoneID21” plus the phone number in the command line and hopefully find out who is calling you. Many numbers don’t return an actual name, so a location is used in the returned JSON file instead.

This is the first example of monetizing the command line with SAAS tools that anyone with a little bit of bitcoin can use. Instead of having to set up any sort of web application for customers to access, they can use a little bitcoin, run the command line tool, and get the output, in this case JSON, from the API which can then be used in any other SAAS tool as well.

$ phone21ID "6502530000"
"Name": "YOU TUBE",
"Price in satoshis": 10000,
"Number": "+16502530000",
"URI": "/v3/phone/+16502530000"
You can download the code from Github to use the service.

Natural Language Analysis — MLaaS

My second micro-service took a bit more time to complete and is an example of using a monetized machine learning-as-a-service command line tool. The service was built using Googles API’s and focuses on natural language analysis. It works by simply typing in the command “analyze21” plus a sentence and you will get a JSON file that returns any major entities with a wikipedia page and the sentiment of the text.

Machine learning is becoming a big deal in the press these days and it’s easy to understand why. It is used by almost every major tech company (if there is a large tech company not using it in some capacity, they are very far behind) and with the deluge of data that devices are demanding we hand over, the only way to understand the signal from the noise is to use machine learning algorithms on those datasets. What was once the domain of large companies just a few years ago can now be replicated with command line tools. This tool is just one example. Machine Learning-as-a-service for just a small amount of bitcoin.

Once those services are connected to the grid, it could possibly make it cheaper and easier for developers and companies to access more computing power to run these programs. The Bitcoin/Blockchain network is now larger than 500 of worlds top supercomputers combined and with machine-to-machine payments, it will make it easier to incentivize people to join the network. As the network grows, there will be more accessible resources for people to use a huge amount of computational power for cheap.

$ analyze21 "I am going to buy some Bitcoin today."
"language": "en",
"entities": [
"mentions": [
"text": {
"beginOffset": -1,
"content": "Bitcoin"
"type": "OTHER",
"name": "Bitcoin",
"salience": 1,
"metadata": {
"wikipedia_url": ""
"documentSentiment": {
"polarity": 1,
"magnitude": 0.2
"language": "en"
You can download the code from Github to use the service.

NYTimes — Pay-per-article

The final app is a prototype I made earlier this year but wanted to write about because I think it is an idea that has a large amount of potential. This one works by calling the New York Times “Top Stories” API and entering which section you would like to read. The app then outputs the start of the story including a direct link for further reading.

Micro-payments per article is already being done successfully by companies like Blendle. And micro-payments using Bitcoin could make it even easier for both publishing companies to sell a single article and for customers to read a single article without the hassle of signing up. At first, it might seem simplistic to pay no more than a few cents to read a news story. But this could prove to be a better way for publishers to lure new and continuing readership from those who don’t want to pay for a full subscription. Furthermore, writers and journalists could charge a small fee for people to access their writing.

Here is what the output looked like when I ran it a couple of days ago

Welcome to the New York Times Top Story!
What section would you like to read?
Envisioning Bitcoin’s Technology at the Heart of Global Finance:
The World Economic Forum predicts that the blockchain concept introduced by the virtual currency could help banks offer cheaper, faster and more secure services.
Copy the following link to read the full story:
You just sent 5000 satoshis to:
Thank you for reading the New York Times today!


These applications are simple compared to a lot of software out there but they definitely prove that new tools can be created, paid for and used with a new resource, namely Bitcoin. The implications are huge and it gives developers a way to monetize the tool sets they create by monetizing every HTTP request for the apps they make. If you want to try out more bitcoin-payable-API’s head on over to the 21 Marketplace.