Ingredients
List Ingredients
GET /api/v1/ingredients
Returns a paginated list of ingredients. Supports search and filtering by category.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
lang | string | PaidResponse language (en, fr, es). Defaults to en. |
search | string | Search ingredients by name (case-insensitive). Searches in the requested language with English fallback. |
category | string | Filter by category |
per_page | integer | Items per page (default: 10, max depends on your plan) |
page | integer | Page number (default: 1) |
Category Values
vegetable, fruit, meat, poultry, fish, seafood, dairy, egg, grain, legume, herb, spice, oil,
condiment, sweetener, nut, beverage, other
Example Request
- cURL
- JavaScript
- Python
- PHP
- Ruby
- Go
curl "https://recipeapi.io/api/v1/ingredients?category=vegetable&per_page=5" \
-H "Authorization: Bearer sk_live_..."
const API_KEY = "sk_live_...";
const response = await fetch(
"https://recipeapi.io/api/v1/ingredients?category=vegetable&per_page=5",
{headers: {"Authorization": `Bearer ${API_KEY}`}}
);
const data = await response.json();
console.log(data);
import requests
API_KEY = "sk_live_..."
response = requests.get(
"https://recipeapi.io/api/v1/ingredients",
params={"category": "vegetable", "per_page": 5},
headers={"Authorization": f"Bearer {API_KEY}"}
)
data = response.json()
print(data)
// composer require guzzlehttp/guzzle
const API_KEY = 'sk_live_...';
$client = new GuzzleHttp\Client();
$response = $client->get('https://recipeapi.io/api/v1/ingredients', [
'query' => ['category' => 'vegetable', 'per_page' => 5],
'headers' => ['Authorization' => 'Bearer ' . API_KEY],
]);
$data = json_decode($response->getBody(), true);
require "net/http"
require "json"
API_KEY = "sk_live_..."
uri = URI("https://recipeapi.io/api/v1/ingredients?category=vegetable&per_page=5")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer #{API_KEY}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http|
http.request(req)
}
data = JSON.parse(res.body)
puts data
package main
import (
"fmt"
"io"
"net/http"
)
const apiKey = "sk_live_..."
func main() {
req, _ := http.NewRequest("GET",
"https://recipeapi.io/api/v1/ingredients?category=vegetable&per_page=5", nil)
req.Header.Set("Authorization", "Bearer "+apiKey)
resp, _ := http.DefaultClient.Do(req)
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
Example Response
{
"data": [
{
"id": 799,
"name": "Dark chocolate",
"category": "dairy"
},
{
"id": 6,
"name": "Salt",
"category": "condiment"
},
{
"id": 10,
"name": "Tomato",
"category": "fruit"
}
],
"links": {
"first": "https://recipeapi.io/api/v1/ingredients?page=1&per_page=3",
"last": "https://recipeapi.io/api/v1/ingredients?page=10&per_page=3",
"prev": null,
"next": "https://recipeapi.io/api/v1/ingredients?page=2&per_page=3"
},
"meta": {
"current_page": 1,
"last_page": 10,
"path": "https://recipeapi.io/api/v1/ingredients",
"per_page": 3,
"total": 30,
"language": "en"
}
}
Localization
Ingredient names are translatable. Use the lang parameter to get translated names:
curl "https://recipeapi.io/api/v1/ingredients?lang=fr&search=tomate" \
-H "Authorization: Bearer sk_live_..."
{
"data": [
{
"id": 10,
"name": "Tomate",
"category": "fruit"
}
],
"links": {
"first": "https://recipeapi.io/api/v1/ingredients?lang=fr&page=1",
"last": "https://recipeapi.io/api/v1/ingredients?lang=fr&page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"last_page": 1,
"path": "https://recipeapi.io/api/v1/ingredients",
"per_page": 10,
"total": 1,
"language": "fr"
}
}
Paid feature
Languages other than English require a paid plan. Free plan users who pass lang
with a value other than en will receive a 402 error with code
PLAN_FEATURE_UNAVAILABLE. Upgrade to unlock translations →
Get Ingredient
GET /api/v1/ingredients/{id}
Returns a single ingredient.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | integer | Ingredient ID |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
lang | string | PaidResponse language (en, fr, es). Defaults to en. |
Example Request
- cURL
- JavaScript
- Python
- PHP
- Ruby
- Go
curl "https://recipeapi.io/api/v1/ingredients/10" \
-H "Authorization: Bearer sk_live_..."
const API_KEY = "sk_live_...";
const response = await fetch(
"https://recipeapi.io/api/v1/ingredients/10",
{headers: {"Authorization": `Bearer ${API_KEY}`}}
);
const data = await response.json();
console.log(data);
import requests
API_KEY = "sk_live_..."
response = requests.get(
"https://recipeapi.io/api/v1/ingredients/10",
headers={"Authorization": f"Bearer {API_KEY}"}
)
data = response.json()
print(data)
// composer require guzzlehttp/guzzle
const API_KEY = 'sk_live_...';
$client = new GuzzleHttp\Client();
$response = $client->get('https://recipeapi.io/api/v1/ingredients/10', [
'headers' => ['Authorization' => 'Bearer ' . API_KEY],
]);
$data = json_decode($response->getBody(), true);
require "net/http"
require "json"
API_KEY = "sk_live_..."
uri = URI("https://recipeapi.io/api/v1/ingredients/10")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer #{API_KEY}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http|
http.request(req)
}
data = JSON.parse(res.body)
puts data
package main
import (
"fmt"
"io"
"net/http"
)
const apiKey = "sk_live_..."
func main() {
req, _ := http.NewRequest("GET",
"https://recipeapi.io/api/v1/ingredients/10", nil)
req.Header.Set("Authorization", "Bearer "+apiKey)
resp, _ := http.DefaultClient.Do(req)
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
Example Response
{
"data": {
"id": 10,
"name": "Tomato",
"category": "fruit"
},
"meta": {
"language": "en"
}
}
Error Response (404)
{
"error": {
"code": "NOT_FOUND",
"message": "The requested resource was not found."
}
}