Normalising free-text ingredients, and selling the ranking
Provide some ingredients, get recipe suggestions, pay in bitcoin.
The 402 layer is the family’s. What is specific here is the input, and it is the hardest input in the whole set.
Free-text ingredients are a small, real natural language problem. “2 large onions, chopped” contains a quantity, a size, a preparation and an ingredient in one string, and only the last should reach a lookup. Singular and plural have to collapse. Regional names have to collapse, scallion, spring onion and green onion are one thing, and coriander and cilantro are one thing half the world calls by the other name. None of that is hard individually and all of it has to happen before matching works at all.
Then the matching rule. Exact subset matching, meaning recipes using only what you listed, returns almost nothing, because every real recipe assumes salt and oil and a pan. What people want is a ranked partial match: recipes you can nearly make, ordered by how few things are missing and how substitutable those are.
Which means the ranking is the product. The caller is paying for the ordering, and the ordering is a judgment about which missing ingredient is a dealbreaker. That is what a paid API here is genuinely selling and the part the code did least of.