You are currently viewing Application Programming Interface: Build & Sell API
application programming interface best passive income

Application Programming Interface: Build & Sell API

  • Post author:
  • Post published:October 14, 2023
  • Post category:AI

Build your own Application programming interface (API) & sell it. Unlock new sources of passive income. Step-by-step guide.

Hello everyone, Did you know you can build an online income stream selling text files? Like this one:

This is called a JSON file. It is a text returned by something called an API.

Thousands of people worldwide do this (including me 😅), and you can do the same too!

In this course, you will learn how to do the same and establish an income stream online with APIs. Are you ready?

I designed this course to serve a wide array of learners, no matter where in the world you are joining us from.

What is an Application Programming Interface (API)?

API Stands for Application Programming Interface (No need to memorize or know this 😅).

Let’s make things as simple as possible.

API allows programmers and developers to interact with a specific platform or access data and tools directly from their custom application (code).

Let’s take an example.

Suppose a programmer wants to develop social media management software like Buffer or Hootsuite

In that case, he will need access to Facebook, Twitter, Pinterest, and other social platforms directly from his code so he can publish, schedule, access analytics, and do other stuff from his own application.

But this is not possible by default because if you want to post on social platforms, you must use their interface. So what to do?

How do social media management tools access platforms like Facebook and Twitter?

Here, the API solves this issue and acts as a gateway or a broker between the programmer and the target platform.

For example, Facebook allows programmers to access Facebook through Facebook API, just like Twitter, Pinterest, Google, and many other platforms.

Another Example of APIs is allowing programmers to access data on a specific server or database.

We can’t give programmers public access to our servers and databases. So we create an API that can manage and handle this securely.

And if you like reading technical definitions, here we are:

API stands for Application Programming Interface. It is a set of rules and protocols for accessing a web-based software application or web tool. Simply, it allows communication between different software systems and enables them to exchange data.

Watch this video to learn what is API?

Application Programming Interface (API) Business Blueprint

We are not Google or Facebook, nor do we have a company or valuable data. So why would developers bother to buy our APIs?

And what we could provide as an API, as we have nothing to provide!

We will solve this issue in later. We will see how to find the best Ideas to develop and how we can provide valuable data even if you have nothing! I am super excited about that part, but I must stick to the course structure and move step by step to make everything clear.

So let’s now focus on understanding the blueprint. And see how we, as simple human beings 😅, can establish an income stream online with APIs.

We mainly have two ways to make money with APIs:

  1. Build and Sell APIs
  2. Consume an API and Build Your own tool or SAAS.

1. Build and Sell APIs.

And this is what this course is all about. And this is what we will cover in detail in the next sections.

The idea is simple. You will find an idea that can solve a specific problem for certain people.

Then, You will build and Host the application programming interface API. After that, you will List the API on Marketplaces like RapidAPI. Then, you will promote the API. And you will establish a recurring monthly passive income.

2. Develop a tool, app, or SAAS based on APIs.

The second method is to build a tool’s website based on APIs.

This website can be a free tool or a SAAS subscription-based website. Or even a mobile app!

I do this with Small SEO Tools and built many tools based on third-party APIs.

For example, the Hashtag Generator Tool is built on top of the Hashtagy API on RapidAPI.

The keyword tool is built on top of Google Ads API, and the AI tools are built on top of OpenAI API and NLP Cloud.

Watch this video to understand Blueprint of course.

Find The Perfect API Ideas

If you want to start a business, blog, social media profile, YouTube channel, or anything, the first step is to find the idea or the niche you will work in. 

We want to build an API, Publish it, Market it, and Sell it. Like any business, we need an Idea!

Market Research – Strategy 1

We will start by exploring what APIs are already published on Marketplaces, Checking their rating, their functionality, what they do exactly, what they are missing, their pricing, And so on. 

In this way, we can discover some hidden opportunities. And find an idea that we can develop and compete with other low-quality APIs.

