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

Media typeapplication/json
object
data
object
brand
string
gtin
string
is_solid
boolean
name
string
processed_variants
Array<object>
object
big7
object
carbohydrates
object
amount
number
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
energy
object
amount
number
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
fat
object
amount
number
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
protein
object
amount
number
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
salt
object
amount
number
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
saturated_fatty_acids
object
amount
number
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
sugar
object
amount
number
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
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
Example
{
"data": {
"processed_variants": [
{
"big7": {
"carbohydrates": {
"amount": 225.5,
"unit": "g"
},
"energy": {
"amount": 225.5,
"unit": "g"
},
"fat": {
"amount": 225.5,
"unit": "g"
},
"protein": {
"amount": 225.5,
"unit": "g"
},
"salt": {
"amount": 225.5,
"unit": "g"
},
"saturated_fatty_acids": {
"amount": 225.5,
"unit": "g"
},
"sugar": {
"amount": 225.5,
"unit": "g"
}
},
"processing": "raw"
}
],
"type": "generic_single_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

Media typeapplication/json
object
error
object
code
string
details
message
string
Examplegenerated
{
"error": {
"code": "example",
"details": "example",
"message": "example"
}
}

Unauthorized

Media typeapplication/json
object
error
object
code
string
details
message
string
Examplegenerated
{
"error": {
"code": "example",
"details": "example",
"message": "example"
}
}

Rate limit exceeded

Media typeapplication/json
object
error
object
code
string
details
message
string
Examplegenerated
{
"error": {
"code": "example",
"details": "example",
"message": "example"
}
}
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

Media typeapplication/json
object
error
object
code
string
details
message
string
Examplegenerated
{
"error": {
"code": "example",
"details": "example",
"message": "example"
}
}