Food recommender algorithm based on macros?

Does this exist? I want to be able to plug in "protein, 10g, fiber, 4 g, carb limited to 7 g, max fat 3 g, total calorie max X" and have an algorithm spit out food options that are at or +/- 1 gram either way on relevant variables. It would be good if I could exclude foods I dislike from the total possible list, and if favourites, learned over time could be weighted more heavily in later suggestions.