@leewenjie/oxaide
v1.0.1
Published
TypeScript client for the Oxaide Singapore Entity & GST API: ACRA register and IRAS GST lookups by UEN.
Maintainers
Readme
@leewenjie/oxaide
TypeScript client for the Oxaide Singapore Entity & GST API — ACRA register and IRAS GST lookups by UEN (Unique Entity Number), with name search and batch lookups.
- API docs & key signup: https://oxaide.com/developers
- OpenAPI spec: https://oxaide.com/openapi.json
- Register snapshot: ACRA via data.gov.sg (the snapshot date is returned on every response). Confirm live status on BizFile for statutory filings.
Install
npm install @leewenjie/oxaideRequires Node ≥ 18 (uses the global fetch). No runtime dependencies.
Get an API key
Mint a free key (50 calls/month) at https://oxaide.com/developers, or:
curl -X POST https://oxaide.com/api/v1/keys \
-H 'Content-Type: application/json' \
-d '{"email":"[email protected]"}'The key is shown once — store it somewhere safe.
Quickstart
import { OxaideClient } from "@leewenjie/oxaide";
const client = new OxaideClient(process.env.OXAIDE_API_KEY!);
// Look up one entity by UEN
const { found, entity, quota } = await client.entity("201806463W");
console.log(entity);
// {
// uen: "201806463W",
// name: "HILLMERE PRIVATE LIMITED",
// status: "Live Company",
// entity_type: "Local Company · Exempt Private Company Limited by Shares",
// registration_date: "2018-02-23",
// gst_registered: false,
// snapshot_date: "2026-11-16",
// source_attribution: "ACRA register snapshot via data.gov.sg …"
// }
console.log(quota); // { tier: "free", limit: 50, used: 1, remaining: 49, resets: "2026-12-01" }
// Search by name
const search = await client.search("DBS BANK", { limit: 5 });
console.log(search.results[0]);
// { uen: "196800306E", name: "DBS BANK LTD.", status: "Live Company", live: true }
// Batch lookup (paid tiers only), up to 50 UENs per call
const batch = await client.batch(["201806463W", "196800306E"]);
for (const row of batch.results) {
console.log(row.uen, row.found ? row.entity?.name : row.error);
}An unknown UEN is not an error: entity() resolves with found: false
and entity: null.
Quota
Every response carries the key's quota (meta.quota in the raw API). Each SDK
result exposes it as .quota, and the most recent one is also available as
client.lastQuota.
| Tier | Calls / month | | ------- | ------------- | | free | 50 | | starter | 2,500 | | growth | 15,000 | | scale | 50,000 |
Errors
All errors extend OxaideError (with a .status):
| Class | HTTP | Meaning |
| --------------------- | ---- | --------------------------------------------------- |
| AuthenticationError | 401 | Missing, unknown, or revoked API key |
| PaymentRequiredError| 402 | Endpoint needs a paid tier (e.g. batch on free) |
| ValidationError | 400/422 | Malformed request (bad UEN, empty batch, …) |
| RateLimitError | 429 | Monthly quota exhausted; see quota.resets |
import { OxaideClient, PaymentRequiredError } from "@leewenjie/oxaide";
try {
await client.batch(["201806463W"]);
} catch (err) {
if (err instanceof PaymentRequiredError) {
// upgrade the key's plan at https://oxaide.com/developers
}
throw err;
}Options
new OxaideClient(apiKey, {
baseUrl: "https://oxaide.com", // default
fetch: customFetch, // optional fetch implementation
});License
MIT
