API as a product: how to monetize your work when you understand only the backend

In this article I will retell my experience in creating, deploying and selling APIs on a specialized marketplace. I didn’t have to make a website or figure out how to implement a solution for processing payments – I just wrote the code and deployed the API.

To create a startup, you need a team, and everyone in this team must be a jack of all trades – a programmer, marketer, seller. Moreover, this is a long and difficult journey, so the chances of success are slim. But to start your own project, a startup is not a prerequisite. I am convinced that you can sell products without doing anything except the backend.

Over the past year, I came up with a plan for releasing my own product, which does not involve working with an audience and / or processing payments. The whole procedure consists of three steps:

  1. Create an API that solves some kind of problem
  2. Deploy it on serverless architecture
  3. Distribute the product through the marketplace API

Create an API that solves some kind of problem

About six months ago, I had a need to implement a “procedure” that would extract information from news articles published on the Web. It was supposed a script that takes the URL of the site as input and returns a structured report with such information as the title of the article, date of publication, names of authors, links to media and so on.

Function visualization from Vladislav Kuchaev

It took me a few minutes to find the Python library that knows all this. Just a few minutes to write the code – and I already have a working prototype ready. When you already have the code on hand that performs the necessary operations, wrapping it in the API is easy. But deploying and hosting this API may already be more difficult.

Deploy API on serverless architecture

Simple serverless function

I had to process several hundred articles several times every hour. And all at the same time. That is, a peak of 200-800 addresses of news articles that need to be analyzed, and then some indefinite period of time – nothing at all.

We already made the decision on AWS, but I thought that AWS Lambda is the best option for such a scenario. AWS Lambda is a serverless tool, function as a service; it runs code in response to a specific event. You do not need to provide support for servers; you pay only for the time when the function is executed.

I have deployed the Lambda function. Everything worked properly: with hundreds of simultaneous calls, she coped with parallel calls. And, again, only had to pay for the execution time. It was then that I thought: “Well, everything turned out to be simple. I wonder if anyone is selling an API that performs this operation? ”

Google search for “article extraction API”

Yes, such were found. At first glance, they all do the same thing that I did for my project. And this is good news for two reasons:

  • There is a demand for such things
  • I will be with whom to compare myself

Serverless API

Now we need to turn our serverless function into a serverless API. I used Zappa, the Python package that did all the main work for me. He wrote the API on Flask, then deployed it to AWS Lambda and the Gateway API through Zappa. The full API code is publicly available on my github page.

Another great package for deploying serverless code that works with many programming languages ​​and cloud service providers is called Serverless.

The average cost of processing 50,000 calls to my API on AWS was from 0.6 to 0.8 dollars, and this is not taking into account the free period. The standard cost of 50,000 calls for solutions of this type ranges from 30 to 250 dollars. Accordingly, the main question is how much it will cost me other items of expenditure necessary for the distribution, promotion and, most importantly, the sale of the API. Most likely, I will not build up capital on this, but it will probably cover the cost of subscribing to Netflix, Spotify, Leetcode and something else.

Distribute the product through the marketplace API

Here’s what they write on RapidAPI:

“Marketplace API works in the same way as other online marketplaces: it gives providers the opportunity to expose their APIs, and developers to use them. Like other types of marketplaces, the marketplace API consists of several components, including a portal for developers and a portal for API providers. ”

Warning: at the time of writing, I am not in a partnership with RapidAPI, they do not pay me and do not provide any special conditions. This platform seemed to me the most suitable, so I chose it.

To place my API on the RapidAPI marketplace, I took the following steps:

  1. Deployed API on AWS using Gateway and Lambda APIs
  2. Created x-api-key on Gateway API to restrict access
  3. Tied its API to the RapidAPI marketplace
  4. Passed x-api-key to RapidAPI administration

When the end user sends an endpoint request on the RapidAPI side (from my product page), they see to it that the required number of payment units is deducted from his plan. Then the RapidAPI service calls my API using the x-api-key that I provided to them. It doesn’t matter how many developers use my service through RapidAPI – from the backend side it all looks like a series of identical calls with the same x-api-key. So what about users, my head doesn’t hurt: to collect a fee, think over tariff plans, provide a control panel – all this is no longer my concern.

This service costs 20% of each transaction. If no transaction is received, nothing needs to be paid. For example, if I sell a tariff plan of 100,000 calls per month for $ 50, then I get 80% of this amount, that is $ 40. If no one buys this plan, I do not have to give RapidAPI money for the placement.

Launch

You can go to my page and try out the API for free. The code is fully uploaded in the repository on github, including setup instructions. April 20th, I posted the product on product hunt, so I look forward to seeing soon whether there is interest in the community in this kind of solutions.

Other APIs you can do

Surely you already have some kind of function – at least something simple that brings together several Python libraries (mine is one of those). Even if it seems to you that any developer that you have seen in life is able to reproduce this code yourself – it does not matter. There are still thousands of people who are ready to buy it. In most cases, it is more profitable for them to pay for a ready-made solution than to write, deploy and maintain the code themselves.

Here is a list of APIs that are in good demand and which many developers are able to write:

  • API for creating text summary
  • Reformulation API
  • Text categorization API
  • Image Classification API
  • API for identifying and normalizing geodata in texts or on web pages
  • API for collecting email addresses from a given URL

Libraries from open access can be used as the core of functionality – combine their capabilities and create unique code.

By the way, if you have already written something similar and used in your work, it means that you are well acquainted with the needs of your audience, and this is a great advantage when developing a product.

Create end-to-end solutions

The best way to draw attention to your resume is to show that you are capable of doing something complete. Getting a job as a software developer, backend developer, data scientist or data engineer for the first time is a very difficult matter, but mentioning the API that you have already brought to mind, put it on the market and successfully support it, significantly increases your chances. Many employers are much more willing to open product pages on Product Hunt than repositories on GitHub.

Finally

The APIs that I see on marketplaces are mainly the fruits of the labors of entire companies, not independent developers. Software developed by the company is much less likely to produce errors. But they ask a lot. Indie developers working on bootstrapping projects are more likely to turn their eyes to something less sophisticated, but cheaper.

The global economy is now entering a recession phase. Budgets of companies will be reduced. Those who can offer low-cost alternatives to existing solutions will gain an influx of audience. Perhaps our time has come.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *