コンテンツにスキップ

タンパク質計算 API

複数のフレームワークで、堅牢な栄養計画のためのタンパク質推奨値を返します。

エンドポイント

  • GET /api/v1/protein-calculator
  • POST /api/v1/protein-calculator/post

パラメータ

名前 必須 クエリ/本文 説明
sex 文字列 はい クエリ/本文 male または female
age 数値 (>0) はい クエリ/本文 年齢(年)。
height 数値 (>0) はい クエリ/本文 高さ(cm)(metric)またはインチ(imperial)。
weight 数値 (>0) はい クエリ/本文 体重(kg)(metric)またはポンド(imperial)。
activity_level 文字列 はい クエリ/本文 sedentarylightly_activemoderately_activevery_activeextra_active
unit 文字列 いいえ クエリ/本文 metric(デフォルト)または imperial
lang 文字列 いいえ クエリ 応答言語(enesdefrptjahiar)。

このエンドポイントを使用する理由

  • 1回の呼び出しで、ベースラインとパフォーマンスに関するタンパク質のガイダンスを組み合わせる。
  • パーソナライズされたマクロエンジンと食事プランをサポートする。
  • UX の明確化のための実装ガイダンスフィールドを返す。

始めましょう

リクエストの例

curl -X GET "https://api.hefitapi.com/api/v1/protein-calculator?sex=male&age=34&height=178&weight=82&activity_level=very_active&unit=metric&lang=en" \
  -H "X-API-Key: YOUR_API_KEY"
curl -X POST "https://api.hefitapi.com/api/v1/protein-calculator/post?lang=en" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{"sex":"female","age":31,"height":66,"weight":148,"activity_level":"moderately_active","unit":"imperial"}'

レスポンスの例

Info

以下のレスポンスの例は、デモンストレーションのみを目的としています。 このエンドポイントに対してライブリクエストを行い、完全かつリアルタイム、そしておそらくより豊富な JSON 構造を取得してください。

{
  "sex": "male",
  "age": 34.0,
  "height_cm": 178.0,
  "weight_kg": 82.0,
  "unit": "metric",
  "activity_level": "very_active",
  "tdee_kcal_per_day": 2949.41,
  "usda_protein_grams_range": [73.74, 221.21],
  "who_protein_grams": 68.06,
  "activity_target_protein_g": 131.2,
  "activity_target_g_per_kg": 1.6,
  "protein_band": "moderate",
  "protein_band_label": "Moderate",
  "distribution_guidance": ["Split protein across 3-5 meals"],
  "action_plan": ["Keep daily protein target consistent"],
  "quality_guardrails": ["Prioritize high-quality protein sources"],
  "_enterprise": {"client": "Acme Health", "plan": "pro", "request_id": "dad775e89ecac88f", "quota": 120, "usage_tracking": true},
  "_api_metadata_": {"endpoint_name": "protein_calculator", "response_language": "en"}
}

製品ポジショニング

栄養製品、コーチングプラットフォーム、および代謝健康アプリ向けの主要なエンドポイント。

備考

年齢、身長、体重は正の数値でなければなりません。

推奨されるエンドポイント