Watch this video to understand this strategy.

Let me show you an example.

One of the top API Marketplaces out there is Rapid API. Let’s open it, and do a simple search: “YouTube” to discover if there are existing APIs related to YouTube.

Pick one, and let’s check if there is a “Perfect API”

What is a Perfect API?

A perfect API is an API that has the following:

  1. 100% Functional
  2. Verified
  3. Low Latency*
  4. Mid to high popularity
  5. Higher than 95 service level.
  6. Well Documented.
  7. All the expected functions (Important)
  8. Affordable Pricing

Let’s apply those factors to the API we found.

Popularity 8.6 ✔️

100% Functional ✔️

Verified ❌

Low Latency ✔️

Higher than  95 service level ✔️

Well Documented ❌

All the expected functions ❌

Affordable Pricing ✔️

What do you think? Is there any way to compete?  SURE!

So you can add this idea to your brainstorming list.

Let’s understand these metrics in more detail.

Different Deep Explanation


The Popularity determines how popular this API is on the marketplace and how much it is being used, so there is a good demand.

Popularity greater than 7 means the API has a good demand.

Note: in some cases, if the API is still new, you may see a low number, so check for other APIs with the same functionality and check popularity to know if the idea has a good demand in the market.

100% Functional 

Simply test the API, and check if it delivers what it promises to do.


Verified APIs attract more developers since it gives more trust and reliability.

Low Latency 

Note that in some cases, some APIs take some time because there is no way to make it faster, like in AI, as we will see later. But for a keyword tool like ours, the latency must be less than 1000ms.

Higher than  95 service level 

If the service level is low, then the API often fails. This is very important. Developers will not subscribe to unstable APIs.

Well Documented 

In this API, we don’t see detailed documentation for the API, and this is a bad thing. Developers love to see clear explanations and documentation.

All the expected functions 

Here, we are checking if the API delivers what it promises to do. If you see missing functions or limited results, you can take advantage of this with your API.

Affordable Pricing 

Some APIs are great, but they cost too much! Maybe you can compete with lower pricing by utilizing some caching methods that we will discuss later on.

Application Programming Interface Arbitrage – Strategy 2

It simply means buying API from one marketplace and selling that same API at higher price on some other marketplace.

For example, you can buy from Rapid API Hashtagy API costs $10 per month, and sell it to another marketplace let’s say on ApiLayer.

Watch this video to understand this strategy.

Combine Multiple APIs – Strategy 3

This strategy simply means that we can make use of multiple APIs and combine their features into a new API and sell it.

For example, we can use the API of ValueSerp to gather information on search results and now we can use another API let’s say Best Backlink Checker to check the backlink of the domain.

Now we can combine the ValueSerp API feature + the Best Backlink Checker API feature and create our own new API that features of ValueSerp & Best Backlink Checker.

Watch this video to understand this strategy.

Stepping on Trends – Strategy 4

You can get API – -application programming interface ideas from some platform websites like Quora, BuzzSumo, Exploding Topics, Google Trends, etc, and observe what topic is hot and on that basis build your API.

You can also explore the latest and hot topics about prompt engineering and AI art generation. Build API based on them. Learn more about Prompt Engineering and AI art generation.

Watch this video to understand this strategy.

Based on Real Data – Strategy 5

In this strategy, we store or collect data inside storage known as Databases, and from that Database, we generate results on the basis of Input via API. We will do it practically later using a non-code API tool using xano.

Watch this video to understand this strategy.

Building First Application Programming Interface (API)

Before we build our first API it is important to know there are two methods to build API:

  1. Build with Python & AI
  2. Build with No-Code Tool

Requirements of Build with Python & AI

If you want to build API using Python & AI tools like ChatGPT & Google Bard. So first fulfill some requirements:-

Build with Python & AI

You can simply open let’s say ChatGPT and type prompt “write the code of a flask python API. it uses google auto-suggestions to generate keyword ideas and suggestions.”

