Inventodia Logo
InventodiaElevating Cambodia, One Idea at a Time.
  • Who are we
  • Services
  • AI Agents
  • Technologies
  • What we've done
  • FAQ
  • Contact
Inventodia Logo
InventodiaElevating Cambodia, One Idea at a Time.

Have a project in mind or a question? We'd love to hear from you.

  • +855 98 849 330
  • info@inventodia.com
  • Phnom Penh, Cambodia

About

  • Who are we
  • Services
  • Cambodia Web Agency
  • AI Agents
  • Technologies
  • What we've done
  • FAQ
  • Support

Free Resources

  • Free Tools
  • Website Audit
  • Resources
  • Developers

Legal

  • Privacy Policy
  • Terms of Service

Discover

  • Cambodia Postal Code
  • THLA Translation
  • AZ Web Tools
  • List Post Code
  • World Public Holiday

Get in touch

Scan to open Inventodia on Telegram

@inventodia

Contact us

Open Telegram

© Copyright 2017-2025 Inventodia.

Privacy PolicyTerms of Service

Developer Resources

Free APIs, Khmer font guides, and code snippets for developers building for Cambodia. Built from our own production infrastructure.

We operate several public APIs and build bilingual (Khmer/English) web applications every day. This page collects the resources we have open-sourced or made publicly available. Everything here is used in our own products — nothing is a demo or a toy.

Free Public APIs

Cambodia Postal Code API

Look up postal codes, communes, districts, and provinces for any location in Cambodia. The dataset covers all 25 provinces and is maintained from official sources.

Base URL

https://api.cambodiapostalcode.com

Examples

Get all provinces

curl https://api.cambodiapostalcode.com/api/v1/provinces

Search by postal code

curl https://api.cambodiapostalcode.com/api/v1/postal-codes?code=12201

JavaScript fetch

const res = await fetch('https://api.cambodiapostalcode.com/api/v1/provinces');
const data = await res.json();

Rate limit

Free tier: 100 requests/minute. No API key required for basic lookups.

Terms

Free for commercial and non-commercial use. Attribution appreciated but not required.

Full documentation

World Public Holiday API

Get public holidays for any country and year. Covers 190+ countries with accurate, up-to-date holiday data including regional variations.

Base URL

https://api.worldpublicholiday.com

Examples

Get holidays for Cambodia 2026

curl https://api.worldpublicholiday.com/api/v1/holidays?country=KH&year=2026

JavaScript fetch

const res = await fetch('https://api.worldpublicholiday.com/api/v1/holidays?country=KH&year=2026');
const data = await res.json();

Rate limit

Free tier: 60 requests/minute. No API key required for basic queries.

Terms

Free for commercial and non-commercial use. Data is sourced from official government sources where available.

Full documentation

Guides & Snippets

Khmer Web Font Subsetting Guide

Khmer fonts are large — 200KB+ per weight. This guide shows how to subset Khmer fonts to under 30KB while keeping all necessary glyphs, using pyftsubset and our production script.

Read guide

Khmer Text Handling Snippets

Unicode normalisation, Limon-to-Unicode conversion, correct line breaking, and search collation for Khmer text. Copy-paste ready.

Read guide

Cambodia Postal Code Developer Portal

Full API documentation, interactive playground, and API key management for the Cambodia Postal Code API.

Visit resource

Khmer Web Font Subsetting Guide

Khmer fonts include hundreds of glyphs for conjuncts and independent vowels, making them 5-10x larger than Latin fonts. Subsetting removes unused glyphs while keeping everything needed for body text. This is the same process we use on all our production sites.

  1. 1.Install fonttools: pip install fonttools brotli zopfli
  2. 2.Download a Khmer font (e.g. Hanuman, Noto Sans Khmer) in TTF or OTF format.
  3. 3.Create a unicode range file covering basic Khmer (U+1780–U+17FF) plus Latin (U+0020–U+007E) and numbers.
  4. 4.Run pyftsubset with the --unicodes flag and the range file. Use --layout-features=* to keep OpenType features.
  5. 5.Convert to WOFF2 with --flavor=woff2 and --with-zopfli for maximum compression.
  6. 6.The resulting font should be 20-40KB — small enough to inline as a data URL or preload without blocking render.
  7. 7.Use font-display: swap in your @font-face declaration so text renders immediately with a fallback, then swaps when the subset loads.

Khmer Text Handling Snippets

Unicode normalisation

Khmer text can be stored in composed or decomposed Unicode form. Normalise to NFC before storing or comparing.

// JavaScript — normalise Khmer text to NFC
const text = 'សួស្តី';
const normalised = text.normalize('NFC');

Correct line breaking

Khmer does not use spaces between words. Use CSS line-break: anywhere or word-break: break-word for correct wrapping, or use a Khmer word segmentation library.

/* CSS — correct Khmer line breaking */
.khmer-text {
  line-break: anywhere;
  word-break: break-word;
  /* Or use a segmentation library for proper word boundaries */
}

Khmer number conversion

Convert between Arabic numerals (123) and Khmer numerals (១២៣) for display.

// JavaScript — Arabic to Khmer numerals
function toKhmerNumeral(num) {
  const khmerDigits = '០១២៣៤៥៦៧៨៩';
  return String(num).replace(/\d/g, d => khmerDigits[+d]);
}
// toKhmerNumeral(123) → '១២៣'
Need help building for the Cambodian market?

About these resources

These resources are built and maintained by Inventodia, a software studio based in Cambodia. We use them in our own production products every day. If you find them useful, we hope you will consider us for your next project — but there is no obligation. We publish them because good developer documentation for the Cambodian market is scarce, and we would rather it exist.