Developer Documentation
Comprehensive unit conversion reference for developers, scientists, and engineers. 200 units across 20 measurement categories with Decimal-precision conversion, 157 glossary terms, 5 interactive tools, and N-squared comparison pages. All conversions computed on-the-fly with sub-millisecond pure-Python engine.
- 200 units across 20 measurement categories (length, weight, temperature, volume, area, speed, time, data-storage, pressure, energy, frequency, force, power, angle, fuel-economy, data-transfer, density, torque, cooking, typography)
- Decimal-precision conversion engine — no floating-point rounding errors
- N-squared unit pair conversion pages (e.g. /length/meter-to-foot/)
- N-squared unit comparison pages (e.g. /length/compare/meter-vs-foot/)
- Specific value conversion (e.g. /length/meter-to-foot/100/)
- 157 glossary terms covering measurement science and metrology
- 5 interactive tools: converter, quick-convert, table-generator, comparison, recipe-converter
- 15 languages: en, ko, ja, zh-hans, es, fr, de, pt, ru, vi, tr, ar, hi, th, id
Quick Start
curl -s "https://unitfyi.com/api/convert/?from=meter&to=foot&value=100"
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/convert/?from={unit}&to={unit}&value={n} | Convert a value between units |
| GET | /api/categories/ | List all 20 measurement categories |
| GET | /api/categories/{slug}/ | Category detail with all units |
| GET | /api/units/ | List all 200 units |
| GET | /api/unit/{slug}/ | Unit detail with conversion factors |
| GET | /api/convert/table/ | Conversion table for a category |
| GET | /api/glossary/ | List all glossary terms |
| GET | /api/glossary/{slug}/ | Glossary term detail |
| GET | /api/blog/posts/ | Blog posts list |
| GET | /api/blog/posts/{slug}/ | Blog post detail |
| GET | /api/tools/ | List interactive tools |
| GET | /api/search/ | Search units, categories, glossary |
| GET | /api/v1/glossary/ | Glossary terms (DRF ViewSet, paginated) |
| GET | /api/v1/tools/ | Tools (DRF ViewSet) |
| GET | /api/v1/faqs/ | FAQs (DRF ViewSet) |
| GET | /api/v1/search/?q={query} | Unified search (DRF) |
| GET | /api/v1/stats/ | Site statistics |
URL Patterns
Use these patterns to construct URLs programmatically:
/
Homepage — browse all 20 measurement categories (e.g. /)
/{category}/
Category detail with all units (e.g. /length/)
/{category}/unit/{unit}/
Unit detail page (e.g. /length/unit/meter/)
/{category}/{from}-to-{to}/
Unit pair conversion page (N² pSEO) (e.g. /length/meter-to-foot/)
/{category}/{from}-to-{to}/{value}/
Specific value conversion (e.g. /length/meter-to-foot/100/)
/{category}/compare/{a}-vs-{b}/
Unit comparison page (N² pSEO) (e.g. /length/compare/meter-vs-foot/)
/glossary/
Measurement glossary index (e.g. /glossary/)
/glossary/{slug}/
Glossary term detail (e.g. /glossary/metric-system/)
/blog/
Measurement science articles (e.g. /blog/)
/blog/{slug}/
Blog article detail (e.g. /blog/si-units-history/)
/tools/
Interactive tools index (e.g. /tools/)
/tools/{slug}/
Tool page (e.g. /tools/converter/)
/search/
Search units, categories, glossary (e.g. /search/?q=meter)
Response Format
All endpoints return JSON with pagination:
Example JSON response
{
"count": 636,
"next": "https://example.com/api/v1/items/?page=2",
"previous": null,
"results": [
{"slug": "example", "name": "Example Item", "...": "..."}
]
}
OpenAPI Specification
Full API schema available as OpenAPI 3.1.0 JSON. Import into Swagger UI, Postman, or any OpenAPI-compatible tool.
SDK Packages
pip install unitfyi
Unit conversion with Decimal precision, 220 units (v0.1.2)
npm install unitfyi
TypeScript unit conversion utilities (v0.1.1)
Embed Widget
Embed data cards on your site:
https://widget.unitfyi.com
npm install unitfyi-embed
Format Support
- Markdown endpoints: Append
.mdto any page URL for LLM-friendly markdown output. - Internationalization: Content available in 14 languages: ko, ja, zh-hans, es, fr, de, pt, ru, vi, tr, ar, hi, th, id.