Basically, we are creating one API that will generate auto-suggestion keywords by Google after user input. So after you write the prompt ChatGPT will give a response, below I got a response (the response may be different in your case) but remember it will do the same task.

import requests
from bs4 import BeautifulSoup
from flask import Flask, request, jsonify

app = Flask(__name__)

# Function to fetch keyword suggestions from Google AutoSuggest
def get_keyword_suggestions(keyword):
    base_url = ""
    params = {
        "q": keyword,
        "cp": "0",
        "client": "firefox",
        "hl": "en",

    response = requests.get(base_url, params=params)
    if response.status_code == 200:
        suggestions = []
        data = response.json()[1]
        for suggestion in data:
        return suggestions
        return []

@app.route('/suggestions', methods=['GET'])
def keyword_suggestions():
    keyword = request.args.get('keyword')

    if not keyword:
        return jsonify({'error': 'Please provide a keyword parameter.'}), 400

    suggestions = get_keyword_suggestions(keyword)
    return jsonify({'suggestions': suggestions})

if __name__ == '__main__':

After you paste it inside VS code and run it, it will give url just open it using command + click. Watch this video to see how it works.

Build with No-Code Tool

You can use tools like Xano and more to create APIs without any coding. You can simply create a database and using that database it will generate results.

Watch this video to learn practically how you can do this 🙂

Hosting Application Programming Interface (API)

Hosting API is very important this will simply make your API available to the general public worldwide to use your API.

But before we host the application programming interface (API) is important to Push API to GitHub.

Push to GitHub

Before we host let’s push our API to Github. How to watch this video, but in simple terms, GitHub is a platform where people store and share their computer code. It allows collaboration on coding projects, keeps track of changes, and provides a way to showcase and distribute software to others. Learn More (Optional). Make sure to download GitHub to your computer and sign up for a free GitHub account.

After you sign up now paste the Python file code from the below script

from flask import Flask, jsonify
import requests
#from waitress import serve

app = Flask(__name__)

@app.route('/keywords/<prefix>', methods=['GET'])
def get_keywords(prefix):
    url = f"{prefix}"
    response = requests.get(url).json()
    keywords = response[1]
    return jsonify(keywords)

def create_app():
    return app

if __name__ == '__main__':
    from os import environ
    port = int(environ.get('PORT', 8080))'', port=port)
#serve(app, threads=1)

Add requirement txt file to Python > add new file > name it “requirements.txt” and put the version of the required item.

Still, if you didn’t understand what I explained & How to Push to Github watch this video.

Lets Host Application Programming Interface (API)

Now it’s time to make your API publicly available to the world. We will use Digital Ocean to host API.

👉 Click Here to Get Free Credits on Digital Ocean

In very few minutes using Github and Digital Ocean, we can make your API come online.

There are many others way to host like:

  • Google Cloud
  • Amazon AWS
  • Microsoft Azure
  • Your Own VPS server ( like Contabo, Digital Ocean, etc)

In our case, we will use Digital Ocean because it is easy to set up and affordable as well. Obviously, if you want to host inside any other platform then you can, just make sure you have enough knowledge to work with different platforms.

Make sure before you host it, to switch off debug.

pip install waitress

from waitress import serve

use "#" to below two link:

if __name__ == '__main__':

like this:

# if __name__ == '__main__':

Then add below code just after that:

serve(app, host='', port=8080)

Also add "waitress" requirements in requirements.txt file use below code:

pip freeze > requirements.txt

Watch this video to see visually how to do the above steps step by step and how to deploy it on Digital Ocean.

Publish Your Application Programming Interface (API)

Now we have finally made our (API) application programming interface to come online. The next step is to sell it and make money with it.

Publish API to Rapid API

There are many marketplaces where you can sell your API. Some are:-

There are many other API marketplaces, but in our case, we will use Rapid API to publish and sell API because it is free & easy to set up.

