Skip to content
merran
GitHubInstall

Merran documentation API & integrations

Add a recipe from a link

POST
/api/recipes/import
curl --request POST \
--url http://localhost:3000/api/recipes/import \
--header 'Content-Type: application/json' \
--cookie merran.session_token=<merran.session_token> \
--data '{ "url": "https://example.com/lemon-chicken" }'

Reads the recipe data most recipe sites put in their pages, and its photo. A page without it is read by AI, when the household has AI for importing; otherwise it can’t be imported. A link the household imported before gives back that recipe, unless force is set. A TikTok, YouTube, Instagram or Facebook link is imported from its video (its captions, or what’s said in it, read by AI), when the server has video import on. It waits about 10 seconds for the recipe; a link that takes longer, and any video, goes on in the background and answers 202 with its import, on the Imports page. With an API key, it needs the recipes: write permission.

Media typeapplication/json
object
url
required
string
>= 1 characters <= 2000 characters
force

Import it again even if the household has it.

boolean

Example

{
"url": "https://example.com/lemon-chicken"
}

Already in the library.

Media typeapplication/json
object
recipe
required
object
id
required
string
slug
required
string
name
required
string
description
required
string | null
servings
required
number | null
totalMinutes
required

As given, or prep and cook added up.

number | null
rating
required
number | null
tags
required
Array<string>
diets
required

Diet labels worked out from the ingredients, with the household’s corrections.

Array<string>
Allowed values: vegetarian vegan gluten-free dairy-free egg-free nut-free
photo
required

Where its photo is, in each size, or null. The links change with the photo, so they can be kept.

object
full
required

For the recipe page.

string
card
required

Cropped, for recipe cards.

string
thumb
required

A small square, for small tiles.

string
lastMadeAt
required
string | null format: date-time
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
origin
required
string
Allowed values: link video text photo manual assistant mealie paprika merran
photoByAi
required

Its photo was made by AI, in the household’s style. Making another replaces it; a real one always does.

boolean
sourceUrl
required
string | null
yieldText
required
string | null
prepMinutes
required
number | null
cookMinutes
required
number | null
notes
required
string | null
dietOverrides
required

Where the household corrected the labels the ingredients suggest.

object
vegetarian
boolean
vegan
boolean
gluten-free
boolean
dairy-free
boolean
egg-free
boolean
nut-free
boolean
needs
required

Foods the household said it can’t do without: a dislike that’s usually left out of recipes rules this one out instead.

Array<string>
nutrition
required

Per serving, when it’s known.

object
source
required

From the recipe’s site, worked out from USDA’s data, or estimated by AI.

string
Allowed values: site calculated estimate
calories

Kcal.

number
protein

Grams.

number
carbs

Grams.

number
fat

Grams.

number
fiber

Grams.

number
sugar

Grams.

number
sodium

Milligrams.

number
missing

Ingredient lines that couldn’t be counted.

Array<string>
servings

The servings it’s for; it rescales when they change.

number
working
required

What Merran is doing for it in the background: working out its nutrition, making its photo.

Array<string>
Allowed values: nutrition photo
ingredients
required
Array<object>
object
id
required
string
section
required
string | null
text
required

The line as written.

string
quantity
required
number | null
quantityMax
required
number | null
unit
required
string | null
food
required
string | null
note
required
string | null
mark
required

What it is to the dish, as tidy up marked it: needed, swappable or optional. A dislike is left out of lines that aren’t needed. None until marked.

string | null
Allowed values: needed swappable optional
steps
required
Array<object>
object
id
required
string
section
required
string | null
text
required
string
duplicate
required

True when the link was imported before: this is that recipe, unchanged.

boolean

Example

