NodeLoop
REST API

KiCad API Documentation

RESTful API endpoints for electronics design calculations. Used by the NodeLoop KiCad plugin and available for custom integrations.

API Overview

Base URL https://nodeloop.org/api/kicad
Format application/json
Authentication None (Public API)
Rate Limit 100 requests/minute

Available Endpoints

POST /track-width
IPC-2221

Calculate PCB track width based on current carrying capacity

Example Request

curl -X POST https://nodeloop.org/api/kicad/track-width \
  -H "Content-Type: application/json" \
  -d '{"current_amps": 2.0, "temp_rise_c": 10, "copper_weight_oz": 1, "layer_type": "external", "trace_length_mm": 50}'

Example Response

{
  "width_mm": 0.4573,
  "width_mils": 18.0,
  "recommended_width_mm": 0.5488,
  "resistance_ohm": 0.012345,
  "voltage_drop_v": 0.02469,
  "power_dissipation_w": 0.04938,
  "ipc_standard": "IPC-2221"
}
POST /via-calculator
IPC-2221

Calculate via current capacity and thermal properties

Example Request

curl -X POST https://nodeloop.org/api/kicad/via-calculator \
  -H "Content-Type: application/json" \
  -d '{"current_amps": 2.0, "via_diameter_mm": 0.6, "drill_diameter_mm": 0.3, "plating_thickness_um": 25, "temp_rise_c": 10, "num_vias": 4}'

Example Response

{
  "max_current_amps": 3.2456,
  "max_current_per_via": 0.8114,
  "safety_margin_percent": 38.35,
  "status": "safe",
  "resistance_ohm": 0.000123,
  "thermal_resistance_c_per_w": 1.2345,
  "ipc_standard": "IPC-2221"
}
POST /crystal-load
Oscillator

Calculate load capacitors for crystal oscillators

Example Request

curl -X POST https://nodeloop.org/api/kicad/crystal-load \
  -H "Content-Type: application/json" \
  -d '{"crystal_load_pf": 18, "stray_capacitance_pf": 5, "mode": "symmetric"}'

Example Response

{
  "c1_ideal_pf": 26.0,
  "c2_ideal_pf": 26.0,
  "c1_recommended_pf": 27,
  "c2_recommended_pf": 27,
  "actual_load_pf": 18.5,
  "load_error_pf": 0.5,
  "load_error_percent": 2.78,
  "status": "optimal"
}

Usage Examples

Python

import requests

url = "https://nodeloop.org/api/kicad/track-width"
data = {
    "current_amps": 3.0,
    "temp_rise_c": 10,
    "copper_weight_oz": 1,
    "layer_type": "external",
    "trace_length_mm": 100
}

response = requests.post(url, json=data)
result = response.json()

print(f"Minimum width: {result['width_mm']} mm")
print(f"Recommended: {result['recommended_width_mm']} mm")

JavaScript (fetch)

const response = await fetch('https://nodeloop.org/api/kicad/track-width', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    current_amps: 2.5,
    temp_rise_c: 10,
    copper_weight_oz: 1,
    layer_type: 'external',
    trace_length_mm: 75
  })
});

const result = await response.json();
console.log(`Minimum width: ${result.width_mm} mm`);
console.log(`Recommended: ${result.recommended_width_mm} mm`);

Best Practices

  • Cache results - API responses include Cache-Control headers (1 hour)
  • Handle errors gracefully - Always check response status and parse error messages
  • Respect rate limits - Maximum 100 requests per minute per IP
  • Use User-Agent - Include your application name in User-Agent header

KiCad Plugin

Ready-to-use plugin that consumes this API

View Plugin

Web Calculator

Try the calculator in your browser

Try Now