Search every recipe source at once
search_recipesSearch all recipe sources at once for a dish or ingredient and get a merged list with per-source results and source IDs for further lookup.
Instructions
Search every recipe source this server reads, at the same time, for a dish or an ingredient, and get one merged list. Each row carries the id get_recipe takes, and that id names the source it came from, so nothing has to be guessed afterwards. The sources are written in different languages and count their own results differently, so 'per_source' says what each one answered, what its own number means, and names any that failed. A short list is never evidence of what exists. Some sources keep recipes and reference pages together, so a row can be a page about an ingredient rather than a recipe using it. Only get_recipe can tell them apart, and it says what it read off the page. The query goes to each source's own search as free text. There is no filtering: a word naming a diet, a time or a calorie count matches only where that source's index happens to carry it. Ask in a whole sentence if that is the question. These indexes answer the words they are handed, so a sentence is also sent as the words naming the dish and as the dish word alone, and the rows are the union; 'per_source' lists every wording and what it returned. What the question says the recipe must not hold is set aside from those shorter wordings rather than searched for, and named back in the notes: a negation, an allergy stated as one, a diet named in one word, and the number of people at the table. No source filters on any of it, so open a row with get_recipe and read the ingredient list before calling it suitable. A condition is read with the food on whichever side of it the sentence put one, so 'allergique aux noix' and 'peanut allergy' both name the nut. Where a sentence puts a food on neither side, the notes say a condition was stated and that its food was not read, because naming the wrong word would hide a dish and search for the food being avoided at once. Rows are interleaved one source at a time rather than ranked, because the sources share no score that could order them against each other.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | A dish or an ingredient, in any of the languages the sources publish in. | |
| fan_out | No | Whether a question may also be sent in shorter wordings derived from it. On, because these indexes answer the words they are handed: a question written as a sentence comes back empty from a corpus holding several of the dish. Turn it off to send exactly the words typed; 'per_source' then names the wordings that were withheld. | |
| sources | No | Sources to ask, by id. Left out, they are all asked, which is the point of this tool. The ids are the ones 'per_source' reports. | |
| limit_per_source | No | Rows to take from each source, so one source cannot fill the whole list. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | Yes | ||
| order | Yes | How the list was built, in words. | |
| query | Yes | ||
| results | Yes | ||
| per_source | Yes | ||
| result_count | Yes | Rows in this answer, across every source. |