Skip to content

Search for Food by GTIN

GET
/search/gtin

Searches for a singular food item based on a gtin string. Nutrient units are fixed per nutrient. See unit reference: https://newtrition-data.com/data-reference/units/

gtin
required
string

Gtin number for the food item search

X-Context-ID
string

Context ID of the end user (used for analytics and weighting). If not provided, defaults to client ID.

Matching food item

object
data
object
brand
string
gtin
string
is_solid
boolean
name
string
processed_variants
Array<object>
object
big7
object
carbohydrates
object
amount
number
Example
225.5
unit

The output units are fixed per nutrient/output! See: https://newtrition-data.com/data-reference/units/

string
Allowed values: µg mg g kg kJ ml l kJ/g kcal/g
Example
g
energy
object
amount
number
Example
225.5
unit

The output units are fixed per nutrient/output! See: https://newtrition-data.com/data-reference/units/

string
Allowed values: µg mg g kg kJ ml l kJ/g kcal/g
Example
g
fat
object
amount
number
Example
225.5
unit

The output units are fixed per nutrient/output! See: https://newtrition-data.com/data-reference/units/

string
Allowed values: µg mg g kg kJ ml l kJ/g kcal/g
Example
g
protein
object
amount
number
Example
225.5
unit

The output units are fixed per nutrient/output! See: https://newtrition-data.com/data-reference/units/

string
Allowed values: µg mg g kg kJ ml l kJ/g kcal/g
Example
g
salt
object
amount
number
Example
225.5
unit

The output units are fixed per nutrient/output! See: https://newtrition-data.com/data-reference/units/

string
Allowed values: µg mg g kg kJ ml l kJ/g kcal/g
Example
g
saturated_fatty_acids
object
amount
number
Example
225.5
unit

The output units are fixed per nutrient/output! See: https://newtrition-data.com/data-reference/units/

string
Allowed values: µg mg g kg kJ ml l kJ/g kcal/g
Example
g
sugar
object
amount
number
Example
225.5
unit

The output units are fixed per nutrient/output! See: https://newtrition-data.com/data-reference/units/

string
Allowed values: µg mg g kg kJ ml l kJ/g kcal/g
Example
g
id
string
processing
string
Allowed values: raw baked boiled braised broiled deep-fried dried fried roasted steamed stewed
quantity_unit
string
quantity_value
number
search_weight
number
type
string
Allowed values: generic_single_food generic_composite_food branded_food
X-RateLimit-Limit
integer

Maximum requests per minute

X-RateLimit-Remaining
integer

Requests remaining in current window

X-RateLimit-Reset
integer

Unix timestamp when rate limit resets

X-RateLimit-Used
integer

Requests used in current window

Missing gtin query parameter, invalid gtin format

object
error
object
code
string
details
message
string

Unauthorized

object
error
object
code
string
details
message
string

Rate limit exceeded

object
error
object
code
string
details
message
string
X-RateLimit-Limit
integer

Maximum requests per minute

X-RateLimit-Remaining
integer

Requests remaining in current window

X-RateLimit-Reset
integer

Unix timestamp when rate limit resets

X-RateLimit-Used
integer

Requests used in current window

X-Retry-After
integer

Seconds to wait before retrying

Internal Server Error

object
error
object
code
string
details
message
string