Rapid API: Advantages of using it; Gita APIs on it

Rapid API , https://rapidapi.com/ 

It seems I had subscribed to Ved Vyas foundation BG API (GitHub repo links to it even though Rapid API page does not mention Ved Vyas): https://rapidapi.com/bhagavad-gita-bhagavad-gita-default/api/bhagavad-gita3 in Aug. 2024. That subscription was active now (free tier).

In Windows cmd prompt, following worked (X-Key has to be specified):
curl --request GET ^
--url "https://bhagavad-gita3.p.rapidapi.com/v2/chapters/?skip=0&limit=18" ^
--header "x-rapidapi-host: bhagavad-gita3.p.rapidapi.com" ^
--header "x-rapidapi-key: ---snip---"

Top right icon -> User Settings -> Applications -> default-application_... -> Application Key shows my x-rapidapi-key

I did not specify any card or bank info.

Top right icon -> Personal Billing -> Billing -> Subscriptions & Usage -> Shows my Bhagavad Gita API subscription and Date subscribed as Aug 20, 2024! 

https://rapidapi.com/bhagavad-gita-bhagavad-gita-default/api/bhagavad-gita3 does not seem to need a key [wrong] . I have subscribed to its free plan. In this case, no credit card info. was asked. But the API has only get chapters and verses but not search. This seems to the associated GitHub repo: https://github.com/gita/bhagavad-gita-api.
--- end extract ---

I was wrong in above extract about the API not (seeming to need) needing a key. It does need a key. The feature to try the API out in Rapid API website seems to automatically add the key for the logged in user. I may have missed that when I tried it out in Aug 2024.

But the rest of the note ties in with what RapidAPI a/c page showed me.

https://rapidapi.com/developer/billing/subscriptions-and-usage shows 1 API call to Bhagavad Gita (only API I am subscribed to) for today. That would be the curl command I tried (given above).

https://rapidapi.com/bhagavad-gita-bhagavad-gita-default/api/bhagavad-gita3 shows I am subscribed to "BASIC". It also shows 2816 Subscribers and 22871ms Latency with 82% Service Level. "Change your plan" link shows only Basic option of $0.00 /mo.
Requests: 500,000 / month Hard limit
Rate limit: 1000 requests per hour
Bandwidth platform fee: 10240MB / month [This is followed by in gray colour:] (+ 0.001$ per 1MB)
  • I think the gray colour indicates that it will not apply to me. Anyway I have not provided any card or bank info. But even then, that 1 cent per 1MB message being shown is disconcerting. Ideally, it should not be shown at all. The platform can simply stop responding to API requests once the bandwidth platform limit is reached.
It does not have other plans besides Basic.

In contrast, https://rapidapi.com/ysanimesh/api/bhagavad-gita-api lists 4 plans: Basic (free) and some paid plans. It shows only 6 subscribers.

https://rapidapi.com/ysanimesh/api/bhagavad-gita-api claims, "Note that this API is free to use but has a limit of 1000 requests per hour." But when I try to subscribe to it (clicking on 'Subscribe to Test' button, and click on 'Start Free Plan' under Basic (plan), I am asked to fill in Billing information which asks for Card details.  https://rapidapi.com/ysanimesh/api/bhagavad-gita-api/pricing has a FAQ question on why a credit card is required for a Freemium API. ... I don't want to get into such (credit) card stuff, as of now. Using the API (HTML + JS code from the API playground) gives a 'not subscribed to this API' error.
--- end extract ---
===========================

Extracts from CG chat, "RapidAPI" are given below.

Me: It seems to be free to publish API on RapidAPI
https://docs.rapidapi.com/docs/what-is-rapidapi says "It is also free and easy to add your API to the hub. We call developers who add APIs to the hub API builders or API providers. API builders can keep their APIs private and share them with only certain consumers, or they can make their APIs public and optionally monetize their APIs."

But does RapidAPI provide a hosting service like Node Express and mySQL database?

CG: Good question. Short answer: No — RapidAPI does not (in general) provide full-blown hosting (like a Node/Express server + MySQL database) for your API backend. RapidAPI is primarily a marketplace and gateway for APIs. (RapidAPI)

🔎 What RapidAPI does provide

  • As an API provider you can list your existing API on RapidAPI Hub. That gives your API exposure to a large community. (RapidAPI)

  • RapidAPI handles user-management, authentication (via their API key), monetization/subscription plans, billing, analytics, usage tracking, and rate-limiting — i.e. the “marketplace infrastructure.” (get.rapidapi.com)

  • For enterprises, there’s also RapidAPI Enterprise Hub, which acts as a “private API hub” — useful for internal APIs across teams, or partner/customer-facing APIs. (RapidAPI)

  • RapidAPI gives tools (via RapidAPI Studio) to help you define API endpoints, docs, plans, and manage the “exposed-API” side. (rapidapi.com)


