Endpoint
GET
/functions/v1/get_decode_foods?decode_food_id=decode_food_...Contract
Send mymolecules-api-version with 2026-07-10 to use the documented response contract.
{
"data": {},
"meta": {
"request_id": "req_...",
"api_version": "2026-07-10"
}
}Headers
Request
x-api-keyrequired - Server-side API key for your integration.mymolecules-api-versionrequired2026-07-10- Use the latest stable API version: 2026-07-10.
Response
x-request-idrequired - Request identifier. Log this value when contacting support.mymolecules-api-versionrequired2026-07-10- The API contract version used for the response.x-ratelimit-limitoptional - Quota limit for the current key and window when quota data is available.x-ratelimit-remainingoptional - Remaining requests in the current quota window when quota data is available.x-ratelimit-resetoptional - ISO timestamp for the current quota window reset when quota data is available.retry-afteroptional - Seconds to wait before retrying when the request is rate-limited or temporarily unavailable.
Inputs
- decode_food_id query parameter
Returns
- The original decode_food_id
- food_ids extracted from the identifier
- Resolved food_names grouped by food_id
Error codes
missing_api_keyinvalid_api_keyscope_not_allowedquota_exceededinvalid_jsoninvalid_requestvalidation_errormethod_not_allowedunsupported_api_versionjob_not_foundbacklog_highupstream_timeoutupstream_errorinternal_error
Request details
- Send decode_food_id as a query parameter.
- decodeFoodId is accepted as a compatibility alias, but decode_food_id is preferred.
- The identifier must be a valid Decode Food ID returned by Decode or Decode Food ID.
Response details
- This is a synchronous GET endpoint.
- items preserves the food_id order from the Decode Food ID.
- A food_id can return an empty food_names array when no public name is available.
Operational notes
- Requires x-api-key with the edge:get_decode_foods scope.
- Usage is counted and rate-limit headers are returned when quota data is available.
- Use this endpoint for lookup and joins, not for molecular analysis.
Examples
Request
GET /functions/v1/get_decode_foods?decode_food_id=decode_food_...Response JSON
{
"data": {
"decode_food_id": "decode_food_...",
"food_ids": ["food_123", "food_456"],
"items": [
{ "food_id": "food_123", "food_names": ["Greek yogurt"] },
{ "food_id": "food_456", "food_names": ["Blueberries"] }
]
},
"meta": {
"request_id": "req_...",
"api_version": "2026-07-10"
}
}Code examples
curl 'https://api.mymolecules.de/functions/v1/get_decode_foods?decode_food_id=decode_food_...' \
-H 'x-api-key: $MYMOLECULES_API_KEY' \
-H 'mymolecules-api-version: 2026-07-10'


