DEV Community

Cover image for How To Sell Your API
Luke Garrigan
Luke Garrigan

Posted on • Updated on

How To Sell Your API

How to sell your API

If you've developed a brilliant API then there's a chance you could bring home some serious cashola if other developers find a need for it. Hopefully, by the end of this blog your API will be in the API marketplace where hundreds of thousands of developers like myself roam to look for new, exciting APIs.

If you have an API that you think people will like, but you're not 100% certain it's sellable, then likely you don't want to have to set up an entire website with payment processing integrated to find out that nobody actually wants it. Using an API Marketplace is your best shot at getting instant customer feedback.

Make something useful

The first step is to make something people want. The API that I created for this blog isn't going to break the market or make me millions but it's just to take you through the process. I've created a word of the day API, so you provide the API with a date and it'll give you a word for that date:
GET: /words/{date}

    "date": "2020-03-28",
    "word": "lampblack",
    "description": "The fine impalpable soot obtained from the smoke of carbonaceous substances which have been only partly burnt, as in the flame of a smoking lamp. It consists of ...
Enter fullscreen mode Exit fullscreen mode

Deploy your API

Deploy your API, my word of the day app is deployed using Azure functions with table storage, I'd recommend using serverless archictecture to keep the price down, but remember to consider the cold start times as the avg latency per call to your API could be a major selling point - nobody wants a slow API.

Here's a request to my word of the day app that hit a cold start, a very
Example of a slow API call

When your API is up and running, you're ready to sell.

Sell your API

As mentioned I'm going to be using an API marketplace. An API marketplace is simply a site where developers put their APIs to sell, the marketplace takes care of the ins and outs of the payment so you as a developer don't need to worry about it, you also don't need to worry about purchasing a domain as the endpoint the programmer will be calling will be a proxy set up by the marketplace. As a consumer you can browse thousands of free/paid APIs and also manage all your APIs in one dashboard - or you can just use it to find the API you want to use and then go to their website directly, if they have one.

The API marketplace we're going to use in this blog is — it really is rapid — a great platform that has many different categories so you can see the popular APIs for the field you're in.

Once you've added your API to RapidAPI you can choose from either Monthly subscription or Pay Per Use for you API (That the consumers will pay). Rapid API have a number of different tiers for pricing, so the higher tier you pay, the less they skim off the top - in my example I just use the free tier. I expect if your API is getting hundreds of thousands of requests through the marketplace then it probably would be financially beneficial to go up a tier.
When you've decided on pricing and you've restricted who can call your API, either by checking for the X-RapidAPI-Proxy-Secret in the requests to your API or providing the marketplace with the header you want it to add to make the request (this is explained very well in the settings before you deploy your app to the marketplace).

Then deploy your app to the marketplace and let it rain requests!
Make your API public - Let it rain requests


I hope this has been helpful, there's really not a lot to it. I know there will be some developers out there that have created awesome APIs but haven't ever used an API marketplace. API marketplaces provide you with a test bed for your APIs, it prevents you from having to go through all the faff of adding a payment system only to find out that no body needs your API!

Thank you, if you like my rambling check out my personal blogging site at

Top comments (5)

darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

I'd recommend using serverless archictecture to keep the price down

You can get a good enough server for like 3€/month so I really don't see the benefit in using serverless. If your API grows and starts making money, you will be able to spare a bit more to get one or two servers per continent if response times are that important to you.

lukegarrigan profile image
Luke Garrigan

Sure but that's $3 a month you're paying flat, whereas serverless you pay for what you use and - as you mentioned - it has the benefit of scaling meaning you don't need to worry about purchasing more servers per continent. My suggestion is by no means a must, but for the majority of use-cases, for ease and simplicity I'd go that direction.

asafigan profile image
Andrew Safigan

Just a heads up, a lot of serverless platforms still tie your functions to a specific region. You will have to choose which regions to deploy to. Also if you deploy to multiple regions your database needs to be available in those regions as well or you will actually increase your latency. You can't easily do this for most databases. Scaling to multiple regions is not easy for most apis. You really need to plan ahead for this.

Thread Thread
lukegarrigan profile image
Luke Garrigan

Very true Andrew, a good problem to have though!

Some comments may only be visible to logged-in visitors. Sign in to view all comments.