All URIs are relative to https://chompthis.com/api/v2
Method | HTTP request | Description |
---|---|---|
FoodBrandedBarcodePhpGet | GET /food/branded/barcode.php | Get a branded food item using a barcode |
FoodBrandedNamePhpGet | GET /food/branded/name.php | Get a branded food item by name |
FoodBrandedSearchPhpGet | GET /food/branded/search.php | Get data for branded food items using various search parameters |
FoodIngredientSearchPhpGet | GET /food/ingredient/search.php | Get raw/generic food ingredient item(s) |
RecipeIdPhpGet | GET /recipe/id.php | Get a recipe by ID |
RecipeIngredientPhpGet | GET /recipe/ingredient.php | Get recipes using a list of ingredients |
RecipeRandomPhpGet | GET /recipe/random.php | Get random popular recipes |
RecipeSearchPhpGet | GET /recipe/search.php | Get recipes using a title and optional filters |
BrandedFoodObject FoodBrandedBarcodePhpGet (string code, string userId = null)
Get a branded food item using a barcode
Get data for a branded food using the food's UPC/EAN barcode. You must have a Food API key to use this endpoint. Get a Food API key. Example > https://chompthis.com/api/v2/food/branded/barcode.php?api_key=API_KEY&code=CODE
Tips * Read our Knowledge Base article for helpful tips and tricks. * Perform a check-digit on the barcode you are using. * Use a barcode from our website ChompThis.com. Search for a food and use the barcode shown in the search results. * It is possible that our database contains the food you're looking for, but does not have the same barcode you are using. This can happen if a manufacturer introduces a variation of the same food, or the barcode you got was from a 2 oz bag of chips when our database has the food packaged in a 4 oz bag. * Contact us if you are having trouble.
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class FoodBrandedBarcodePhpGetExample
{
public void main()
{
// Configure API key authorization: ApiKeyAuth
Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");
var apiInstance = new DefaultApi();
var code = code_example; // string | #### UPC/EAN barcode **Example** > ```&code=0842234000988```
var userId = userId_example; // string | #### **Only required for Premium subscribers.** The unique identifier assigned to each user on your platform. This can be any string of letters or numbers and doesn't have to relate to your own database. [Learn more](https://desk.zoho.com/portal/chompthis/en/kb/articles/monthly-active-users) **Example** > ```&user_id=fehef8w4ha``` (optional)
try
{
// Get a branded food item using a barcode
BrandedFoodObject result = apiInstance.FoodBrandedBarcodePhpGet(code, userId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.FoodBrandedBarcodePhpGet: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
code | string | #### UPC/EAN barcode Example > ```&code=0842234000988``` | |
userId | string | #### Only required for Premium subscribers. The unique identifier assigned to each user on your platform. This can be any string of letters or numbers and doesn't have to relate to your own database. Learn more Example > ```&user_id=fehef8w4ha``` | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BrandedFoodObject FoodBrandedNamePhpGet (string name, int? limit = null, int? page = null, string userId = null)
Get a branded food item by name
Search for branded food items by name. You must have a Food API key to use this endpoint. Get a Food API key. Example > https://chompthis.com/api/v2/food/branded/name.php?api_key=API_KEY&name=NAME
Tips * Get started by using our food lookup tool. > This API endpoint is only available to Standard and Premium API subscribers. Please consider upgrading your subscription if you are subscribed to the Limited plan. Read this if you aren't sure how to upgrade your subscription.
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class FoodBrandedNamePhpGetExample
{
public void main()
{
// Configure API key authorization: ApiKeyAuth
Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");
var apiInstance = new DefaultApi();
var name = name_example; // string | #### Search for branded food items using a general food name keyword. This does not have to exactly match the \"official\" name for the food. **Example** > ```&name=Starburst```
var limit = 56; // int? | #### Set maximum number of records you want the API to return. The default value is \"**10**.\" **Example** > ```&limit=10``` (optional)
var page = 56; // int? | #### This is how you paginate the search result. By default, you will see the first 10 records. You must increment the page number to access the next 10 records, and so on. The default value is \"**1**.\" **Example** > ```&page=1``` (optional)
var userId = userId_example; // string | #### **Only required for Premium subscribers.** The unique identifier assigned to each user on your platform. This can be any string of letters or numbers and doesn't have to relate to your own database. [Learn more](https://desk.zoho.com/portal/chompthis/en/kb/articles/monthly-active-users) **Example** > ```&user_id=fehef8w4ha``` (optional)
try
{
// Get a branded food item by name
BrandedFoodObject result = apiInstance.FoodBrandedNamePhpGet(name, limit, page, userId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.FoodBrandedNamePhpGet: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
name | string | #### Search for branded food items using a general food name keyword. This does not have to exactly match the "official" name for the food. Example > ```&name=Starburst``` | |
limit | int? | #### Set maximum number of records you want the API to return. The default value is "10." Example > ```&limit=10``` | [optional] |
page | int? | #### This is how you paginate the search result. By default, you will see the first 10 records. You must increment the page number to access the next 10 records, and so on. The default value is "1." Example > ```&page=1``` | [optional] |
userId | string | #### Only required for Premium subscribers. The unique identifier assigned to each user on your platform. This can be any string of letters or numbers and doesn't have to relate to your own database. Learn more Example > ```&user_id=fehef8w4ha``` | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BrandedFoodObject FoodBrandedSearchPhpGet (string allergen = null, string brand = null, string category = null, string country = null, string diet = null, string ingredient = null, string keyword = null, string mineral = null, string nutrient = null, string palmOil = null, string trace = null, string vitamin = null, int? limit = null, int? page = null, string userId = null)
Get data for branded food items using various search parameters
Search for branded food items using various parameters. You must have a Food API key to use this endpoint. Get a Food API key. Example > https://chompthis.com/api/v2/food/branded/search.php?api_key=API_KEY&brand=BRAND&country=COUNTRY&page=1
Tips * Get started by using the Query Builder. > This API endpoint is only available to Standard and Premium API subscribers. Please consider upgrading your subscription if you are subscribed to the Limited plan. Read this if you aren't sure how to upgrade your subscription.
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class FoodBrandedSearchPhpGetExample
{
public void main()
{
// Configure API key authorization: ApiKeyAuth
Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");
var apiInstance = new DefaultApi();
var allergen = allergen_example; // string | #### Filter the search to only include branded foods that contain a specific allergen. **Example** > ```&allergen=Peanuts``` **Important Note**: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. (optional)
var brand = brand_example; // string | #### Filter the search to only include branded foods that are owned by a specific brand. **Example** > ```&brand=Starbucks``` (optional)
var category = category_example; // string | #### Filter the search to only include branded foods from a specific category. **Example** > ```&category=Plant Based Foods``` (optional)
var country = country_example; // string | #### Filter the search to only include branded foods that are sold in a specific country. **Example** > ```&country=United States``` **Important Note**: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. (optional)
var diet = diet_example; // string | #### Filter the search to only include branded foods that are considered compatible with a specific diet. **Important Note**: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. (optional)
var ingredient = ingredient_example; // string | #### Filter the search to only include branded foods that contain a specific ingredient. **Example** > ```&ingredient=Salt``` (optional)
var keyword = keyword_example; // string | #### Filter the search to only include branded foods that are associated with a specific keyword. **Example** > ```&keyword=Organic``` **Important Note**: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. (optional)
var mineral = mineral_example; // string | #### Filter the search to only include branded foods that contain a specific mineral. **Example** > ```&mineral=Potassium``` (optional)
var nutrient = nutrient_example; // string | #### Filter the search to only include branded foods that contain a specific nutrient. **Example** > ```&nutrient=Caffeine``` **Important Note**: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. (optional)
var palmOil = palmOil_example; // string | #### Filter the search to only include branded foods that contain a specific ingredient made using palm oil. **Example** > ```&palm_oil=E160a Beta Carotene``` (optional)
var trace = trace_example; // string | ### Filter the search to only include branded foods that contain a specific trace ingredient. **Example** > ```&trace=Tree Nuts``` **Important Note**: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. (optional)
var vitamin = vitamin_example; // string | #### Filter the search to only include branded foods that contain a specific vitamin. **Example** > ```&vitamin=Biotin``` (optional)
var limit = 56; // int? | #### Set maximum number of records you want the API to return. The default value is \"**10**.\" **Example** > ```&limit=10``` (optional)
var page = 56; // int? | #### This is how you paginate the search result. By default, you will see the first 10 records. You must increment the page number to access the next 10 records, and so on. The default value is \"**1**.\" **Example** > ```&page=1``` (optional)
var userId = userId_example; // string | #### **Only required for Premium subscribers.** The unique identifier assigned to each user on your platform. This can be any string of letters or numbers and doesn't have to relate to your own database. [Learn more](https://desk.zoho.com/portal/chompthis/en/kb/articles/monthly-active-users) **Example** > ```&user_id=fehef8w4ha``` (optional)
try
{
// Get data for branded food items using various search parameters
BrandedFoodObject result = apiInstance.FoodBrandedSearchPhpGet(allergen, brand, category, country, diet, ingredient, keyword, mineral, nutrient, palmOil, trace, vitamin, limit, page, userId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.FoodBrandedSearchPhpGet: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
allergen | string | #### Filter the search to only include branded foods that contain a specific allergen. Example > ```&allergen=Peanuts``` Important Note: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. | [optional] |
brand | string | #### Filter the search to only include branded foods that are owned by a specific brand. Example > ```&brand=Starbucks``` | [optional] |
category | string | #### Filter the search to only include branded foods from a specific category. Example > ```&category=Plant Based Foods``` | [optional] |
country | string | #### Filter the search to only include branded foods that are sold in a specific country. Example > ```&country=United States``` Important Note: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. | [optional] |
diet | string | #### Filter the search to only include branded foods that are considered compatible with a specific diet. Important Note: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. | [optional] |
ingredient | string | #### Filter the search to only include branded foods that contain a specific ingredient. Example > ```&ingredient=Salt``` | [optional] |
keyword | string | #### Filter the search to only include branded foods that are associated with a specific keyword. Example > ```&keyword=Organic``` Important Note: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. | [optional] |
mineral | string | #### Filter the search to only include branded foods that contain a specific mineral. Example > ```&mineral=Potassium``` | [optional] |
nutrient | string | #### Filter the search to only include branded foods that contain a specific nutrient. Example > ```&nutrient=Caffeine``` Important Note: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. | [optional] |
palmOil | string | #### Filter the search to only include branded foods that contain a specific ingredient made using palm oil. Example > ```&palm_oil=E160a Beta Carotene``` | [optional] |
trace | string | ### Filter the search to only include branded foods that contain a specific trace ingredient. Example > ```&trace=Tree Nuts``` Important Note: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. | [optional] |
vitamin | string | #### Filter the search to only include branded foods that contain a specific vitamin. Example > ```&vitamin=Biotin``` | [optional] |
limit | int? | #### Set maximum number of records you want the API to return. The default value is "10." Example > ```&limit=10``` | [optional] |
page | int? | #### This is how you paginate the search result. By default, you will see the first 10 records. You must increment the page number to access the next 10 records, and so on. The default value is "1." Example > ```&page=1``` | [optional] |
userId | string | #### Only required for Premium subscribers. The unique identifier assigned to each user on your platform. This can be any string of letters or numbers and doesn't have to relate to your own database. Learn more Example > ```&user_id=fehef8w4ha``` | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IngredientObject FoodIngredientSearchPhpGet (string find, int? limit = null, string userId = null)
Get raw/generic food ingredient item(s)
Get data for a specific ingredient or a specific set of ingredients. You must have a Food API key to use this endpoint. Get a Food API key. Example #1: Single Ingredient > https://chompthis.com/api/v2/food/ingredient/search.php?api_key=API_KEY&find=raw broccoli
Example #2: Set of Ingredients > https://chompthis.com/api/v2/food/ingredient/search.php?api_key=API_KEY&find=raw broccoli,mashed potatoes,chicken drumstick
Tips * Expose ingredient endpoints by using our food lookup tool. > This API endpoint is only available to Standard and Premium API subscribers. Please consider upgrading your subscription if you are subscribed to the Limited plan. Read this if you aren't sure how to upgrade your subscription.
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class FoodIngredientSearchPhpGetExample
{
public void main()
{
// Configure API key authorization: ApiKeyAuth
Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");
var apiInstance = new DefaultApi();
var find = find_example; // string | Search our database for a single ingredient or a specific set of ingredients. **Example #1: Single Ingredient** > ```&find=raw broccoli``` **Example #2: Set of Ingredients** > ```&find=raw broccoli,buttermilk waffle,mashed potatoes``` **Important Notes** * Comma-separated lists cannot contain more than **10 ingredients**. You must perform additional API calls if you are looking up more than 10 ingredients.
var limit = 56; // int? | #### Set maximum number of records you want the API to return, per search term. The default value is \"**1**.\" **Example** > ```&limit=3``` (optional)
var userId = userId_example; // string | #### **Only required for Premium subscribers.** The unique identifier assigned to each user on your platform. This can be any string of letters or numbers and doesn't have to relate to your own database. [Learn more](https://desk.zoho.com/portal/chompthis/en/kb/articles/monthly-active-users) **Example** > ```&user_id=fehef8w4ha``` (optional)
try
{
// Get raw/generic food ingredient item(s)
IngredientObject result = apiInstance.FoodIngredientSearchPhpGet(find, limit, userId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.FoodIngredientSearchPhpGet: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
find | string | Search our database for a single ingredient or a specific set of ingredients. Example #1: Single Ingredient > ```&find=raw broccoli``` Example #2: Set of Ingredients > ```&find=raw broccoli,buttermilk waffle,mashed potatoes``` Important Notes * Comma-separated lists cannot contain more than 10 ingredients. You must perform additional API calls if you are looking up more than 10 ingredients. | |
limit | int? | #### Set maximum number of records you want the API to return, per search term. The default value is "1." Example > ```&limit=3``` | [optional] |
userId | string | #### Only required for Premium subscribers. The unique identifier assigned to each user on your platform. This can be any string of letters or numbers and doesn't have to relate to your own database. Learn more Example > ```&user_id=fehef8w4ha``` | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RecipeObject RecipeIdPhpGet (string id, string userId = null)
Get a recipe by ID
Get a specific recipe using an ID. You must have a Recipe API key to use this endpoint. Get a Recipe API key. Example > https://chompthis.com/api/v2/recipe/id.php?api_key=API_KEY&id=RECIPE_ID
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class RecipeIdPhpGetExample
{
public void main()
{
// Configure API key authorization: ApiKeyAuth
Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");
var apiInstance = new DefaultApi();
var id = id_example; // string | #### A recipe ID. Recipe IDs are exposed in the /recipe/search and /recipe/ingredient endpoints. **Example** > ```&list=tdm_1143_0459d0028fcf8990724785b9e6775037```
var userId = userId_example; // string | #### **Only required for Premium subscribers.** The unique identifier assigned to each user on your platform. This can be any string of letters or numbers and doesn't have to relate to your own database. [Learn more](https://desk.zoho.com/portal/chompthis/en/kb/articles/monthly-active-users) **Example** > ```&user_id=fehef8w4ha``` (optional)
try
{
// Get a recipe by ID
RecipeObject result = apiInstance.RecipeIdPhpGet(id, userId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.RecipeIdPhpGet: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | #### A recipe ID. Recipe IDs are exposed in the /recipe/search and /recipe/ingredient endpoints. Example > ```&list=tdm_1143_0459d0028fcf8990724785b9e6775037``` | |
userId | string | #### Only required for Premium subscribers. The unique identifier assigned to each user on your platform. This can be any string of letters or numbers and doesn't have to relate to your own database. Learn more Example > ```&user_id=fehef8w4ha``` | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RecipeObject RecipeIngredientPhpGet (string list, int? limit = null, int? page = null, string userId = null)
Get recipes using a list of ingredients
Get recipes that include all ingredients from a list. You must have a Recipe API key to use this endpoint. Get a Recipe API key. Example #1 > https://chompthis.com/api/v2/recipe/ingredient.php?api_key=API_KEY&list=INGREDIENT
Example #2 > https://chompthis.com/api/v2/recipe/ingredient.php?api_key=API_KEY&list=INGREDIENT,INGREDIENT,INGREDIENT
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class RecipeIngredientPhpGetExample
{
public void main()
{
// Configure API key authorization: ApiKeyAuth
Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");
var apiInstance = new DefaultApi();
var list = list_example; // string | #### A single ingredient, or a comma-separated list of up to 3 ingredients. Recipes with each of these ingredients will be returned. **You can pass in up to 3 ingredients at a time.** **Example** > ```&list=cheese,tomato,milk```
var limit = 56; // int? | #### Set maximum number of records you want the API to return. The default value is \"**3**.\" **Example** > ```&limit=3``` (optional)
var page = 56; // int? | #### This is how you paginate the search result. By default, you will see the first 3 records. You must increment the page number to access the next 3 records, and so on. The default value is \"**1**.\" **Example** > ```&page=1``` (optional)
var userId = userId_example; // string | #### **Only required for Premium subscribers.** The unique identifier assigned to each user on your platform. This can be any string of letters or numbers and doesn't have to relate to your own database. [Learn more](https://desk.zoho.com/portal/chompthis/en/kb/articles/monthly-active-users) **Example** > ```&user_id=fehef8w4ha``` (optional)
try
{
// Get recipes using a list of ingredients
RecipeObject result = apiInstance.RecipeIngredientPhpGet(list, limit, page, userId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.RecipeIngredientPhpGet: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
list | string | #### A single ingredient, or a comma-separated list of up to 3 ingredients. Recipes with each of these ingredients will be returned. You can pass in up to 3 ingredients at a time. Example > ```&list=cheese,tomato,milk``` | |
limit | int? | #### Set maximum number of records you want the API to return. The default value is "3." Example > ```&limit=3``` | [optional] |
page | int? | #### This is how you paginate the search result. By default, you will see the first 3 records. You must increment the page number to access the next 3 records, and so on. The default value is "1." Example > ```&page=1``` | [optional] |
userId | string | #### Only required for Premium subscribers. The unique identifier assigned to each user on your platform. This can be any string of letters or numbers and doesn't have to relate to your own database. Learn more Example > ```&user_id=fehef8w4ha``` | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RecipeObject RecipeRandomPhpGet (int? limit = null, string userId = null)
Get random popular recipes
Get random recipes that have instructions and nutrients You must have a Recipe API key to use this endpoint. Get a Recipe API key. Example > https://chompthis.com/api/v2/recipe/random.php?api_key=API_KEY
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class RecipeRandomPhpGetExample
{
public void main()
{
// Configure API key authorization: ApiKeyAuth
Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");
var apiInstance = new DefaultApi();
var limit = 56; // int? | #### Set maximum number of records you want the API to return. The default value is \"**5**.\" **Example** > ```&limit=5``` (optional)
var userId = userId_example; // string | #### **Only required for Premium subscribers.** The unique identifier assigned to each user on your platform. This can be any string of letters or numbers and doesn't have to relate to your own database. [Learn more](https://desk.zoho.com/portal/chompthis/en/kb/articles/monthly-active-users) **Example** > ```&user_id=fehef8w4ha``` (optional)
try
{
// Get random popular recipes
RecipeObject result = apiInstance.RecipeRandomPhpGet(limit, userId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.RecipeRandomPhpGet: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
limit | int? | #### Set maximum number of records you want the API to return. The default value is "5." Example > ```&limit=5``` | [optional] |
userId | string | #### Only required for Premium subscribers. The unique identifier assigned to each user on your platform. This can be any string of letters or numbers and doesn't have to relate to your own database. Learn more Example > ```&user_id=fehef8w4ha``` | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RecipeObject RecipeSearchPhpGet (string title, string excludedCuisine = null, string includedCuisine = null, string excludedIngredient = null, string includedIngredient = null, int? nutrientsRequired = null, int? limit = null, int? page = null, string userId = null)
Get recipes using a title and optional filters
Get recipes using a title and optional filters. You must have a Recipe API key to use this endpoint. Get a Recipe API key. Example > https://chompthis.com/api/v2/recipe/search.php?api_key=API_KEY&title=TITLE
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class RecipeSearchPhpGetExample
{
public void main()
{
// Configure API key authorization: ApiKeyAuth
Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");
var apiInstance = new DefaultApi();
var title = title_example; // string | #### A recipe title **Example** > ```&title=Banana Bread```
var excludedCuisine = excludedCuisine_example; // string | #### A specific cuisine you want excluded from results **Example** > ```&excluded_cuisine=Italian``` (optional)
var includedCuisine = includedCuisine_example; // string | #### A specific cuisine you want included in results **Example** > ```&included_cuisine=Chinese``` (optional)
var excludedIngredient = excludedIngredient_example; // string | #### Recipes with this ingredient will be excluded from results **Example** > ```&excluded_ingredient=egg``` (optional)
var includedIngredient = includedIngredient_example; // string | #### Only recipes with this ingredient will be returned **Example** > ```&included_ingredient=apple``` (optional)
var nutrientsRequired = 56; // int? | #### Optionally require all recipes to include nutrition info. Recipes with, or without, nutrition info are returned by default. **Example** > ```&nutrients_required=1``` (optional)
var limit = 56; // int? | #### Set maximum number of records you want the API to return. The default value is \"**5**.\" **Example** > ```&limit=3``` (optional)
var page = 56; // int? | #### This is how you paginate the search result. By default, you will see the first 5 records. You must increment the page number to access the next 5 records, and so on. The default value is \"**1**.\" **Example** > ```&page=1``` (optional)
var userId = userId_example; // string | #### **Only required for Premium subscribers.** The unique identifier assigned to each user on your platform. This can be any string of letters or numbers and doesn't have to relate to your own database. [Learn more](https://desk.zoho.com/portal/chompthis/en/kb/articles/monthly-active-users) **Example** > ```&user_id=fehef8w4ha``` (optional)
try
{
// Get recipes using a title and optional filters
RecipeObject result = apiInstance.RecipeSearchPhpGet(title, excludedCuisine, includedCuisine, excludedIngredient, includedIngredient, nutrientsRequired, limit, page, userId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.RecipeSearchPhpGet: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
title | string | #### A recipe title Example > ```&title=Banana Bread``` | |
excludedCuisine | string | #### A specific cuisine you want excluded from results Example > ```&excluded_cuisine=Italian``` | [optional] |
includedCuisine | string | #### A specific cuisine you want included in results Example > ```&included_cuisine=Chinese``` | [optional] |
excludedIngredient | string | #### Recipes with this ingredient will be excluded from results Example > ```&excluded_ingredient=egg``` | [optional] |
includedIngredient | string | #### Only recipes with this ingredient will be returned Example > ```&included_ingredient=apple``` | [optional] |
nutrientsRequired | int? | #### Optionally require all recipes to include nutrition info. Recipes with, or without, nutrition info are returned by default. Example > ```&nutrients_required=1``` | [optional] |
limit | int? | #### Set maximum number of records you want the API to return. The default value is "5." Example > ```&limit=3``` | [optional] |
page | int? | #### This is how you paginate the search result. By default, you will see the first 5 records. You must increment the page number to access the next 5 records, and so on. The default value is "1." Example > ```&page=1``` | [optional] |
userId | string | #### Only required for Premium subscribers. The unique identifier assigned to each user on your platform. This can be any string of letters or numbers and doesn't have to relate to your own database. Learn more Example > ```&user_id=fehef8w4ha``` | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]