Skip to content
Skip to Content
Docs
Studio

Extract Ingredient Lines

Splits a raw pasted ingredient blob into individual ingredient lines. Stateless — no Version is committed and the recipe is not modified, and extraction itself is not billed. Each returned line is ready to send as an add_ingredient item text to startIngredientResolution. Use this when a user pastes a block of ingredients that may not be separated by line breaks.

POST
/studio/recipes/{recipe_id}/ingredient-extractions

Path Parameters

recipe_id*Recipe Id

Request Body

application/json
  1. body

Raw pasted ingredient text to split into individual lines.

raw_text*Raw Text

Raw pasted ingredient text — possibly multiple ingredients on one line with no separators, or bulleted/numbered. Split into one line per ingredient.

Length1 <= length <= 5000

Response Body

Successful Response

application/json
  1. response

Response envelope for the ingredient-extraction endpoint.

data*

The split ingredient lines, ready to feed startIngredientResolution.

meta*

Response metadata.

Example Request
curl -X POST 'https://api.bettermenu.live/studio/recipes/string/ingredient-extractions' \  -H 'Content-Type: application/json' \  -d '{  "raw_text": "1 cup flour 2 eggs 1 tsp salt, garlic minced"}'
Example Response
{  "data": {    "lines": [      "string"    ],    "count": 0,    "resolution_cost_preview": {      "units": 0,      "included_remaining": 0,      "over_included": true,      "estimated_overage_cents": "string",      "is_trialing": true    }  },  "meta": {    "version": "string",    "request_id": "string",    "timestamp": "string"  }}

Recipe in, FDA-format Nutrition Facts out, with every version kept.

Start freeNo card needed.