Watch this video to publish API inside Rapid API. But what if you want to publish on other websites? Simply use ChatGPT or Bard to write the prompt listed below. ChatGPT & Bard will help you to set up different marketplaces.


you are an expert in builidng and selling API's online. I want you to list some API marketplaces where i can list and sell my API's.


Guide me step by step how to sell it on "Website Name" in simple and wasy way.

Pricing Your API

There are three main factors when pricing your API. Factors listed below.

  • Your hosting costs
  • Third-Party API Costs
  • Competitors Pricing

Understand how to do pricing in deep using this video.

After Posting API

There are three things you should do to get better results out of your API. These are as follows:-

  • SEO of API
  • Proper Documentation
  • Testing of APIs

Learn this in deep inside this video.

Promote Your Application Programming Interface (API)

Like any product or service needs marketing. Similarly, APIs also need marketing. I will share with you some tips & methods to sell API online for passive income.

Method 1: API Directories

Think of API directories as the “Yellow Pages” for APIs. Just as businesses get listed in directories to be discovered by potential customers, your API can be listed on these platforms to be discovered by potential users or developers.

  1. Visibility: API directories receive thousands of visitors daily, primarily developers and businesses looking for specific API solutions. By listing your API, you instantly tap into this audience.
  2. Credibility: Being listed on reputable directories adds a badge of credibility to your API. It shows that your API is legitimate and worthy of consideration.
  3. Feedback: These directories often allow users to leave reviews or comments. This can be a valuable source of feedback to improve your API further.

List of Some API Directories

Read this Blog: 13 API Directories to Help You Discover APIs.

Understand this method with this video.

Method 2: Create a Tool

What you do, is you build an online tool, it can be free, and then if people want API access they can buy your API.

And it doesn’t need to be free, maybe you can create multiple tiers as many SAAS Services, like SPyfy, and Semrush… and provide API access with a higher membership.

Basically, you need to promote your API within your tools, it can be a free or paid tool. For example, go to > pricing. You will see they are selling API within their tools.

Understand this method with this video.

Method 3: Spread Your API

Like Creating Tools, we can create other things that help us promote and spread our API.

you can build a Chrome extension. or a library where programmers can, what we call a wrapper, or package.

also, you can build open-source projects that require your API to work perfectly.

Understand this method with this video.

Method 4: Direct Outreach

We now step into the world of direct outreach. This method might sound old-school, but with the right approach, it’s a powerful weapon in your marketing arsenal. But why direct outreach?

Direct outreach lets you target specific individuals or organizations that could benefit from what you’ve built.

1. LinkedIn: The Professional’s Playground

LinkedIn isn’t just for job hunting or sharing business quotes. It’s a vast network of professionals from various industries, including those who might be in dire need of your API.

  • Research: Use LinkedIn’s search functionality to find professionals in the sector your API caters to. For instance, if you’ve built an API related to e-commerce, target e-commerce startup founders, CTOs, or technical leads.
  • Engage Before You Pitch: Don’t just send a sales pitch right away. Engage with their posts, share your insights, and build a rapport. This makes your eventual pitch feel less like a cold call and more like a conversation between professionals.
  • Craft a Compelling Message: When you’re ready to pitch, be concise and straight to the point. Explain what your API does, its benefits, and why you think it fits them well.

2. Cold Mailing: Precision over Volume

Cold mailing can be tricky. Nobody likes spam, and most cold emails end up in the trash. However, a well-researched and personalized email can work wonders.

  • Find the Right Contact: Sending an email to a generic “info@” address is a shot in the dark. Find out who the decision-makers or relevant stakeholders are in the organizations you’re targeting. Tools like can be beneficial here.
  • Personalize: Address the recipient by name. Mention something specific about their company to show you’ve done your homework. Avoid generic templates.
  • State Your Value Proposition: Clearly and concisely explain what problem your API solves and why it’s worth their time.
  • Follow Up, but Don’t Spam: If you don’t receive a response, it’s okay to send a follow-up email after a week or so. But know when to step back. If someone isn’t interested, respect their decision and move on.