⚠ What RapidAPI does not provide — you need your own backend infrastructure

  • It does not act as a hosting environment where you write server-side code (e.g. Node/Express) or store data (e.g. MySQL, files, persistent storage).

  • The API exposed through RapidAPI must already be hosted somewhere — e.g. on your own server, cloud virtual machine, serverless functions (AWS Lambda, etc.), or any hosting provider you choose. RapidAPI simply routes calls from users (developers) to your backend. This is shown in how RapidAPI’s “gateway / runtime” forwards requests to your defined “Base URL” or an external gateway. (RapidAPI)

  • RapidAPI does not implicitly give you database hosting, storage, compute, or server maintenance; those remain your responsibility.


✅ What that means for you (practically)

If you want to publish your API on RapidAPI:

  • You still need to build your API backend (e.g. using Node/Express, or any serverless framework) and host it somewhere accessible (cloud VM, serverless provider, etc.).

  • Once hosted, you can then register that hosted API in RapidAPI — using its “Base URL” / gateway configuration — and let RapidAPI handle the public-facing parts: keys, monetization, billing, documentation, analytics.

  • RapidAPI helps you package your API as a service easily for other developers — but it does not replace your hosting or database infrastructure.


...

Me: I see that free Bhagavad Gita API is made available through RapidAPI. So there is no monetization issue here. Why did they go with Rapid API instead of directly providing their hosting environment API endpoint? Any ideas?

CG: There are several practical reasons why a developer who already has a free public API (like a Bhagavad Gita API) would still choose to publish it on RapidAPI, even if they are not monetizing it. These reasons are quite strong and explain why you see many similar free scripture APIs on RapidAPI.

Below are the main motivations (from experience and what API providers openly state):


1. RapidAPI gives global visibility and traffic “for free”

RapidAPI is the largest API marketplace.
If you publish an API there:

  • Developers can discover it easily.

  • It appears in search when users type “Gita”, “books”, “scriptures”, “Hindu”, “spirituality”, etc.

  • You get thousands of potential consumers without marketing.

For small open-source spiritual projects, this is a huge benefit.


2. RapidAPI handles API keys, throttling, analytics, abuse protection

Running an open free API publicly has risks:

  • People may hammer the endpoint

  • Bots may scrape aggressively

  • Cloud hosting bills may explode

  • Some users misuse or DDoS the server

RapidAPI solves all of this:

  • RapidAPI handles API key generation

  • They provide rate limiting (e.g., 50 requests/min)

  • They provide usage analytics

  • They block abusive patterns for you

So the provider doesn’t need to build authentication, key management, or logs.


3. RapidAPI gives a uniform, reliable “developer experience”

A standalone API must provide:

  • API docs

  • Code examples

  • Test interface (like GraphQL playground or Swagger)

  • Environment for trying out queries

  • SDKs or snippets

RapidAPI automatically provides:

  • Auto-generated documentation

  • Built-in “Test Endpoint” UI

  • Auto-generated code snippets for many languages

  • A clean dashboard

This dramatically reduces the maintenance burden.


4. Providers don’t need to manage CORS, headers, SDKs

RapidAPI acts as a proxy.
It handles:

  • CORS

  • complex headers

  • standardization

  • rate-limiting

  • retries

  • API key validation

This removes a lot of backend work.


5. The provider may be using free or fragile hosting

Many free APIs (including Gita APIs) are hosted on:

  • low-cost VPS

  • cheap shared hosting

  • free-tier cloud (Heroku free tier, Vercel free functions, Render free tier)

  • or GitHub Pages JSON files

These environments can have:

  • limits

  • uptime issues

  • slow response

  • IP blocks

By routing traffic through RapidAPI’s proxy:

  • RapidAPI becomes a “buffer”

  • Traffic patterns are smoothed

  • The provider’s backend isn’t directly exposed

  • Even if backend is slow, RapidAPI clients see more stable behavior


6. RapidAPI removes the need to maintain API infrastructure

If the original developer wants to:

  • stop maintaining a server

  • avoid running a full backend

  • avoid keeping up an AWS/Node/MySQL environment

They can move to:

  • GitHub JSON

  • a simple static endpoint

  • or a minimal serverless function

And let RapidAPI be the public entry point.


7. Some APIs originally had monetization plans

Even if they are free today, many free Gita APIs on RapidAPI:

  • originally had a small paid plan

  • later made it free

  • or used RapidAPI monetization but set price to $0

RapidAPI made it easy to switch between free/paid without changing the API URL.


Summary — Why Bhagavad Gita APIs like this use RapidAPI

Reason Benefit
Global visibility Instant reach to millions of developers
No need to build auth system RapidAPI handles API keys
Usage tracking Analytics dashboard
Abuse protection Proxy + throttling
No need for hosting complexity Backend can be simple
Easy testing/playground Developers can explore API quickly
Monetization flexibility Free now, but can be monetized later

So even a free, goodwill-based API benefits a lot from RapidAPI.


...

================================

Comments