spoonacular API
spoonacular · Social
The spoonacular Nutrition, Recipe, and Food API allows you to access over thousands of recipes, thousands of ingredients, 800,000 food products, over 100,000 menu items, and restaurants. Our food ontology and semantic recipe search engine makes it possible to search for recipes using natural language queries, such as "gluten free brownies without sugar" or "low fat vegan cupcakes." You can automatically calculate the nutritional information for any recipe, analyze recipe costs, visualize ingredi
Authentication
Sample Requests
This endpoint can be used to have a conversation about food with the spoonacular chatbot. Use the "Get Conversation Suggests" endpoint to show your user what he or she can say.
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/spoonacular.com/1.1/food/converse?text=donut%20recipes&contextId=342938"
import requests
params = {
"text": "donut recipes",
"contextId": "342938"
}
response = requests.get(
"https://api.apis.guru/v2/specs/spoonacular.com/1.1/food/converse",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/spoonacular.com/1.1/food/converse');
url.searchParams.set('text', 'donut recipes');
url.searchParams.set('contextId', '342938');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/spoonacular.com/1.1/food/converse")
q := baseURL.Query()
q.Set("text", "donut recipes")
q.Set("contextId", "342938")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/spoonacular.com/1.1/food/converse")
uri.query = URI.encode_www_form({
"text" => "donut recipes",
"contextId" => "342938"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/spoonacular.com/1.1/food/converse?" . http_build_query([
"text" => "donut recipes",
"contextId" => "342938"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Search all food content with one call. That includes recipes, grocery products, menu items, simple foods (ingredients), and food videos.
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/spoonacular.com/1.1/food/search?query=apple&number=10&offset=0"
import requests
params = {
"query": "apple",
"number": "10",
"offset": "0"
}
response = requests.get(
"https://api.apis.guru/v2/specs/spoonacular.com/1.1/food/search",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/spoonacular.com/1.1/food/search');
url.searchParams.set('query', 'apple');
url.searchParams.set('number', '10');
url.searchParams.set('offset', '0');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/spoonacular.com/1.1/food/search")
q := baseURL.Query()
q.Set("query", "apple")
q.Set("number", "10")
q.Set("offset", "0")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/spoonacular.com/1.1/food/search")
uri.query = URI.encode_www_form({
"query" => "apple",
"number" => "10",
"offset" => "0"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/spoonacular.com/1.1/food/search?" . http_build_query([
"query" => "apple",
"number" => "10",
"offset" => "0"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Generate a meal plan with three meals per day (breakfast, lunch, and dinner).
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/spoonacular.com/1.1/mealplanner/generate?diet=vegetarian&exclude=shellfish%2C%20olives&timeFrame=day&targetCalories=2000"
import requests
params = {
"diet": "vegetarian",
"exclude": "shellfish, olives",
"timeFrame": "day",
"targetCalories": "2000"
}
response = requests.get(
"https://api.apis.guru/v2/specs/spoonacular.com/1.1/mealplanner/generate",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/spoonacular.com/1.1/mealplanner/generate');
url.searchParams.set('diet', 'vegetarian');
url.searchParams.set('exclude', 'shellfish, olives');
url.searchParams.set('timeFrame', 'day');
url.searchParams.set('targetCalories', '2000');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/spoonacular.com/1.1/mealplanner/generate")
q := baseURL.Query()
q.Set("diet", "vegetarian")
q.Set("exclude", "shellfish, olives")
q.Set("timeFrame", "day")
q.Set("targetCalories", "2000")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/spoonacular.com/1.1/mealplanner/generate")
uri.query = URI.encode_www_form({
"diet" => "vegetarian",
"exclude" => "shellfish, olives",
"timeFrame" => "day",
"targetCalories" => "2000"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/spoonacular.com/1.1/mealplanner/generate?" . http_build_query([
"diet" => "vegetarian",
"exclude" => "shellfish, olives",
"timeFrame" => "day",
"targetCalories" => "2000"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- See official documentation for authentication and setup.
What can you build with spoonacular API?
spoonacular API is a Social API. Developers commonly use social APIs for:
- adding social login (Sign in with Google/Twitter)
- fetching user-generated content for analysis
- scheduling and publishing social posts
- tracking mentions and engagement metrics
- building community dashboards
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. spoonacular API is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide · Learn about API keys · What is REST?