type: decision
status: active
timestamp: 2026-06-22
tags: [decision, apis, github-pages, rapidapi, data-aggregator, hosting, monetization]

API hosting triple-rail: GH Pages per API + RapidAPI listing + data.oriz.in aggregator hub

Every API repo serves data via THREE rails simultaneously GitHub Pages per API with custom domain `<name>.api.oriz.in` (CNAME). (2) RapidAPI\ marketplace listing (free + paid tiers for monetization). (3) Single `data.oriz.in`\ aggregator app on Cloudflare Pages that catalogs all APIs + provides unified docs\ + dashboard. NO Cloudflare Workers anywhere. Each API repo also ships native distributables\ (APK/MSIX/EXE/PWA) via PWABuilder — even API repos get installable apps.\ 14 APIs scaffolded: existing FII/DII + MMI + 12 new (NSE-BSE tickers, MF-NAV proxy\ of api.mfapi.in, RBI rates, gold/silver, IRCTC PNR, CPCB AQI, global AQI proxy,\ petrol/diesel, pincode, IFSC, India holidays, currency aggregator).

API hosting triple-rail

Decision

Each oriz API is served via THREE rails simultaneously:

RailWherePurpose
1. GitHub Pages (per repo)<repo>.github.io/<repo> with custom domain <name>.api.oriz.inPrimary fetchable endpoint. Free, unlimited bandwidth, GH CDN.
2. RapidAPIMarketplace listing per APIDiscovery + monetization (free + paid tiers). Aggregates billing for us.
3. data.oriz.in aggregatorCF Pages appSingle catalog page listing all 14+ APIs with docs / playground / status.

NO Cloudflare Workers used for any API. Confirms the move-away from CF Workers locked earlier today.

Domain pattern

Each API gets <name>.api.oriz.in:

API repoDomainStatus
oriz-flow-fii-dii-activity-apifii-dii.api.oriz.inLIVE (CNAME pending)
oriz-mmi-tickertape-mmi-apimmi.api.oriz.inLIVE (CNAME pending)
oriz-nse-bse-tickers-apitickers.api.oriz.inTO BUILD
oriz-mf-nav-apimf-nav.api.oriz.inTO BUILD (proxies api.mfapi.in/mf)
oriz-rbi-rates-apirbi-rates.api.oriz.inTO BUILD
oriz-gold-silver-rates-apigold-silver.api.oriz.inTO BUILD
oriz-irctc-train-pnr-apiirctc.api.oriz.inTO BUILD
oriz-air-quality-india-apiaqi-india.api.oriz.inTO BUILD
oriz-aqi-cities-apiaqi.api.oriz.inTO BUILD
oriz-india-petrol-diesel-apifuel.api.oriz.inTO BUILD
oriz-pincode-apipincode.api.oriz.inTO BUILD
oriz-ifsc-apiifsc.api.oriz.inTO BUILD
oriz-india-holidays-apiholidays.api.oriz.inTO BUILD
oriz-currency-rates-apicurrency.api.oriz.inTO BUILD

CNAME setup at Cloudflare DNS (free tier) — points subdomain to chirag127.github.io. GH Pages “Custom domain” field receives the same.

Per-API repo shape

chirag127/oriz-<name>-api/
+-- .github/workflows/
¦   +-- scrape.yml         # GH Action cron scrapes data ? commits to data/
¦   +-- pages.yml          # GH Pages deploy from /data on push to main
¦   +-- distribute.yml     # PWABuilder builds APK/MSIX/EXE on tag ? GH Release
+-- scripts/scrape.mjs     # ~50 LOC node-fetch + cheerio
+-- data/
¦   +-- 2026-06-22.json    # daily snapshot
¦   +-- latest.json        # always-current
+-- docs/                  # GH Pages site (Astro static)
¦   +-- index.astro        # landing + docs + playground
+-- manifest.webmanifest   # PWA manifest for PWABuilder
+-- CNAME                  # custom domain
+-- README.md
+-- LICENSE                # MIT

RapidAPI integration

Per API:

  1. Manual one-time: list the API on rapidapi.com (free for us; their marketplace gets users)
  2. RapidAPI proxies requests to <name>.api.oriz.in/data/latest.json (or specific endpoint)
  3. Free tier: 100 req/day per user (their default). Paid tier: 10K/mo @ $5 (split: ~$3.50 to us)
  4. Track via single RAPIDAPI_KEY in our .env (synced from master)

data.oriz.in aggregator hub

New app oriz-data-aggregator-app at c:/D/oriz/repos/oriz/own/prod/apps/content/oriz-data-aggregator-app/:

Native distributables for APIs

Even though they’re APIs, each repo also ships:

Per pwabuilder-as-primary-converter.md: PWABuilder reads the manifest.webmanifest + generates these on release tag push.

Why GH Pages (not CF Pages)

User mandate (2026-06-22 evening): “Each of the API will have their own website also but it will be hosted on the GitHub pages instead of cloudflare pages.”

Reason inferred: GH Pages is free + unlimited bandwidth + GH-CDN-cached. No CF Workers consumed. Custom domain works identically. CF Pages stays for full Astro apps; GH Pages is for static data + minimal docs sites.

This is a NARROW exception to the cloudflare-pages-only.md rule — applies ONLY to API repos.

Cross-refs


Edit on GitHub · Back to index