{
"recipe": {
"id": "0199e8b0-5a10-7a01-8b00-000000000006",
"slug": "lemon-chicken",
"name": "Lemon Chicken",
"description": "Crisp chicken thighs roasted with lemon, garlic and thyme.",
"servings": 4,
"totalMinutes": 50,
"rating": 5,
"tags": [
"chicken",
"dinner"
],
"diets": [
"gluten-free",
"dairy-free",
"egg-free",
"nut-free"
],
"photo": {
"full": "/api/recipes/0199e8b0-5a10-7a01-8b00-000000000006/photo?size=full&v=4b1c2d3e",
"card": "/api/recipes/0199e8b0-5a10-7a01-8b00-000000000006/photo?size=card&v=4b1c2d3e",
"thumb": "/api/recipes/0199e8b0-5a10-7a01-8b00-000000000006/photo?size=thumb&v=4b1c2d3e"
},
"lastMadeAt": "2026-10-09T01:15:00.000Z",
"createdAt": "2026-10-01T17:30:00.000Z",
"updatedAt": "2026-10-15T18:30:00.000Z",
"origin": "link",
"photoByAi": false,
"sourceUrl": "https://example.com/lemon-chicken",
"yieldText": null,
"prepMinutes": 10,
"cookMinutes": 40,
"notes": "Bone-in thighs work too: give them 10 minutes more.",
"dietOverrides": {},
"needs": [],
"working": [],
"nutrition": {
"source": "calculated",
"calories": 412,
"protein": 31.5,
"carbs": 6.2,
"fat": 28.1,
"fiber": 1.4,
"sugar": 1.2,
"sodium": 640,
"missing": [],
"servings": 4
},
"ingredients": [
{
"id": "0199e8b0-5a10-7a01-8b00-000000000011",
"section": null,
"text": "2 lb chicken thighs",
"quantity": 2,
"quantityMax": null,
"unit": "pound",
"food": "chicken thighs",
"note": null,
"mark": "needed"
},
{
"id": "0199e8b0-5a10-7a01-8b00-000000000012",
"section": null,
"text": "1 tbsp olive oil",
"quantity": 1,
"quantityMax": null,
"unit": "tablespoon",
"food": "olive oil",
"note": null,
"mark": "optional"
},
{
"id": "0199e8b0-5a10-7a01-8b00-000000000013",
"section": null,
"text": "2 lemons, juiced",
"quantity": 2,
"quantityMax": null,
"unit": null,
"food": "lemons",
"note": "juiced",
"mark": "needed"
},
{
"id": "0199e8b0-5a10-7a01-8b00-000000000014",
"section": null,
"text": "4 cloves garlic, smashed",
"quantity": 4,
"quantityMax": null,
"unit": "clove",
"food": "garlic",
"note": "smashed",
"mark": "swappable"
}
],
"steps": [
{
"id": "0199e8b0-5a10-7a01-8b00-000000000015",
"section": null,
"text": "Heat the oven to 425°F."
},
{
"id": "0199e8b0-5a10-7a01-8b00-000000000016",
"section": null,
"text": "Toss the chicken with the oil, lemon juice, garlic, salt and pepper."
},
{
"id": "0199e8b0-5a10-7a01-8b00-000000000017",
"section": null,
"text": "Roast skin side up for 40 minutes, until crisp."
}
]
},
"duplicate": false
}

Added.

Media typeapplication/json
object
recipe
required
object
id
required
string
slug
required
string
name
required
string
description
required
string | null
servings
required
number | null
totalMinutes
required

As given, or prep and cook added up.

number | null
rating
required
number | null
tags
required
Array<string>
diets
required

Diet labels worked out from the ingredients, with the household’s corrections.

Array<string>
Allowed values: vegetarian vegan gluten-free dairy-free egg-free nut-free
photo
required

Where its photo is, in each size, or null. The links change with the photo, so they can be kept.

object
full
required

For the recipe page.

string
card
required

Cropped, for recipe cards.

string
thumb
required

A small square, for small tiles.

string
lastMadeAt
required
string | null format: date-time
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
origin
required
string
Allowed values: link video text photo manual assistant mealie paprika merran
photoByAi
required

Its photo was made by AI, in the household’s style. Making another replaces it; a real one always does.

boolean
sourceUrl
required
string | null
yieldText
required
string | null
prepMinutes
required
number | null
cookMinutes
required
number | null
notes
required
string | null
dietOverrides
required

Where the household corrected the labels the ingredients suggest.

object
vegetarian
boolean
vegan
boolean
gluten-free
boolean
dairy-free
boolean
egg-free
boolean
nut-free
boolean
needs
required

Foods the household said it can’t do without: a dislike that’s usually left out of recipes rules this one out instead.

Array<string>
nutrition
required

Per serving, when it’s known.

object
source
required

From the recipe’s site, worked out from USDA’s data, or estimated by AI.

string
Allowed values: site calculated estimate
calories

Kcal.

number
protein

Grams.

number
carbs

Grams.

number
fat

Grams.

number
fiber

Grams.

number
sugar

Grams.

number
sodium

Milligrams.

number
missing

Ingredient lines that couldn’t be counted.

Array<string>
servings

The servings it’s for; it rescales when they change.

number
working
required

What Merran is doing for it in the background: working out its nutrition, making its photo.

Array<string>
Allowed values: nutrition photo
ingredients
required
Array<object>
object
id
required
string
section
required
string | null
text
required

The line as written.

string
quantity
required
number | null
quantityMax
required
number | null
unit
required
string | null
food
required
string | null
note
required
string | null
mark
required

What it is to the dish, as tidy up marked it: needed, swappable or optional. A dislike is left out of lines that aren’t needed. None until marked.

string | null
Allowed values: needed swappable optional
steps
required
Array<object>
object
id
required
string
section
required
string | null
text
required
string
duplicate
required

True when the link was imported before: this is that recipe, unchanged.

boolean

Example