The Importance of Contacting the Right Person

It’s crucial to emphasize that in direct outreach, targeting the right individual is half the battle. Decision-makers, technical leads, or those facing the problem your API solves are your best bets. They can understand the value, make decisions, and drive adoption. Casting too wide a net might give you numbers, but not results.

Understand this method with this video.

Method 5: Paid Ads

After diving deep into the organic methods of promoting your API, it’s time to address paid ads. Now, I’ll be honest here – I haven’t personally utilized paid ads for my APIs. What has worked for me are “how-to” tutorials and online tools that provide value to users.

However, the world of paid advertising offers opportunities that can be rewarding, especially if executed right. So, if you’re considering testing paid ads, here are my thoughts.

1. Google Ads:

Google is where most people start their online journeys, whether it’s searching for a tool, a tutorial, or an API.

  • Keyword Research: Begin by researching which keywords potential users might type into Google when looking for solutions your API offers. Tools like Google Keyword Planner and My Ai-Powered Keyword Tool can help.
  • Crafting the Ad: Your ad should be compelling and to the point. Highlight what sets your API apart. Is it the ease of use? Speed? Versatility?
  • Targeting & Budgeting: Google Ads allows you to target specific demographics, regions, and devices. Be strategic, and set a budget that doesn’t break the bank but still provides visibility.

Check out out Google Ads course click here.

2. LinkedIn Ads: B2B Goldmine

If you’re targeting businesses or professionals, LinkedIn is your playground.

  • Audience Selection: LinkedIn offers granular targeting based on job titles, industries, company sizes, and more. Pinpoint the exact audience that would benefit from your API.
  • Ad Formats: LinkedIn offers various ad formats – Sponsored Content, Message Ads, Dynamic Ads. Choose the one that aligns best with your API’s selling point.
  • Budget & Bidding: LinkedIn can be pricier than other platforms, so set a clear budget. Optimize your bids for conversions, especially if you have a clear CTA (like signing up for a demo).

3. Quora Ads: Tapping into Curiosity

Quora is a platform for questions, making it an excellent place to position your API as the answer.

  • Contextual Targeting: Place your ads next to relevant questions. For example, if your API is about e-commerce, target questions related to e-commerce challenges or solutions.
  • Ad Formats: Quora offers Image & Text ads. Given the platform’s text-heavy nature, ensure your ad copy is sharp and engaging.
  • Conversion Tracking: Use Quora’s pixel to track conversions, whether it’s sign-ups, downloads, or demo requests.

Check out our Quora Ads course click here.

Also, you can write a blog related to API (learn to create a profitable blog website with ChatGPT) and inside that blog, you can bring traffic for free. Check out our free Quora Website Traffic Course click here.

Personal Note:

While these paid ad platforms offer expansive reach, always remember that genuine value drives the best results. Tutorials and tools that solve real problems often lead to organic growth, positive word of mouth, and lasting users.

Understand this method with this video.

Method 6: Indirect Promotion

I believe this method is one of the best, it requires some work, but gets great results.

You will create tutorials on how to build something, and within the tutorial, you can promote the API.

Let me give you some examples (show 3 examples)

how to build tools

how to collect data

You can always brainstorm Ideas with ChatGPT (show example prompt)

Where to publish?

Medium (personal and later on publications)

dev io

daily dev

Scale with your own blog and Youtube

Understand this method with this video.

Conclusion to Application Programming Interface (API)

So I have you have learned a lot of things inside this mini article. Make sure to read and watch the attached videos for better understanding.

Also, you can explore & sign up for our membership to access all courses. Check courses here.

Hope you liked this application programming interface (API) course to build and sell APIs for passive income.