← Back to API Ninjas
GET/v1/nutritionitem

Get nutrition information for a single food item with a specific quantity

Returns nutrition data for a single food item at a stated amount. Requires `query` and `quantity` such as "1 cup". For free-form text with several foods use /nutrition.

API Ninjas·$0.001 per call

Example code

// Using @orth/sdk - The simplest way to call APIs // Install: npm install @orth/sdk import Orthogonal from "@orth/sdk"; const orthogonal = new Orthogonal({ apiKey: process.env.ORTHOGONAL_API_KEY, }); const output = await orthogonal.run({ api: "api-ninjas", path: "/v1/nutritionitem", query: { "query": "example", "quantity": "example" } }); console.log(output);

Query parameters

queryrequired
string

A single string containing the food item to be queried.

quantityrequired
string

A string indicating the quantity of the item in question. Supports various units of measurements (e.g., "1 cup", "2 lbs", "100g", "2 tbsp").

    Orthogonal - Giving AI agents the tools they need.