Merran documentation API & integrations
Work out nutrition for the library
POST
/api/recipes/nutrition
const url = 'http://localhost:3000/api/recipes/nutrition';const options = { method: 'POST', headers: {cookie: 'merran.session_token=<merran.session_token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3000/api/recipes/nutrition \ --cookie merran.session_token=<merran.session_token>Every recipe with servings and ingredients but no nutrition, in the background, two at a time: from USDA’s data when the server has a key, else estimated by AI. USDA’s hourly limit pauses it rather than ending it. One at a time: starting another gives back the one going. With an API key, it needs the recipes: write permission.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Started.
Media typeapplication/json
The latest run, going or finished in the last day.
object
id
required
string
status
required
string
total
required
integer
done
required
integer
workedOut
required
integer
failed
required
integer
stopped
required
Why it stopped before the end, when it did.
string | null
startedAt
required
string | null format: date-time
finishedAt
required
string | null format: date-time
Example
{ "id": "0199e8b0-5a10-7a01-8b00-00000000002f", "status": "running", "total": 42, "done": 12, "workedOut": 11, "failed": 1, "stopped": null, "startedAt": "2026-10-15T18:30:00.000Z", "finishedAt": null}Every recipe with servings has its nutrition.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
fields
object
key
additional properties
string
Example
{ "error": { "code": "not_found", "message": "There's nothing here.", "fields": { "name": "Give it a name." } }}Not signed in.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
fields
object
key
additional properties
string
Example
{ "error": { "code": "not_found", "message": "There's nothing here.", "fields": { "name": "Give it a name." } }}Not allowed.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
fields
object
key
additional properties
string
Example
{ "error": { "code": "not_found", "message": "There's nothing here.", "fields": { "name": "Give it a name." } }}No USDA key on the server, and no AI for the household.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
fields
object
key
additional properties
string
Example
{ "error": { "code": "not_found", "message": "There's nothing here.", "fields": { "name": "Give it a name." } }}© 2026 Kyle Johnson. Documentation: CC BY 4.0. Merran: AGPL-3.0-or-later.