Recipes is a simple tool for getting recipe information. It returns information on various recipes. To use this API, you need an API key. You can get one by creating a free account and visiting your dashboard.
Important: Ensure that this API is enabled from within your dashboard to use it in your application. If not, you may receive a 403
error
This is a required header
on every request. Your API Key is found from within your dashboard
This is an optional header
. Set the value to application/json
, application/xml
, or application/yaml
string
(required)The name of the recipe to get information about
Sample Request
import requests
url = "https://api.apiverve.com/v1/recipe"
querystring = {'name': 'chicken fajitas'}
headers = {
"x-api-key": "YOUR_API_KEY"
}
response = requests.get(url, headers=headers, params=querystring)
print(response.json())
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://api.apiverve.com/v1/recipe?name=chicken fajitas"),
Headers =
{
{ "x-api-key", "YOUR_API_KEY" }
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', 'https://api.apiverve.com/v1/recipe?name=chicken fajitas');
xhr.setRequestHeader('x-api-key', 'YOUR_API_KEY');
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.setRequestHeader('Accept', 'application/json');
xhr.send(data);
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.apiverve.com/v1/recipe?name=chicken fajitas',
headers: {
'x-api-key': 'YOUR_API_KEY'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apiverve.com/v1/recipe?name=chicken fajitas"))
.header("x-api-key", "YOUR_API_KEY")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
import Foundation
let headers = [
"x-api-key": "YOUR_API_KEY"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://api.apiverve.com/v1/recipe?name=chicken fajitas")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
curl --request GET \
--url 'https://api.apiverve.com/v1/recipe?name=chicken fajitas' \
--header 'x-api-key: YOUR_API_KEY'
Sample Response
{
"status": "ok",
"error": null,
"data": {
"count": 1,
"recipes": [
{
"instructions": "Heat the oil in a large, non-stick frying pan or wok and stir-fry the chicken and peppers for 2 mins. Sprinkle over the spices and cook for 30 secs more, stirring. Tip the tomatoes into the pan and stir in the chipotle paste. Simmer for 5 mins or until the sauce is thick and glossy, stirring regularly. Stir in the spring onions and coriander, cook for 1 min more, then remove from the heat and leave to cool. Cut the tortillas into quarters, then cut each quarter into three pieces, so you have 36 triangles. Place 1 tsp of the chicken mixture and a little cheese at the widest end of a triangle. Roll the pointed end of the triangle around the filling and secure with a cocktail stick. Place on a baking tray lined with baking parchment. Fill and roll the other triangles. Cover with cling film and chill for up to 8 hrs until ready to reheat. To make the dip, mash all the ingredients in a bowl until almost smooth. Cover the surface of the dip with cling film and chill for up to 24 hrs. When ready to serve, heat oven to 200C/180C fan/gas 6. Uncover the fajitas and bake for 6-8 mins or until hot throughout. Serve with the guacamole.",
"name": "Mini Chicken Fajitas",
"ingredients": [
"2 tbsp sunflower oil",
"2 skinless chicken breasts, cut into 1½ cm/½ in chunks",
"1 red pepper, deseeded and cut into 1½ cm/½ in chunks",
"1 yellow pepper, deseeded and cut into 1½ cm/½ in chunks",
"1 tsp ground cumin",
"1 tsp ground coriander",
"¼ tsp hot chilli powder",
"227g can chopped tomatoes",
"2 tbsp chipotle paste",
"4 spring onions, trimmed and thinly sliced",
"large pack coriander, leaves chopped",
"3 large flour tortillas",
"75g ready-grated mozzarella",
"1 ripe avocado, stoned and peeled",
"juice 1 large lime",
"1 garlic clove, crushed",
"2 heaped tbsp finely chopped coriander",
"36 cocktail sticks"
]
}
]
},
"code": 200
}
<Root>
<status>ok</status>
<error />
<data>
<count>1</count>
<recipes>
<instructions>Heat the oil in a large, non-stick frying pan or wok and stir-fry the chicken and peppers for 2 mins. Sprinkle over the spices and cook for 30 secs more, stirring. Tip the tomatoes into the pan and stir in the chipotle paste. Simmer for 5 mins or until the sauce is thick and glossy, stirring regularly. Stir in the spring onions and coriander, cook for 1 min more, then remove from the heat and leave to cool. Cut the tortillas into quarters, then cut each quarter into three pieces, so you have 36 triangles. Place 1 tsp of the chicken mixture and a little cheese at the widest end of a triangle. Roll the pointed end of the triangle around the filling and secure with a cocktail stick. Place on a baking tray lined with baking parchment. Fill and roll the other triangles. Cover with cling film and chill for up to 8 hrs until ready to reheat. To make the dip, mash all the ingredients in a bowl until almost smooth. Cover the surface of the dip with cling film and chill for up to 24 hrs. When ready to serve, heat oven to 200C/180C fan/gas 6. Uncover the fajitas and bake for 6-8 mins or until hot throughout. Serve with the guacamole.</instructions>
<name>Mini Chicken Fajitas</name>
<ingredients>2 tbsp sunflower oil</ingredients>
<ingredients>2 skinless chicken breasts, cut into 1½ cm/½ in chunks</ingredients>
<ingredients>1 red pepper, deseeded and cut into 1½ cm/½ in chunks</ingredients>
<ingredients>1 yellow pepper, deseeded and cut into 1½ cm/½ in chunks</ingredients>
<ingredients>1 tsp ground cumin</ingredients>
<ingredients>1 tsp ground coriander</ingredients>
<ingredients>¼ tsp hot chilli powder</ingredients>
<ingredients>227g can chopped tomatoes</ingredients>
<ingredients>2 tbsp chipotle paste</ingredients>
<ingredients>4 spring onions, trimmed and thinly sliced</ingredients>
<ingredients>large pack coriander, leaves chopped</ingredients>
<ingredients>3 large flour tortillas</ingredients>
<ingredients>75g ready-grated mozzarella</ingredients>
<ingredients>1 ripe avocado, stoned and peeled</ingredients>
<ingredients>juice 1 large lime</ingredients>
<ingredients>1 garlic clove, crushed</ingredients>
<ingredients>2 heaped tbsp finely chopped coriander</ingredients>
<ingredients>36 cocktail sticks</ingredients>
</recipes>
</data>
<code>200</code>
</Root>
status: ok
error:
data:
count: 1
recipes:
- instructions: Heat the oil in a large, non-stick frying pan or wok and stir-fry the chicken and peppers for 2 mins. Sprinkle over the spices and cook for 30 secs more, stirring. Tip the tomatoes into the pan and stir in the chipotle paste. Simmer for 5 mins or until the sauce is thick and glossy, stirring regularly. Stir in the spring onions and coriander, cook for 1 min more, then remove from the heat and leave to cool. Cut the tortillas into quarters, then cut each quarter into three pieces, so you have 36 triangles. Place 1 tsp of the chicken mixture and a little cheese at the widest end of a triangle. Roll the pointed end of the triangle around the filling and secure with a cocktail stick. Place on a baking tray lined with baking parchment. Fill and roll the other triangles. Cover with cling film and chill for up to 8 hrs until ready to reheat. To make the dip, mash all the ingredients in a bowl until almost smooth. Cover the surface of the dip with cling film and chill for up to 24 hrs. When ready to serve, heat oven to 200C/180C fan/gas 6. Uncover the fajitas and bake for 6-8 mins or until hot throughout. Serve with the guacamole.
name: Mini Chicken Fajitas
ingredients:
- 2 tbsp sunflower oil
- 2 skinless chicken breasts, cut into 1½ cm/½ in chunks
- 1 red pepper, deseeded and cut into 1½ cm/½ in chunks
- 1 yellow pepper, deseeded and cut into 1½ cm/½ in chunks
- 1 tsp ground cumin
- 1 tsp ground coriander
- ¼ tsp hot chilli powder
- 227g can chopped tomatoes
- 2 tbsp chipotle paste
- 4 spring onions, trimmed and thinly sliced
- large pack coriander, leaves chopped
- 3 large flour tortillas
- 75g ready-grated mozzarella
- 1 ripe avocado, stoned and peeled
- juice 1 large lime
- 1 garlic clove, crushed
- 2 heaped tbsp finely chopped coriander
- 36 cocktail sticks
code: 200
The Recipes API supports the following response content types:
application/json
, application/xml
, application/yaml
You can specify the response content type by setting the Accept
header in your request. If you don't specify a content type, the API will default to application/json
.
The Recipes API uses an API Key to authenticate requests. You can view and manage your API key by visiting your dashboard.
Your API keys carry many privileges. To keep them from being abused, please do not share the keys on client-side code or Github etc. Keep them very secure.
To use any API, you must have it enabled from within your dashboard. Disabled APIs will fail to respond to your requests.
All requests made to the API must contain the header x-api-key
in each of your requests. API requests without authentication will fail.
All API requests must also be made over secure HTTPS
. Requests made over plain HTTP
will fail.
Error Code | Meaning |
---|---|
401 | Your request was made with invalid credentials. This error also appears when you don't pass the x-api-key header in your request.
|
403 | Typically, this occurs when you are trying to access an API that you have not enabled. |
{
"status": "error",
"data": null,
"error": "tokens have been depleted",
"code": 429
}
Each subscription has its own monthly token limit. Your token count is based on your subscription plan. If you reach your limits, don't worry. You can always upgrade or downgrade at any time.
When you reach your limit, the service will stop responding and typically return an HTTP 429
response status code. The error will also contain a detailed JSON.
The Recipes API uses the following error code:
Error Code | Meaning |
---|---|
429 | You have exceeded your rate limit and further requests will be denied until the next cycle. |
For reference, the Recipes API uses the following error codes:
Error Code | Meaning |
---|---|
Code | Message |
200 | The request was successful. The response will include the requested data. |
400 | The request was invalid. The response will include a message that explains the error. |
401 | The request was not authorized. Usually, this means that the API key is missing or invalid. |
403 | This means that the request was trying to access a resource that it does not have permission to access. |
404 | This means that the resource you are trying to access does not exist. |
429 | This means that you have reached the rate limit. The response will include a Retry-After header that indicates how many seconds you need to wait before making a new request. |
500 | This means that there was an error on the server side. We are alerted when this happens and we will work to fix it as soon as possible. |