How Allspice parses recipes
How Allspice reads the recipe data on your site, cleans up ingredients, and matches them to its ingredient catalog.
On this page
Overview
When Allspice imports a recipe, it turns the recipe data on your page into structured ingredients and steps. That structure is what grocery lists, meal plans, pantry tracking, substitutions, unit conversions, guided cooking, and search run on.
Recipe cards are written for readers, and the data behind them varies between plugins, themes, older posts, imported recipes, and hand-edited content. Allspice cleans up as much of that as it can automatically. This page explains what it reads, what it fixes, and where consistent formatting on your side helps most.
What we read first
Allspice starts from the page's schema.org Recipe JSON-LD, which most recipe card plugins output automatically. This JSON-LD is required: a page must include it, with ingredients or instructions, to be treated as a recipe. From it we read:
- Recipe title
- Description
- Servings or yield
- Prep time, cook time, and total time
- Primary image
- Ingredients
- Instructions
- Recipe category and cuisine, when provided
- Author name or byline, when provided. It's used to credit you by name, for example in summaries of reader comments.
- Ratings, when available
If some fields are missing or inconsistent, Allspice can fill gaps with the backup methods described below. It cannot recover a recipe from a page with no recipe JSON-LD.
Other inputs
- Reader comments. If your content source is WordPress Direct and Include comments is on, Allspice also reads each recipe's approved comments, including your replies, so the assistant can draw on them. Unapproved and spam comments never leave your site.
- Your own notes and questions. Author notes and suggested questions you add in the Publisher Portal are stored alongside the parsed recipe. See Chat Customization.
The more complete your recipe metadata is, the more reliable Allspice features will be. The backup methods help, but they don't replace well-structured recipes.
Ingredient components
When your recipe card provides them, Allspice reads ingredient components separately instead of treating each ingredient as one string. For example:
- Amount: 1
- Unit: cup
- Name: almond flour
- Notes: packed
Separate components make scaling, grocery lists, pantry matching, and substitutions more accurate.
Component data isn't always right, though. Across large archives we often see:
- The unit at the start of the name
- Package sizes in the name
- The actual ingredient name in the notes
- Parentheses, dashes, or encoding artifacts in the notes
- A missing amount that's implied by the unit
- Ingredients written differently across older posts
Allspice corrects many of these automatically.
Ingredient normalization
After reading the ingredients, Allspice cleans up the components. For example, it will:
- Remove leading words like "about", "scant", or "of" from the start of an ingredient name
- Move known units from the ingredient name into the unit field
- Detect package and container units like can, jar, package, bottle, carton, pouch, bunch, head, clove, stalk, sprig, and stick
- Recognize common units like teaspoon, tablespoon, cup, ounce, pound, gram, milliliter, liter, pinch, dash, handful, splash, and drizzle, plus their abbreviations
- Normalize simple package-size patterns like "15 oz can black beans"
- Remove wrapping parentheses when the entire note is parenthesized
- Repair common encoding issues, such as broken curly quotes or fraction symbols
- Set the amount to 1 for singular units like "pinch" or "dash" when no amount is given
- Pull the amount and unit out of the name when it starts with a simple quantity, such as "1/2 cup buttermilk"
Matching to Allspice ingredients
Once an ingredient is cleaned up, Allspice matches it to an ingredient in its own catalog. That match is what powers:
- Grocery lists
- Meal plans
- Pantry tracking
- Ingredient substitutions
- Unit conversions
- Ingredient search
- Recipe recommendations
For example, "chopped fresh parsley", "fresh parsley, chopped", and "parsley leaves" should all map to the same ingredient so the grocery list and pantry treat them as one item.
Backup parsing flows
When fields in the JSON-LD are missing or look wrong, Allspice can fall back to other methods to recover:
- Missing ingredient lists
- Missing instructions
- Missing images
- Missing timing information
- Recipe text from the visible page
- Recipe data from partially structured HTML
When ingredient components or strings look malformed, an AI cleanup step rewrites the problem lines into a cleaner structure.
Treat these as a safety net. They're less reliable than clean recipe card data and consistent ingredient formatting.
What we can usually correct
Allspice usually handles:
- Simple quantity and unit combinations at the start of an ingredient name
- Common unit abbreviations, with or without periods
- Basic container and package units
- A singular "pinch" or "dash" with no amount
- Notes wrapped entirely in parentheses
- Some misplaced notes or simple component errors
- Some encoding issues from copied or imported recipe text
- Preparation notes like "divided", "optional", "chopped", "minced", and "drained"
Known weaknesses
Some recipe data is hard to interpret reliably even after cleanup:
- Ingredients written as one line with no separable amount, unit, or name
- Ambiguous names ("seasoning blend", "house sauce") with too little context to match
- Rare, regional, or brand-specific products with no close match in the Allspice catalog
- Complex ranges, alternatives, or several "or" options in one ingredient line
- Lines that combine several products or preparation steps
- Recipe information that exists only in images
- Archives that mix recipe plugins, legacy HTML, and imported content
- Recipes that depend heavily on backup parsing, where results vary from recipe to recipe
If you see the same parsing issue across many posts, the fix is usually in the source formatting or recipe card setup, not in the backup methods.
How publishers can help
The most effective fix is consistent recipe data at the source:
- Put each ingredient on its own line
- Use separate amount, unit, name, and notes fields if your recipe card supports them
- Don't put the ingredient name only in the notes field
- Don't combine unrelated ingredients in one line
- Use common units and abbreviations
- Keep package sizes clear and consistent
- Use "divided" when an ingredient is used in more than one step
- Leave out brand names unless the brand matters to the result
- Review older imported recipes for inconsistent formatting
- Tell us when you find the same parsing issue across your site
You can also add context per recipe in the Publisher Portal: open Recipes in the sidebar, choose your domain, and open a recipe to edit its author notes and suggested questions. See Chat Customization.