Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Nutritionix Natural Language API

Translate plain-text food and exercise phrases into structured nutrition data.

Nutritionix Natural Language API is one of 4 APIs that Nutritionix publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 30 JSON Schema definitions.

Tagged areas include Natural Language. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an API reference, authentication docs, and 30 JSON Schemas.

This API exposes 2 operations across 2 paths, and defines 10 schemas. It is described by OpenAPI 3.0.3, at version 2.0.

Requests are made against a single base URL, https://trackapi.nutritionix.com/v2.

2 operations 2 paths 10 schemas 2 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.3
API Version
2.0
Base URL
https://trackapi.nutritionix.com/v2
Authentication
API Key, API Key
Resource Areas
1

Authentication & Security 2

Nutritionix Natural Language API declares 2 security schemes for authenticating requests. An API key is passed in the header as x-app-id (AppId). An API key is passed in the header as x-app-key (AppKey). By default, every request must be authenticated.

  • AppId — Your Nutritionix application identifier.
  • AppKey — Your Nutritionix application key.

Paths & Operations 2

Across 2 paths, the API surfaces 2 operations — 2 POST. Each is listed below with its method, path, parameters, and response codes.

Natural Language 2

Translate plain-text food and exercise phrases into structured nutrition data.

POST
/natural/nutrients
Nutritionix Analyze Natural Language Nutrients
getNaturalNutrients body → 200401404
POST
/natural/exercise
Nutritionix Analyze Natural Language Exercise
getNaturalExercise body → 200401

Schemas 10

The contract defines 10 schemas that model the data the API accepts and returns. The most detailed are Food (27 properties), NaturalNutrientsRequest (10 properties), Exercise (9 properties), NaturalExerciseRequest (5 properties). Each schema is shown below with its type and property counts.

Food
object
A fully detailed food object with complete nutrient information.
27 properties
NaturalNutrientsResponse
object
Response from the natural language nutrients endpoint.
1 property
Error
object
Standard error response.
2 properties
Photo
object
Image URLs associated with a food or exercise.
3 properties
NaturalExerciseResponse
object
Response from the natural language exercise endpoint.
1 property
Exercise
object
A single analyzed physical activity.
9 properties
FullNutrient
object
A nutrient value identified by its USDA attribute id.
2 properties
NaturalExerciseRequest
object
Request body for the natural language exercise endpoint.
5 properties 1 required
AltMeasure
object
An alternative serving measure for a food.
4 properties
NaturalNutrientsRequest
object
Request body for the natural language nutrients endpoint.
10 properties 1 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

nutritionix-natural-language-api-openapi.yml Raw ↑

Other APIs Nutritionix publishes across the network.

Nutritionix Brands API
Nutritionix Item API
Nutritionix Search API