{
"recipe": {
"id": "0199e8b0-5a10-7a01-8b00-000000000006",
"slug": "lemon-chicken",
"name": "Lemon Chicken",
"description": "Crisp chicken thighs roasted with lemon, garlic and thyme.",
"servings": 4,
"totalMinutes": 50,
"rating": 5,
"tags": [
"chicken",
"dinner"
],
"diets": [
"gluten-free",
"dairy-free",
"egg-free",
"nut-free"
],
"photo": {
"full": "/api/recipes/0199e8b0-5a10-7a01-8b00-000000000006/photo?size=full&v=4b1c2d3e",
"card": "/api/recipes/0199e8b0-5a10-7a01-8b00-000000000006/photo?size=card&v=4b1c2d3e",
"thumb": "/api/recipes/0199e8b0-5a10-7a01-8b00-000000000006/photo?size=thumb&v=4b1c2d3e"
},
"lastMadeAt": "2026-10-09T01:15:00.000Z",
"createdAt": "2026-10-01T17:30:00.000Z",
"updatedAt": "2026-10-15T18:30:00.000Z",
"origin": "link",
"photoByAi": false,
"sourceUrl": "https://example.com/lemon-chicken",
"yieldText": null,
"prepMinutes": 10,
"cookMinutes": 40,
"notes": "Bone-in thighs work too: give them 10 minutes more.",
"dietOverrides": {},
"needs": [],
"working": [],
"nutrition": {
"source": "calculated",
"calories": 412,
"protein": 31.5,
"carbs": 6.2,
"fat": 28.1,
"fiber": 1.4,
"sugar": 1.2,
"sodium": 640,
"missing": [],
"servings": 4
},
"ingredients": [
{
"id": "0199e8b0-5a10-7a01-8b00-000000000011",
"section": null,
"text": "2 lb chicken thighs",
"quantity": 2,
"quantityMax": null,
"unit": "pound",
"food": "chicken thighs",
"note": null,
"mark": "needed"
},
{
"id": "0199e8b0-5a10-7a01-8b00-000000000012",
"section": null,
"text": "1 tbsp olive oil",
"quantity": 1,
"quantityMax": null,
"unit": "tablespoon",
"food": "olive oil",
"note": null,
"mark": "optional"
},
{
"id": "0199e8b0-5a10-7a01-8b00-000000000013",
"section": null,
"text": "2 lemons, juiced",
"quantity": 2,
"quantityMax": null,
"unit": null,
"food": "lemons",
"note": "juiced",
"mark": "needed"
},
{
"id": "0199e8b0-5a10-7a01-8b00-000000000014",
"section": null,
"text": "4 cloves garlic, smashed",
"quantity": 4,
"quantityMax": null,
"unit": "clove",
"food": "garlic",
"note": "smashed",
"mark": "swappable"
}
],
"steps": [
{
"id": "0199e8b0-5a10-7a01-8b00-000000000015",
"section": null,
"text": "Heat the oven to 425°F."
},
{
"id": "0199e8b0-5a10-7a01-8b00-000000000016",
"section": null,
"text": "Toss the chicken with the oil, lemon juice, garlic, salt and pepper."
},
{
"id": "0199e8b0-5a10-7a01-8b00-000000000017",
"section": null,
"text": "Roast skin side up for 40 minutes, until crisp."
}
]
},
"duplicate": false
}

Going on in the background.

Media typeapplication/json
object
import
required
object
id
required
string
kind
required

What brought recipes in: one link or a video that went on in the background, several links, a starter collection, Mealie, Paprika or a Merran export.

string
Allowed values: link video links collection mealie paprika merran
source
required

What it was: the link, Mealie’s address or the collection’s name. None for several links or a file.

string | null
tag
required

Added to every recipe it brought in, like “to try”.

string | null
listed
required

Whether the Imports page lists it. A single link is listed only once it goes on in the background; one that came in while someone waited isn’t.

boolean
status
required

How it’s going or went. Undone once Undo moved what it brought in to Recently deleted.

string
Allowed values: queued running done failed cancelled undone
total
required

How many links or recipes it has, once it knows.

integer
done
required

How many it’s dealt with: “Importing 12 of 52”.

integer
added
required
integer
already
required

Already in the household’s recipes, so not added again.

integer
failed
required

Didn’t come in.

integer
undone
required

How many recipes Undo moved to Recently deleted: fewer than came in when some were kept or deleted already. 0 when it isn’t undone.

integer
stopped
required

Never got to, once it was stopped or failed.

integer
error
required

Why the whole import stopped, when it failed.

string | null
startedBy
required

Who started it; none for Merran.

object
id
required
string
name
required
string
createdAt
required
string format: date-time
finishedAt
required
string | null format: date-time
undoneAt
required
string | null format: date-time

Example

{
"import": {
"id": "01a1e0f0-e739-758e-85c2-c9e3cd06ff15",
"kind": "link",
"source": "https://example.com/lemon-chicken",
"tag": null,
"listed": true,
"status": "running",
"total": 1,
"done": 0,
"added": 0,
"already": 0,
"failed": 0,
"undone": 0,
"stopped": 0,
"error": null,
"startedBy": {
"id": "01a1e0f0-e730-7501-bbce-f5e6ead7106d",
"name": "Kyle"
},
"createdAt": "2026-11-15T18:02:11.000Z",
"finishedAt": null,
"undoneAt": null
}
}

Not a link Merran can fetch.

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."
}
}
}

The page has no recipe data and no AI to read it, AI found no recipe on it, or it’s a video and this server can’t import videos.

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."
}
}
}

This month’s AI limit is reached.

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."
}
}
}

The site couldn’t be reached, or turned Merran away.

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.