Powerful RESTful API for unit conversions with 15-decimal precision. Perfect for developers building apps, websites, and integrations that need accurate measurement conversions.
Free tier includes 1000 requests per day - perfect for development and small applications
Sign up for free and get your API key instantly
Send HTTP requests to our conversion endpoints
Receive precise conversions in JSON format
Everything you need for professional unit conversion integration
Laboratory-grade accuracy for scientific and engineering applications
Comprehensive coverage of length, weight, temperature, volume, and specialized units
Sub-100ms response times with 99.9% uptime SLA
HTTPS encryption, CORS support, and rate limiting for security
Works with JavaScript, Python, PHP, Java, C#, Ruby, Go, and more
1000 requests per day free - perfect for development and small apps
Complete reference for all available endpoints
https://api.precisionconvert.io/v1
All API requests should be made to this base URL with the appropriate endpoint path.
Include your API key in the request header:
Authorization: Bearer YOUR_API_KEY
Convert a value from one unit to another with 15-decimal precision.
Parameter | Type | Required | Description |
---|---|---|---|
value |
number | Required | The numeric value to convert |
from |
string | Required | Source unit (e.g., "meters", "pounds", "celsius") |
to |
string | Required | Target unit (e.g., "feet", "kilograms", "fahrenheit") |
precision |
integer | Optional | Decimal places (1-15, default: 6) |
curl -X GET "https://api.precisionconvert.io/v1/convert?value=10&from=meters&to=feet&precision=6" \ -H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch('https://api.precisionconvert.io/v1/convert?value=10&from=meters&to=feet&precision=6', { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }); const data = await response.json(); console.log(data);
import requests url = "https://api.precisionconvert.io/v1/convert" params = { "value": 10, "from": "meters", "to": "feet", "precision": 6 } headers = { "Authorization": "Bearer YOUR_API_KEY" } response = requests.get(url, params=params, headers=headers) data = response.json() print(data)
$url = "https://api.precisionconvert.io/v1/convert"; $params = http_build_query([ 'value' => 10, 'from' => 'meters', 'to' => 'feet', 'precision' => 6 ]); $context = stream_context_create([ 'http' => [ 'header' => "Authorization: Bearer YOUR_API_KEY" ] ]); $response = file_get_contents($url . '?' . $params, false, $context); $data = json_decode($response, true); print_r($data);
{ "success": true, "result": { "value": 10, "from": "meters", "to": "feet", "converted_value": 32.808399, "precision": 6, "conversion_factor": 3.280839895013123 }, "timestamp": "2025-01-21T12:00:00Z", "request_id": "req_abc123" }
Get a list of all available units organized by category.
Parameter | Type | Required | Description |
---|---|---|---|
category |
string | Optional | Filter by category (length, weight, temperature, volume, etc.) |
{ "success": true, "units": { "length": [ {"id": "meters", "name": "Meters", "symbol": "m"}, {"id": "feet", "name": "Feet", "symbol": "ft"}, {"id": "inches", "name": "Inches", "symbol": "in"} ], "weight": [ {"id": "kilograms", "name": "Kilograms", "symbol": "kg"}, {"id": "pounds", "name": "Pounds", "symbol": "lbs"} ] } }
Convert multiple values in a single request for improved efficiency.
{ "conversions": [ {"value": 10, "from": "meters", "to": "feet"}, {"value": 25, "from": "celsius", "to": "fahrenheit"}, {"value": 100, "from": "kilograms", "to": "pounds"} ], "precision": 6 }
{ "success": true, "results": [ {"value": 10, "from": "meters", "to": "feet", "converted_value": 32.808399}, {"value": 25, "from": "celsius", "to": "fahrenheit", "converted_value": 77.0}, {"value": 100, "from": "kilograms", "to": "pounds", "converted_value": 220.462262} ], "total_conversions": 3 }
Understanding API error responses and status codes
Status Code | Description | Common Causes |
---|---|---|
200 | Success | Request completed successfully |
400 | Bad Request | Invalid parameters or missing required fields |
401 | Unauthorized | Invalid or missing API key |
429 | Rate Limited | Too many requests - upgrade plan or wait |
500 | Server Error | Internal server error - contact support |
{ "success": false, "error": { "code": "INVALID_UNIT", "message": "The unit 'invalid_unit' is not supported", "details": "Supported units can be found at /v1/units endpoint" }, "timestamp": "2025-01-21T12:00:00Z", "request_id": "req_error123" }
Flexible plans to meet your application's needs
Official libraries to get you started faster
Get help when you need it