Public no-token API for every tool

Every tool's core logic is also exposed as a standalone JavaScript module. Import the function, call it with input, get the output — no credentials, no API key, no server round-trip.

0 tokens 0 cookies 0 servers (runs in your browser) MIT licensed

Two ways to use the API

Pick whichever fits your use case. Both expose the exact same functions and parameters.

Option 1 — Import as an ES module (recommended for websites)

Load the function directly from the CDN. Works in any modern browser and Node 18+.

// Format SQL from any webpage
import { formatCode } from 'https://bayhaqy.my.id/apps/api/code-formatter.js';

const result = formatCode({
  language: 'sql',
  code: 'select * from users where id=1',
  indent: '  ',
  keywordCase: 'upper'
});
console.log(result);
// → "SELECT\n    *\nFROM\n    users\nWHERE\n    id = 1"

Option 2 — Deploy as a REST API (for non-browser clients)

Wrap the modules in a Cloudflare Worker (free tier, 100k req/day) to get a public HTTPS endpoint with rate limiting. The full template is in worker-template.js.

# Install wrangler (Cloudflare CLI)
npm install -g wrangler

# Clone the repo and deploy
git clone https://github.com/bayhaqy/apps.git
cd apps/api
wrangler deploy

# Your API is now live at:
# https://bayhaqy-api.<your-subdomain>.workers.dev/api/...
# Call it from anywhere — curl, Python, Go, anything
curl "https://your-worker.workers.dev/api/code-formatter?language=sql&code=select%20*%20from%20users&keywordCase=upper"

# Response:
// "SELECT\n    *\nFROM\n    users"

Available endpoints

Every endpoint accepts both GET (query params) and POST (JSON body). Response is always JSON.

EndpointParametersReturns
/api/code-formatterlanguage, code, indent, keywordCaseFormatted code string
/api/text-difforiginal, modified, mode, ignoreCase, ignoreWhitespaceDiff ops, stats, HTML
/api/text-cleantext, rules{trimLines, collapseSpaces, removeEmptyLines, ...}Cleaned text
/api/date-difffrom, to (YYYY-MM-DD), excludeWeekends, excludeHolidaysYears/months/days + totals
/api/date-adddate, amount, unit (days/weeks/months/years)Resulting date + day of week
/api/agebirthDate, asOfAge breakdown + next birthday
/api/workdaystartDate, workdays, excludeHolidaysEnd date after N workdays
/api/timezone/listArray of IANA timezone names
/api/timezone/convertfromCity, hour, targetCityHour, dayOffset, businessHours flag
/api/timezone/meetingfromCity, targetCities[]Best hour + per-city results
/api/loanprincipal, annualRate, termMonths, interestType, startDateMonthly payment, totals, full schedule
/api/convertvalue, from, to, categoryConverted value + factor
/api/currency/ratesbase, apiSourceLive currency rates
/api/currency/convertamount, from, to, rates, baseConverted amount + rate
/api/qr/wifissid, password, encryption, hiddenWIFI: QR string
/api/qr/emailto, subject, bodymailto: QR string
/api/qr/vcardname, phone, email, org, urlvCard 3.0 QR string

Live playground

Try the API directly in your browser. Pick an endpoint, fill in the params, hit "Run".

Try it
// Output will appear here

Rate limiting & fair use

Browser module (Option 1): No rate limit — the code runs in your own browser. Use it as much as you want.

REST API (Option 2): Default 60 requests/minute per IP. The included Cloudflare Worker template uses a token-bucket limiter. For higher limits, deploy your own Worker — the free tier gives 100k requests/day.

All endpoints are stateless. No data is logged, stored, or tracked. The Worker template doesn't even use a database — rate limit buckets live in-memory and reset on cold start.

Available modules

ModuleFunctionsSize
code-formatter.jsformatCode, formatSql, formatPython, formatHtml, formatCss, formatJs~5 KB
text-diff.jsdiffText, cleanText, diffChars, diffWords, diffLines~5 KB
date-calculator.jsdateDifference, addDays, calculateAge, workdayCalculator~5 KB
timezone-slider.jsconvertTimezone, listTimezones, findMeetingTime~4 KB
loan-calculator.jscalculateLoan~4 KB
converter.jsconvertUnit, convertTemperature, convertShoeSize, fetchCurrencyRates, convertCurrency~6 KB
qr-studio.jsformatWifi, formatEmail, formatSms, formatPhone, formatVCard, generateQrDataUrl~3 KB
worker-template.jsCloudflare Worker with all endpoints + rate limiter~6 KB