488 ketogenic recipes with ingredients, steps, prep and cook times, and macros. Host: keto-diet.p.rapidapi.com.
X-RapidAPI-Key.curl --request GET "https://keto-diet.p.rapidapi.com/" \
--header "X-RapidAPI-Key: <your key>" \
--header "X-RapidAPI-Host: keto-diet.p.rapidapi.com"
The response is a JSON array of recipes (id, recipe, category, prep_time_in_minutes, cook_time_in_minutes, difficulty, serving, ingredient_1, measurement_1, directions_step_1, ...).
| Endpoint | Description |
|---|---|
GET / |
List recipes, with the search and filters below |
GET /categories/ |
List recipe categories (id, category, thumbnail) |
All parameters are optional and can be combined.
| Param | Meaning |
|---|---|
search |
Case-insensitive match on the recipe name |
id |
Exact recipe id |
category |
Category id, from /categories/ |
difficulty |
Exact difficulty, for example Easy |
calories__lt, calories__gt |
Less than / greater than |
fat_in_grams__lt, fat_in_grams__gt |
Same, for fat |
carbohydrates_in_grams__lt, carbohydrates_in_grams__gt |
Same, for carbs |
protein_in_grams__lt, protein_in_grams__gt |
Same, for protein |
prep_time_in_minutes__lt, prep_time_in_minutes__gt |
Same, for prep time |
cook_time_in_minutes__lt, cook_time_in_minutes__gt |
Same, for cook time |
Example: easy recipes under 500 calories and 10 g of carbs that mention "chicken".
curl --request GET "https://keto-diet.p.rapidapi.com/?search=chicken&difficulty=Easy&calories__lt=500&carbohydrates_in_grams__lt=10" \
--header "X-RapidAPI-Key: <your key>" \
--header "X-RapidAPI-Host: keto-diet.p.rapidapi.com"
This API does not paginate. GET / returns every recipe that matches your filters in one array, so narrow the result with the filters above.
Each sample runs the "chicken under 500 calories" search.
curl --request GET "https://keto-diet.p.rapidapi.com/?search=chicken&calories__lt=500" \
--header "X-RapidAPI-Key: <your key>" \
--header "X-RapidAPI-Host: keto-diet.p.rapidapi.com"
import requests
resp = requests.get(
"https://keto-diet.p.rapidapi.com/",
headers={
"X-RapidAPI-Key": "<your key>",
"X-RapidAPI-Host": "keto-diet.p.rapidapi.com",
},
params={"search": "chicken", "calories__lt": 500},
)
resp.raise_for_status()
for recipe in resp.json():
print(recipe["recipe"])
const params = new URLSearchParams({ search: "chicken", calories__lt: "500" });
const res = await fetch(`https://keto-diet.p.rapidapi.com/?${params}`, {
headers: {
"X-RapidAPI-Key": "<your key>",
"X-RapidAPI-Host": "keto-diet.p.rapidapi.com",
},
});
const recipes = await res.json();
recipes.forEach((r) => console.log(r.recipe));
import Foundation
var components = URLComponents(string: "https://keto-diet.p.rapidapi.com/")!
components.queryItems = [
URLQueryItem(name: "search", value: "chicken"),
URLQueryItem(name: "calories__lt", value: "500"),
]
var request = URLRequest(url: components.url!)
request.setValue("<your key>", forHTTPHeaderField: "X-RapidAPI-Key")
request.setValue("keto-diet.p.rapidapi.com", forHTTPHeaderField: "X-RapidAPI-Host")
let (data, _) = try await URLSession.shared.data(for: request)
print(String(data: data, encoding: .utf8) ?? "")
import okhttp3.OkHttpClient
import okhttp3.Request
val client = OkHttpClient()
val request = Request.Builder()
.url("https://keto-diet.p.rapidapi.com/?search=chicken&calories__lt=500")
.addHeader("X-RapidAPI-Key", "<your key>")
.addHeader("X-RapidAPI-Host", "keto-diet.p.rapidapi.com")
.build()
client.newCall(request).execute().use { response ->
println(response.body?.string())
}
import 'package:http/http.dart' as http;
Future<void> main() async {
final uri = Uri.https('keto-diet.p.rapidapi.com', '/', {
'search': 'chicken',
'calories__lt': '500',
});
final response = await http.get(uri, headers: {
'X-RapidAPI-Key': '<your key>',
'X-RapidAPI-Host': 'keto-diet.p.rapidapi.com',
});
print(response.body);
}