APIHub

Unified API gateway for Indonesian data: regions, holidays, prayer times, and more.

Quickstart

  1. Register at the developer dashboard.
  2. Create an API key — copy it immediately, it is shown only once.
  3. Use the key in the Authorization: Bearer YOUR_API_KEY header.

Example with curl

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.apihub.co.id/v1/regions/provinces"

Example with TypeScript SDK

import { ApiHubClient } from "@apihub/sdk";

const client = new ApiHubClient({ apiKey: "YOUR_API_KEY" });
const provinces = await client.listProvinces();
console.log(provinces);

Response Format

All endpoints return a consistent envelope:

{
  "success": true,
  "data": { ... },
  "meta": { "request_id": "...", "credits_used": 1 }
}

Error Format

{
  "success": false,
  "error": { "code": "INVALID_API_KEY", "message": "..." },
  "meta": { "request_id": "..." }
}

Rate Limits

Default: 10 requests per second per API key. Upgrade your plan for higher limits.