caliph-api
raw JSON → 1.0.1 verified Mon Apr 27 auth: no javascript abandoned
Version 1.0.1. Unmaintained Node.js library offering a collection of Indonesian-centric scrapers, downloaders, encryption utilities, and random generators. Provides easy-to-use promise-based API for services like TikTok, Instagram, YouTube, and local Indonesian data (cuaca, gempa, artinama). Released primarily for personal use; no active updates or community maintenance. Known for combining many heterogeneous APIs into a single package without consistent error handling or documentation. Alternatives include dedicated scrapers like ytdl-core, instagram-scraper, or locale-specific packages.
Common errors
error TypeError: api.info.gempa is not a function ↓
cause Method may have been removed or renamed.
fix
Check documentation for updated method names; fallback to alternative.
error Cannot find module 'caliph-api' ↓
cause Module not installed or ESM context without proper transformation.
fix
Install with
npm install caliph-api and use require, not import. error UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'enc' of undefined ↓
cause api.encrypt is undefined due to missing dependencies or broken require.
fix
Ensure all dependencies are installed; try reinstalling.
error Error: Request failed with status code 404 ↓
cause Underlying API endpoint is down or changed.
fix
Verify that the service is still available; consider alternative.
Warnings
deprecated Library is effectively unmaintained; no updates or fixes. ↓
fix Use dedicated libraries like ytdl-core, instagram-scraper, etc.
gotcha All methods return Promises; forgetting to await will cause silent failures. ↓
fix Always use await or .then() on API calls.
gotcha No TypeScript definitions; all types are any. ↓
fix Create custom .d.ts or use JSDoc.
gotcha Some endpoints (e.g., gempa) may be broken due to external API changes. ↓
fix Check GitHub issues before relying on specific features.
breaking Incorrect usage of encrypt.binary.enc with non-string arguments may crash. ↓
fix Always pass strings.
Install
npm install caliph-api yarn add caliph-api pnpm add caliph-api Imports
- default wrong
import api from 'caliph-api';correctconst api = require('caliph-api'); - api.encrypt.binary.enc wrong
api.encrypt.binary.enc('hello'); // works but no type safetycorrectapi.encrypt.binary.enc('hello'); - api.info.gempa wrong
api.info.gempa(); // returns promise, must be awaitedcorrectapi.info.gempa().then(console.log);
Quickstart
const api = require('caliph-api');
async function main() {
try {
const gempa = await api.info.gempa();
console.log(gempa);
const binaryEncoded = api.encrypt.binary.enc('hello world');
console.log(binaryEncoded);
const binaryDecoded = api.encrypt.binary.dec(binaryEncoded);
console.log(binaryDecoded);
} catch (error) {
console.error(error);
}
}
main();