Net Carbs Calculator API¶
Estimate net carbohydrates with USA/Canada labeling mode and nutrition-quality guidance.
Endpoint¶
GET /api/v1/net-carbs-calculatorPOST /api/v1/net-carbs-calculator/post
Parameters¶
| Name | Type | Required | In | Description |
|---|---|---|---|---|
total_carbohydrates | number (>=0) | Yes | Query/Body | Total carbohydrates in grams. |
fiber | number (>=0) | Yes | Query/Body | Fiber grams. |
sugar_alcohol | number (>=0) | Yes | Query/Body | Sugar alcohol grams. |
in_usa_ca | string | Yes | Query/Body | yes or no labeling mode. |
lang | string | No | Query | Response language (en,es,de,fr,pt,ja,hi,ar). |
Why Use This Endpoint¶
- Normalize net-carb computation across products.
- Include fiber quality and carb-band signals.
- Support regional labeling differences in a single endpoint.
Request Example¶
curl -X GET "https://api.hefitapi.com/api/v1/net-carbs-calculator?total_carbohydrates=42&fiber=11&sugar_alcohol=8&in_usa_ca=yes&lang=en" \
-H "X-API-Key: YOUR_API_KEY"
curl -X POST "https://api.hefitapi.com/api/v1/net-carbs-calculator/post?lang=en" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{"total_carbohydrates":35,"fiber":12,"sugar_alcohol":6,"in_usa_ca":"yes"}'
Response Example¶
Info
The response example below is for demonstration purposes only. Make a live request to this endpoint to receive the full, real-time, and potentially richer JSON structure.
{
"total_carbohydrates_g": 42.0,
"fiber_g": 11.0,
"sugar_alcohol_g": 8.0,
"in_usa_ca": "yes",
"net_carbs_g": 27.0,
"calories_from_net_carbs_kcal": 108.0,
"carb_band": "moderate",
"carb_band_label": "Moderate",
"fiber_ratio_percent": 26.19,
"labeling_profile": "US/CA net-carb labeling profile.",
"quality_signal": "High-fiber carb profile.",
"action_plan": ["Use moderate-carb meal planning strategy"],
"adjustment_rules": ["Tune carb intake to goal and response"],
"_enterprise": {"client": "Acme Health", "plan": "pro", "request_id": "5a59de745113bf8a", "quota": 120, "usage_tracking": true},
"_api_metadata_": {"endpoint_name": "net_carbs_calculator", "response_language": "en"}
}
Product Positioning¶
Useful for keto/carb-conscious apps, nutrition labels, and consumer tracking products.
Note
All carb inputs must be non-negative.
Recommended Endpoints¶
GET /api/v1/carbs-calculator- Carbs Calculator APIGET /api/v1/6mwt-calculator- 6Mwt Calculator APIGET /api/v1/abi-calculator- Abi Calculator APIGET /api/v1/ava-calculator- Ava Calculator APIGET /api/v1/bri-calculator- Bri Calculator APIGET /api/v1/bsa-calculator- Bsa Calculator API