/v1/convert
Nearest AWG for area/diameter
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
curl "https://api.oanor.com/awg-api/v1/convert" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/awg-api/v1/convert", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/awg-api/v1/convert");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/awg-api/v1/convert",
headers={"x-oanor-key": "oanor_test_..."}
)
Exemple de réponse
Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.
{
"data": {
"note": "Nearest standard AWG to the given size. exact_awg is the non-integer gauge that matches exactly.",
"input": {
"target_diameter_mm": 2.5879
},
"nearest": {
"awg": "10",
"area_mm2": 5.2612,
"area_kcmil": 10.383,
"diameter_mm": 2.5882,
"diameter_inch": 0.1019,
"diameter_mils": 101.9,
"area_circular_mils": 10383,
"typical_ampacity_a": 30,
"resistance_ohm_per_km_copper": 3.2768,
"resistance_ohm_per_km_aluminum": 5.0369,
"resistance_ohm_per_1000ft_copper": 0.9988
},
"exact_awg": 10.001,
"nearest_awg": "10"
},
"meta": {
"timestamp": "2026-06-04T01:59:21.014Z",
"request_id": "fbfb403b-2f4d-4759-9e41-02303d028174"
},
"status": "ok",
"message": "Area/diameter to AWG",
"success": true
}