Resolve ingredient names
Turn ingredient names as people write them, such as "fresh cilantro" or "heavy cream", into the canonical ids the filters and /ingredients/:id take.
/ingredients/resolveAPI keyTurns ingredient names, as a recipe or a person writes them, into canonical ids. A name first matches an id, or any spelling seen in any language, the most used ingredient winning a tie, so "heavy cream" and "vispgrädde" both find "double-cream". A name that matches nothing falls back to the food it is a kind or a part of: "fresh cilantro" finds "cilantro" and "boneless chicken thighs" finds "chicken-thigh". Words that name another food are never dropped, so "sweet potato" does not become "potato". A name with no match comes back in `unknown`.
Request
curl 'https://api.tinyplates.dev/ingredients/resolve?names=fresh+cilantro%2Cheavy+cream' \
-H 'Authorization: Bearer rd_your_api_key'Sign in to run this request with your own key. Free, 50 requests a day and 300 a week.
Parameters
namesstringrequiredThe names to resolve: 1 to 20 comma-separated names or ids, each at most 80 characters. Case and spaces normalize to slugs. Required.
Response
ingredients[]object[]
ingredients[]object[]idstringThe canonical id, such as "double-cream".
namestringThe canonical English name.
querystringThe name as it was sent, normalized.
One entry per name that resolved, in the order sent.
unknownstring[]The names, normalized, that matched no ingredient.
Example
{
"ingredients": [
{
"id": "cilantro",
"name": "cilantro",
"query": "fresh-cilantro"
},
{
"id": "double-cream",
"name": "double cream",
"query": "heavy-cream"
}
],
"unknown": [
"unicorn-dust"
]
}Errors
- 400
The "names" parameter is required. Send the ingredient names to resolve, such as "fresh cilantro,heavy cream".
A parameter was not a value the API accepts. The message names the parameter, the value it was given and where the allowed values are listed.
- 401
An API key is required. Pass it as an Authorization: Bearer header.
No key was sent. Every endpoint except the root, /health, /docs and /openapi.json requires one.
- 401
Invalid API key.
The key does not exist. Check for a truncated copy, or create a new one on your dashboard.
- 401
This API key has been disabled.
The key was revoked. Create a new one on your dashboard.
- 401
This API key has expired.
The key was created with an expiry that has passed. Create a new one.
- 429
Daily allowance of 50 requests used. It resets at midnight UTC. Paid plans include more; see https://www.tinyplates.dev/pricing.
The account has used its 50 requests for the day. The allowance is per account, so another key will not help. It resets at midnight UTC.
- 429
Weekly allowance of 300 requests used. It covers the last 7 days. Paid plans include more; see https://www.tinyplates.dev/pricing.
The account has used its 300 requests over the last 7 days, today included. The allowance is per account, so another key will not help. Room comes back as older days drop out of the window.
- 429
Daily limit of 5,000 requests on the Personal plan reached. It resets at midnight UTC. Contact us for a higher limit.
The account has used its plan's limit for the day. The message names the number and the plan, which differ between accounts. The limit is per account, so another key will not help. It resets at midnight UTC.
- 429
Weekly limit of 30,000 requests on the Business plan reached. It covers the last 7 days. Contact us for a higher limit.
The account has used the weekly limit set on it over the last 7 days, today included. The message names the number and the plan. Only accounts with a weekly limit can see this. Room comes back as older days drop out of the window.
- 500
Something went wrong. Please try again.
The API could not answer. The request was not your fault; retry it, and report it if it keeps happening.
See also