In my previous blog post, I talked about how you can use Zappa, to build and deploy your own serverless APIs. We wrote the API, which was easy, and then navigated through the many challenges to finally launch the API on AWS API Gateway.
Now that we have an API that is launched, let's look at how we can start selling this API. Your best bet is obviously an API Marketplace like RapidAPI , something like an Amazon for APIs. To release your API there, here are a few things that we need to get done.
First and foremost, we need the API deployed to AWS with API Gateway and Lambda. If you followed my previous blog post, by now, you are done with this step. If you head over to your AWS Console and go to API gateway, you will see something like this under your APIs section
To start selling this API, you will need to create an x-api-key to restrict undesired access to the API and also have a metered usage.
For doing the same, create a Usage plan for the API, with the desired throttle and quota limits.
Also, create an API Key and associate it with the Usage plan
Once you have the API Key and have associated it with the Usage Plan, it is time to associate the API with the key and discard all requests that come without the key. For doing the same, modify your API Method to make key mandatory
Once you are done with this, you can go ahead and configure the API in rapid API. Create the API, add a description, endpoints, docs, pricing, and plans. Once all that is done, you also need to be able to pass the AWS API Key in each request that Rapid API makes to your API. For doing that head to the setting section in RapidAPI and add the key in transformations.
Once this is done, you are now ready to publish your API.
Now that your API is live, go ahead and let people know. Rapid API manages everything related to the pricing and takes care of payment collection and usage tracking. You just have to focus on writing APIs and leave the rest to RapidAPI.
They do charge 20% of the transaction but hey, for all the things that they have taken care of, it might be worth it.
You can see my API here: rapidapi.com/nageshapiprojects/api/article-..
As of this moment, I have zero subscribers who are using the API and I don’t have many expectations from the same. But it was a fun exercise and now that I have learned to launch this example API, I have started playing around with other API Ideas that I would soon be launching. You too can look at Stack Overflow, Hacker News, and Reddit for more ideas about what people need and build the same.
Don’t worry about failure; you only have to be right once Drew Houston