Skip to content
merran
GitHubInstall

Merran documentation API & integrations

Find new recipes online

POST
/api/discover
curl --request POST \
--url http://localhost:3000/api/discover \
--header 'Content-Type: application/json' \
--cookie merran.session_token=<merran.session_token> \
--data '{ "theme": "cozy fall soups" }'

Answers at once with matches from the shelf of recipes Merran reads for a theme (“cozy fall soups”), and carries on in the background: the household’s model for finding recipes, which must be able to search the web, finds more that suit the household, and Merran opens each page and saves the recipes it can import as each opens. Follow it at GET /discover/{discoveryId} or by the live job event; stop it at POST /discover/{discoveryId}/stop; add more at POST /discover/{discoveryId}/more. One search at a time for a household. With an API key, it needs the recipes: write permission.

Media typeapplication/json
object
theme
required
string
>= 2 characters <= 200 characters

Example

{
"theme": "cozy fall soups"
}

Searching.

Media typeapplication/json
object
id
required
string
theme
required
string
collection
required

The starter collection it found more for (POST /collections/{collection}/find), or null.

string | null
status
required

Still searching, done, stopped (someone stopped it, keeping what it found), or failed (error says why).

string
Allowed values: searching done stopped failed
error
required
string | null
progress
required

Pages opened of those found online, while they open. Null otherwise.

object
done
required
number
total
required
number
recipes
required

For each round, up to 4 from the shelf of recipes Merran reads, then up to 8 from the web: each a page Merran opened and can import, no more than two from a site unless there aren’t others.

Array<object>
object
url
required

The recipe’s page, to import at POST /recipes/import.

string
name
required
string
site
required
string
minutes
required
number | null
photo
required

A small copy kept by Merran, a shelf recipe’s photo (GET /sites/recipes/{recipe}/photo), or, for a search from before November 25, 2026, the site’s own link. Null when it has none.

string | null
why
required

Why it’s a good pick.

string
createdAt
required
string format: date-time
updatedAt
required
string format: date-time

Example

{
"id": "0199e8b0-5a10-7a01-8b00-00000000002d",
"theme": "cozy fall soups",
"collection": null,
"status": "done",
"error": null,
"progress": null,
"recipes": [
{
"url": "https://cooking.example/butternut-squash-soup",
"name": "Roasted Butternut Squash Soup",
"site": "cooking.example",
"minutes": 60,
"photo": "/api/discover/0199e8b0-5a10-7a01-8b00-00000000002d/photos/a1b2c3d4e5f60718293a4b5c",
"why": "Vegetarian and freezes well, with the squash roasted for depth."
}
],
"createdAt": "2026-10-01T17:30:00.000Z",
"updatedAt": "2026-10-01T17:30:00.000Z"
}

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

A search is going already.

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.