← Back to API Ninjas
GET/v1/nutrition

Get nutrition information from text

Extracts nutrition data from free-form text, scaling values to any quantities mentioned. Requires `query`. For one food item with an explicit amount use /nutritionitem.

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/nutrition", query: { "query": "example" } }); console.log(output);

Query parameters

queryrequired
string

Query text to extract nutrition information.

    Orthogonal - Giving AI agents the tools they need.