Food Data Central API

FDC

getFood

Fetches details for one food item by FDC ID

Retrieves a single food item by an FDC ID. Optional format and nutrients can be specified.


/v1/food/{fdcId}

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/fooddata/fdc/v1/food/{fdcId}?api_key=&format=&nutrients="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FDCApi;

import java.io.File;
import java.util.*;

public class FDCApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        FDCApi apiInstance = new FDCApi();
        String apiecoKey = apiecoKey_example; // String | 
        String apiKey = apiKey_example; // String | Don't Change The Value
        String fdcId = fdcId_example; // String | FDC id of the food to retrieve
        String format = format_example; // String | Optional. 'abridged' for an abridged set of elements, 'full' for all elements (default).
        array[Integer] nutrients = ; // array[Integer] | Optional. List of up to 25 nutrient numbers. Only the nutrient information for the specified nutrients will be returned. Should be comma separated list (e.g. nutrients=203,204) or repeating parameters (e.g. nutrients=203&nutrients=204). If a food does not have any matching nutrients, the food will be returned with an empty foodNutrients element.
        try {
            inline_response_200 result = apiInstance.getFood(apiecoKey, apiKey, fdcId, format, nutrients);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FDCApi#getFood");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FDCApi;

public class FDCApiExample {

    public static void main(String[] args) {
        FDCApi apiInstance = new FDCApi();
        String apiecoKey = apiecoKey_example; // String | 
        String apiKey = apiKey_example; // String | Don't Change The Value
        String fdcId = fdcId_example; // String | FDC id of the food to retrieve
        String format = format_example; // String | Optional. 'abridged' for an abridged set of elements, 'full' for all elements (default).
        array[Integer] nutrients = ; // array[Integer] | Optional. List of up to 25 nutrient numbers. Only the nutrient information for the specified nutrients will be returned. Should be comma separated list (e.g. nutrients=203,204) or repeating parameters (e.g. nutrients=203&nutrients=204). If a food does not have any matching nutrients, the food will be returned with an empty foodNutrients element.
        try {
            inline_response_200 result = apiInstance.getFood(apiecoKey, apiKey, fdcId, format, nutrients);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FDCApi#getFood");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
String *apiecoKey = apiecoKey_example; // 
String *apiKey = apiKey_example; // Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)
String *fdcId = fdcId_example; // FDC id of the food to retrieve
String *format = format_example; // Optional. 'abridged' for an abridged set of elements, 'full' for all elements (default). (optional)
array[Integer] *nutrients = ; // Optional. List of up to 25 nutrient numbers. Only the nutrient information for the specified nutrients will be returned. Should be comma separated list (e.g. nutrients=203,204) or repeating parameters (e.g. nutrients=203&nutrients=204). If a food does not have any matching nutrients, the food will be returned with an empty foodNutrients element. (optional)

FDCApi *apiInstance = [[FDCApi alloc] init];

// Fetches details for one food item by FDC ID
[apiInstance getFoodWith:apiecoKey
    apiKey:apiKey
    fdcId:fdcId
    format:format
    nutrients:nutrients
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FoodDataCentralApi = require('food_data_central_api');
var defaultClient = FoodDataCentralApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['api_key'] = "Token"

var api = new FoodDataCentralApi.FDCApi()
var apiecoKey = apiecoKey_example; // {{String}} 
var apiKey = apiKey_example; // {{String}} Don't Change The Value
var fdcId = fdcId_example; // {{String}} FDC id of the food to retrieve
var opts = { 
  'format': format_example, // {{String}} Optional. 'abridged' for an abridged set of elements, 'full' for all elements (default).
  'nutrients':  // {{array[Integer]}} Optional. List of up to 25 nutrient numbers. Only the nutrient information for the specified nutrients will be returned. Should be comma separated list (e.g. nutrients=203,204) or repeating parameters (e.g. nutrients=203&nutrients=204). If a food does not have any matching nutrients, the food will be returned with an empty foodNutrients element.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getFood(apiecoKey, apiKey, fdcId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getFoodExample
    {
        public void main()
        {

            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("api_key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("api_key", "Bearer");

            var apiInstance = new FDCApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var apiKey = apiKey_example;  // String | Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)
            var fdcId = fdcId_example;  // String | FDC id of the food to retrieve
            var format = format_example;  // String | Optional. 'abridged' for an abridged set of elements, 'full' for all elements (default). (optional) 
            var nutrients = new array[Integer](); // array[Integer] | Optional. List of up to 25 nutrient numbers. Only the nutrient information for the specified nutrients will be returned. Should be comma separated list (e.g. nutrients=203,204) or repeating parameters (e.g. nutrients=203&nutrients=204). If a food does not have any matching nutrients, the food will be returned with an empty foodNutrients element. (optional) 

            try
            {
                // Fetches details for one food item by FDC ID
                inline_response_200 result = apiInstance.getFood(apiecoKey, apiKey, fdcId, format, nutrients);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FDCApi.getFood: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer');

$api_instance = new Swagger\Client\ApiFDCApi();
$apiecoKey = apiecoKey_example; // String | 
$apiKey = apiKey_example; // String | Don't Change The Value
$fdcId = fdcId_example; // String | FDC id of the food to retrieve
$format = format_example; // String | Optional. 'abridged' for an abridged set of elements, 'full' for all elements (default).
$nutrients = ; // array[Integer] | Optional. List of up to 25 nutrient numbers. Only the nutrient information for the specified nutrients will be returned. Should be comma separated list (e.g. nutrients=203,204) or repeating parameters (e.g. nutrients=203&nutrients=204). If a food does not have any matching nutrients, the food will be returned with an empty foodNutrients element.

try {
    $result = $api_instance->getFood($apiecoKey, $apiKey, $fdcId, $format, $nutrients);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FDCApi->getFood: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FDCApi;

# Configure API key authorization: ApiKeyAuth
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FDCApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $apiKey = apiKey_example; # String | Don't Change The Value
my $fdcId = fdcId_example; # String | FDC id of the food to retrieve
my $format = format_example; # String | Optional. 'abridged' for an abridged set of elements, 'full' for all elements (default).
my $nutrients = []; # array[Integer] | Optional. List of up to 25 nutrient numbers. Only the nutrient information for the specified nutrients will be returned. Should be comma separated list (e.g. nutrients=203,204) or repeating parameters (e.g. nutrients=203&nutrients=204). If a food does not have any matching nutrients, the food will be returned with an empty foodNutrients element.

eval { 
    my $result = $api_instance->getFood(apiecoKey => $apiecoKey, apiKey => $apiKey, fdcId => $fdcId, format => $format, nutrients => $nutrients);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FDCApi->getFood: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['api_key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FDCApi()
apiecoKey = apiecoKey_example # String | 
apiKey = apiKey_example # String | Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)
fdcId = fdcId_example # String | FDC id of the food to retrieve
format = format_example # String | Optional. 'abridged' for an abridged set of elements, 'full' for all elements (default). (optional)
nutrients =  # array[Integer] | Optional. List of up to 25 nutrient numbers. Only the nutrient information for the specified nutrients will be returned. Should be comma separated list (e.g. nutrients=203,204) or repeating parameters (e.g. nutrients=203&nutrients=204). If a food does not have any matching nutrients, the food will be returned with an empty foodNutrients element. (optional)

try: 
    # Fetches details for one food item by FDC ID
    api_response = api_instance.get_food(apiecoKey, apiKey, fdcId, format=format, nutrients=nutrients)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FDCApi->getFood: %s\n" % e)

Parameters

Path parameters
Name Description
fdcId*
String
FDC id of the food to retrieve
Required
Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
api_key*
String
Don't Change The Value
Required
format
String
Optional. 'abridged' for an abridged set of elements, 'full' for all elements (default).
nutrients
array[Integer]
Optional. List of up to 25 nutrient numbers. Only the nutrient information for the specified nutrients will be returned. Should be comma separated list (e.g. nutrients=203,204) or repeating parameters (e.g. nutrients=203&nutrients=204). If a food does not have any matching nutrients, the food will be returned with an empty foodNutrients element.

Responses

Status: 200 - One food result.

Status: 400 - bad input parameter

Status: 404 - no results found


getFoods

Fetches details for multiple food items using input FDC IDs

Retrieves a list of food items by a list of up to 20 FDC IDs. Optional format and nutrients can be specified. Invalid FDC ID's or ones that are not found are omitted and an empty set is returned if there are no matches.


/v1/foods

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/fooddata/fdc/v1/foods?api_key=&fdcIds=&format=&nutrients="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FDCApi;

import java.io.File;
import java.util.*;

public class FDCApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        FDCApi apiInstance = new FDCApi();
        String apiecoKey = apiecoKey_example; // String | 
        String apiKey = apiKey_example; // String | Don't Change The Value
        array[String] fdcIds = ; // array[String] | List of multiple FDC ID's. Should be comma separated list (e.g. fdcIds=534358,373052) or repeating parameters (e.g. fdcIds=534358&fdcIds=373052).
        String format = format_example; // String | Optional. 'abridged' for an abridged set of elements, 'full' for all elements (default).
        array[Integer] nutrients = ; // array[Integer] | Optional. List of up to 25 nutrient numbers. Only the nutrient information for the specified nutrients will be returned. Should be comma separated list (e.g. nutrients=203,204) or repeating parameters (e.g. nutrients=203&nutrients=204). If a food does not have any matching nutrients, the food will be returned with an empty foodNutrients element.
        try {
            array[null] result = apiInstance.getFoods(apiecoKey, apiKey, fdcIds, format, nutrients);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FDCApi#getFoods");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FDCApi;

public class FDCApiExample {

    public static void main(String[] args) {
        FDCApi apiInstance = new FDCApi();
        String apiecoKey = apiecoKey_example; // String | 
        String apiKey = apiKey_example; // String | Don't Change The Value
        array[String] fdcIds = ; // array[String] | List of multiple FDC ID's. Should be comma separated list (e.g. fdcIds=534358,373052) or repeating parameters (e.g. fdcIds=534358&fdcIds=373052).
        String format = format_example; // String | Optional. 'abridged' for an abridged set of elements, 'full' for all elements (default).
        array[Integer] nutrients = ; // array[Integer] | Optional. List of up to 25 nutrient numbers. Only the nutrient information for the specified nutrients will be returned. Should be comma separated list (e.g. nutrients=203,204) or repeating parameters (e.g. nutrients=203&nutrients=204). If a food does not have any matching nutrients, the food will be returned with an empty foodNutrients element.
        try {
            array[null] result = apiInstance.getFoods(apiecoKey, apiKey, fdcIds, format, nutrients);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FDCApi#getFoods");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
String *apiecoKey = apiecoKey_example; // 
String *apiKey = apiKey_example; // Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)
array[String] *fdcIds = ; // List of multiple FDC ID's. Should be comma separated list (e.g. fdcIds=534358,373052) or repeating parameters (e.g. fdcIds=534358&fdcIds=373052).
String *format = format_example; // Optional. 'abridged' for an abridged set of elements, 'full' for all elements (default). (optional)
array[Integer] *nutrients = ; // Optional. List of up to 25 nutrient numbers. Only the nutrient information for the specified nutrients will be returned. Should be comma separated list (e.g. nutrients=203,204) or repeating parameters (e.g. nutrients=203&nutrients=204). If a food does not have any matching nutrients, the food will be returned with an empty foodNutrients element. (optional)

FDCApi *apiInstance = [[FDCApi alloc] init];

// Fetches details for multiple food items using input FDC IDs
[apiInstance getFoodsWith:apiecoKey
    apiKey:apiKey
    fdcIds:fdcIds
    format:format
    nutrients:nutrients
              completionHandler: ^(NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FoodDataCentralApi = require('food_data_central_api');
var defaultClient = FoodDataCentralApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['api_key'] = "Token"

var api = new FoodDataCentralApi.FDCApi()
var apiecoKey = apiecoKey_example; // {{String}} 
var apiKey = apiKey_example; // {{String}} Don't Change The Value
var fdcIds = ; // {{array[String]}} List of multiple FDC ID's. Should be comma separated list (e.g. fdcIds=534358,373052) or repeating parameters (e.g. fdcIds=534358&fdcIds=373052).
var opts = { 
  'format': format_example, // {{String}} Optional. 'abridged' for an abridged set of elements, 'full' for all elements (default).
  'nutrients':  // {{array[Integer]}} Optional. List of up to 25 nutrient numbers. Only the nutrient information for the specified nutrients will be returned. Should be comma separated list (e.g. nutrients=203,204) or repeating parameters (e.g. nutrients=203&nutrients=204). If a food does not have any matching nutrients, the food will be returned with an empty foodNutrients element.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getFoods(apiecoKey, apiKey, fdcIds, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getFoodsExample
    {
        public void main()
        {

            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("api_key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("api_key", "Bearer");

            var apiInstance = new FDCApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var apiKey = apiKey_example;  // String | Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)
            var fdcIds = new array[String](); // array[String] | List of multiple FDC ID's. Should be comma separated list (e.g. fdcIds=534358,373052) or repeating parameters (e.g. fdcIds=534358&fdcIds=373052).
            var format = format_example;  // String | Optional. 'abridged' for an abridged set of elements, 'full' for all elements (default). (optional) 
            var nutrients = new array[Integer](); // array[Integer] | Optional. List of up to 25 nutrient numbers. Only the nutrient information for the specified nutrients will be returned. Should be comma separated list (e.g. nutrients=203,204) or repeating parameters (e.g. nutrients=203&nutrients=204). If a food does not have any matching nutrients, the food will be returned with an empty foodNutrients element. (optional) 

            try
            {
                // Fetches details for multiple food items using input FDC IDs
                array[null] result = apiInstance.getFoods(apiecoKey, apiKey, fdcIds, format, nutrients);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FDCApi.getFoods: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer');

$api_instance = new Swagger\Client\ApiFDCApi();
$apiecoKey = apiecoKey_example; // String | 
$apiKey = apiKey_example; // String | Don't Change The Value
$fdcIds = ; // array[String] | List of multiple FDC ID's. Should be comma separated list (e.g. fdcIds=534358,373052) or repeating parameters (e.g. fdcIds=534358&fdcIds=373052).
$format = format_example; // String | Optional. 'abridged' for an abridged set of elements, 'full' for all elements (default).
$nutrients = ; // array[Integer] | Optional. List of up to 25 nutrient numbers. Only the nutrient information for the specified nutrients will be returned. Should be comma separated list (e.g. nutrients=203,204) or repeating parameters (e.g. nutrients=203&nutrients=204). If a food does not have any matching nutrients, the food will be returned with an empty foodNutrients element.

try {
    $result = $api_instance->getFoods($apiecoKey, $apiKey, $fdcIds, $format, $nutrients);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FDCApi->getFoods: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FDCApi;

# Configure API key authorization: ApiKeyAuth
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FDCApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $apiKey = apiKey_example; # String | Don't Change The Value
my $fdcIds = []; # array[String] | List of multiple FDC ID's. Should be comma separated list (e.g. fdcIds=534358,373052) or repeating parameters (e.g. fdcIds=534358&fdcIds=373052).
my $format = format_example; # String | Optional. 'abridged' for an abridged set of elements, 'full' for all elements (default).
my $nutrients = []; # array[Integer] | Optional. List of up to 25 nutrient numbers. Only the nutrient information for the specified nutrients will be returned. Should be comma separated list (e.g. nutrients=203,204) or repeating parameters (e.g. nutrients=203&nutrients=204). If a food does not have any matching nutrients, the food will be returned with an empty foodNutrients element.

eval { 
    my $result = $api_instance->getFoods(apiecoKey => $apiecoKey, apiKey => $apiKey, fdcIds => $fdcIds, format => $format, nutrients => $nutrients);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FDCApi->getFoods: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['api_key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FDCApi()
apiecoKey = apiecoKey_example # String | 
apiKey = apiKey_example # String | Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)
fdcIds =  # array[String] | List of multiple FDC ID's. Should be comma separated list (e.g. fdcIds=534358,373052) or repeating parameters (e.g. fdcIds=534358&fdcIds=373052).
format = format_example # String | Optional. 'abridged' for an abridged set of elements, 'full' for all elements (default). (optional)
nutrients =  # array[Integer] | Optional. List of up to 25 nutrient numbers. Only the nutrient information for the specified nutrients will be returned. Should be comma separated list (e.g. nutrients=203,204) or repeating parameters (e.g. nutrients=203&nutrients=204). If a food does not have any matching nutrients, the food will be returned with an empty foodNutrients element. (optional)

try: 
    # Fetches details for multiple food items using input FDC IDs
    api_response = api_instance.get_foods(apiecoKey, apiKey, fdcIds, format=format, nutrients=nutrients)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FDCApi->getFoods: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
api_key*
String
Don't Change The Value
Required
fdcIds*
array[String]
List of multiple FDC ID's. Should be comma separated list (e.g. fdcIds=534358,373052) or repeating parameters (e.g. fdcIds=534358&fdcIds=373052).
Required
format
String
Optional. 'abridged' for an abridged set of elements, 'full' for all elements (default).
nutrients
array[Integer]
Optional. List of up to 25 nutrient numbers. Only the nutrient information for the specified nutrients will be returned. Should be comma separated list (e.g. nutrients=203,204) or repeating parameters (e.g. nutrients=203&nutrients=204). If a food does not have any matching nutrients, the food will be returned with an empty foodNutrients element.

Responses

Status: 200 - List of Food details matching specified FDC ID's. Invalid FDC ID's or ones that are not found are omitted.

Status: 400 - bad input parameter


getFoodsList

Returns a paged list of foods, in the 'abridged' format

Retrieves a paged list of foods. Use the pageNumber parameter to page through the entire result set.


/v1/foods/list

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/fooddata/fdc/v1/foods/list?api_key=&dataType=&pageSize=&pageNumber=&sortBy=&sortOrder="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FDCApi;

import java.io.File;
import java.util.*;

public class FDCApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        FDCApi apiInstance = new FDCApi();
        String apiecoKey = apiecoKey_example; // String | 
        String apiKey = apiKey_example; // String | Don't Change The Value
        array[String] dataType = ; // array[String] | Optional. Filter on a specific data type; specify one or more values in an array.
        Integer pageSize = 56; // Integer | Optional. Maximum number of results to return for the current page. Default is 50.
        Integer pageNumber = 56; // Integer | Optional. Page number to retrieve. The offset into the overall result set is expressed as (pageNumber * pageSize)
        String sortBy = sortBy_example; // String | Optional. Specify one of the possible values to sort by that field. Note, dataType.keyword will be dataType and lowercaseDescription.keyword will be description in future releases.
        String sortOrder = sortOrder_example; // String | Optional. The sort direction for the results. Only applicable if sortBy is specified.
        try {
            array[AbridgedFoodItem] result = apiInstance.getFoodsList(apiecoKey, apiKey, dataType, pageSize, pageNumber, sortBy, sortOrder);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FDCApi#getFoodsList");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FDCApi;

public class FDCApiExample {

    public static void main(String[] args) {
        FDCApi apiInstance = new FDCApi();
        String apiecoKey = apiecoKey_example; // String | 
        String apiKey = apiKey_example; // String | Don't Change The Value
        array[String] dataType = ; // array[String] | Optional. Filter on a specific data type; specify one or more values in an array.
        Integer pageSize = 56; // Integer | Optional. Maximum number of results to return for the current page. Default is 50.
        Integer pageNumber = 56; // Integer | Optional. Page number to retrieve. The offset into the overall result set is expressed as (pageNumber * pageSize)
        String sortBy = sortBy_example; // String | Optional. Specify one of the possible values to sort by that field. Note, dataType.keyword will be dataType and lowercaseDescription.keyword will be description in future releases.
        String sortOrder = sortOrder_example; // String | Optional. The sort direction for the results. Only applicable if sortBy is specified.
        try {
            array[AbridgedFoodItem] result = apiInstance.getFoodsList(apiecoKey, apiKey, dataType, pageSize, pageNumber, sortBy, sortOrder);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FDCApi#getFoodsList");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
String *apiecoKey = apiecoKey_example; // 
String *apiKey = apiKey_example; // Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)
array[String] *dataType = ; // Optional. Filter on a specific data type; specify one or more values in an array. (optional)
Integer *pageSize = 56; // Optional. Maximum number of results to return for the current page. Default is 50. (optional)
Integer *pageNumber = 56; // Optional. Page number to retrieve. The offset into the overall result set is expressed as (pageNumber * pageSize) (optional)
String *sortBy = sortBy_example; // Optional. Specify one of the possible values to sort by that field. Note, dataType.keyword will be dataType and lowercaseDescription.keyword will be description in future releases. (optional)
String *sortOrder = sortOrder_example; // Optional. The sort direction for the results. Only applicable if sortBy is specified. (optional)

FDCApi *apiInstance = [[FDCApi alloc] init];

// Returns a paged list of foods, in the 'abridged' format
[apiInstance getFoodsListWith:apiecoKey
    apiKey:apiKey
    dataType:dataType
    pageSize:pageSize
    pageNumber:pageNumber
    sortBy:sortBy
    sortOrder:sortOrder
              completionHandler: ^(array[AbridgedFoodItem] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FoodDataCentralApi = require('food_data_central_api');
var defaultClient = FoodDataCentralApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['api_key'] = "Token"

var api = new FoodDataCentralApi.FDCApi()
var apiecoKey = apiecoKey_example; // {{String}} 
var apiKey = apiKey_example; // {{String}} Don't Change The Value
var opts = { 
  'dataType': , // {{array[String]}} Optional. Filter on a specific data type; specify one or more values in an array.
  'pageSize': 56, // {{Integer}} Optional. Maximum number of results to return for the current page. Default is 50.
  'pageNumber': 56, // {{Integer}} Optional. Page number to retrieve. The offset into the overall result set is expressed as (pageNumber * pageSize)
  'sortBy': sortBy_example, // {{String}} Optional. Specify one of the possible values to sort by that field. Note, dataType.keyword will be dataType and lowercaseDescription.keyword will be description in future releases.
  'sortOrder': sortOrder_example // {{String}} Optional. The sort direction for the results. Only applicable if sortBy is specified.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getFoodsList(apiecoKey, apiKey, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getFoodsListExample
    {
        public void main()
        {

            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("api_key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("api_key", "Bearer");

            var apiInstance = new FDCApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var apiKey = apiKey_example;  // String | Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)
            var dataType = new array[String](); // array[String] | Optional. Filter on a specific data type; specify one or more values in an array. (optional) 
            var pageSize = 56;  // Integer | Optional. Maximum number of results to return for the current page. Default is 50. (optional) 
            var pageNumber = 56;  // Integer | Optional. Page number to retrieve. The offset into the overall result set is expressed as (pageNumber * pageSize) (optional) 
            var sortBy = sortBy_example;  // String | Optional. Specify one of the possible values to sort by that field. Note, dataType.keyword will be dataType and lowercaseDescription.keyword will be description in future releases. (optional) 
            var sortOrder = sortOrder_example;  // String | Optional. The sort direction for the results. Only applicable if sortBy is specified. (optional) 

            try
            {
                // Returns a paged list of foods, in the 'abridged' format
                array[AbridgedFoodItem] result = apiInstance.getFoodsList(apiecoKey, apiKey, dataType, pageSize, pageNumber, sortBy, sortOrder);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FDCApi.getFoodsList: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer');

$api_instance = new Swagger\Client\ApiFDCApi();
$apiecoKey = apiecoKey_example; // String | 
$apiKey = apiKey_example; // String | Don't Change The Value
$dataType = ; // array[String] | Optional. Filter on a specific data type; specify one or more values in an array.
$pageSize = 56; // Integer | Optional. Maximum number of results to return for the current page. Default is 50.
$pageNumber = 56; // Integer | Optional. Page number to retrieve. The offset into the overall result set is expressed as (pageNumber * pageSize)
$sortBy = sortBy_example; // String | Optional. Specify one of the possible values to sort by that field. Note, dataType.keyword will be dataType and lowercaseDescription.keyword will be description in future releases.
$sortOrder = sortOrder_example; // String | Optional. The sort direction for the results. Only applicable if sortBy is specified.

try {
    $result = $api_instance->getFoodsList($apiecoKey, $apiKey, $dataType, $pageSize, $pageNumber, $sortBy, $sortOrder);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FDCApi->getFoodsList: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FDCApi;

# Configure API key authorization: ApiKeyAuth
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FDCApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $apiKey = apiKey_example; # String | Don't Change The Value
my $dataType = []; # array[String] | Optional. Filter on a specific data type; specify one or more values in an array.
my $pageSize = 56; # Integer | Optional. Maximum number of results to return for the current page. Default is 50.
my $pageNumber = 56; # Integer | Optional. Page number to retrieve. The offset into the overall result set is expressed as (pageNumber * pageSize)
my $sortBy = sortBy_example; # String | Optional. Specify one of the possible values to sort by that field. Note, dataType.keyword will be dataType and lowercaseDescription.keyword will be description in future releases.
my $sortOrder = sortOrder_example; # String | Optional. The sort direction for the results. Only applicable if sortBy is specified.

eval { 
    my $result = $api_instance->getFoodsList(apiecoKey => $apiecoKey, apiKey => $apiKey, dataType => $dataType, pageSize => $pageSize, pageNumber => $pageNumber, sortBy => $sortBy, sortOrder => $sortOrder);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FDCApi->getFoodsList: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['api_key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FDCApi()
apiecoKey = apiecoKey_example # String | 
apiKey = apiKey_example # String | Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)
dataType =  # array[String] | Optional. Filter on a specific data type; specify one or more values in an array. (optional)
pageSize = 56 # Integer | Optional. Maximum number of results to return for the current page. Default is 50. (optional)
pageNumber = 56 # Integer | Optional. Page number to retrieve. The offset into the overall result set is expressed as (pageNumber * pageSize) (optional)
sortBy = sortBy_example # String | Optional. Specify one of the possible values to sort by that field. Note, dataType.keyword will be dataType and lowercaseDescription.keyword will be description in future releases. (optional)
sortOrder = sortOrder_example # String | Optional. The sort direction for the results. Only applicable if sortBy is specified. (optional)

try: 
    # Returns a paged list of foods, in the 'abridged' format
    api_response = api_instance.get_foods_list(apiecoKey, apiKey, dataType=dataType, pageSize=pageSize, pageNumber=pageNumber, sortBy=sortBy, sortOrder=sortOrder)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FDCApi->getFoodsList: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
api_key*
String
Don't Change The Value
Required
dataType
array[String]
Optional. Filter on a specific data type; specify one or more values in an array.
pageSize
Integer
Optional. Maximum number of results to return for the current page. Default is 50.
pageNumber
Integer
Optional. Page number to retrieve. The offset into the overall result set is expressed as (pageNumber * pageSize)
sortBy
String
Optional. Specify one of the possible values to sort by that field. Note, dataType.keyword will be dataType and lowercaseDescription.keyword will be description in future releases.
sortOrder
String
Optional. The sort direction for the results. Only applicable if sortBy is specified.

Responses

Status: 200 - List of foods for the requested page

Status: 400 - bad input parameter


getFoodsSearch

Returns a list of foods that matched search (query) keywords

Search for foods using keywords. Results can be filtered by dataType and there are options for result page sizes or sorting.


/v1/foods/search

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/fooddata/fdc/v1/foods/search?api_key=&query=&dataType=&pageSize=&pageNumber=&sortBy=&sortOrder=&brandOwner="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FDCApi;

import java.io.File;
import java.util.*;

public class FDCApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        FDCApi apiInstance = new FDCApi();
        String apiecoKey = apiecoKey_example; // String | 
        String apiKey = apiKey_example; // String | Don't Change The Value
        String query = query_example; // String | One or more search terms.  The string may include [search operators](https://fdc.nal.usda.gov/help.html#bkmk-2)
        array[String] dataType = ; // array[String] | Optional. Filter on a specific data type; specify one or more values in an array.
        Integer pageSize = 56; // Integer | Optional. Maximum number of results to return for the current page. Default is 50.
        Integer pageNumber = 56; // Integer | Optional. Page number to retrieve. The offset into the overall result set is expressed as (pageNumber * pageSize)
        String sortBy = sortBy_example; // String | Optional. Specify one of the possible values to sort by that field. Note, dataType.keyword will be dataType and lowercaseDescription.keyword will be description in future releases.
        String sortOrder = sortOrder_example; // String | Optional. The sort direction for the results. Only applicable if sortBy is specified.
        String brandOwner = brandOwner_example; // String | Optional. Filter results based on the brand owner of the food. Only applies to Branded Foods
        try {
            array[SearchResult] result = apiInstance.getFoodsSearch(apiecoKey, apiKey, query, dataType, pageSize, pageNumber, sortBy, sortOrder, brandOwner);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FDCApi#getFoodsSearch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FDCApi;

public class FDCApiExample {

    public static void main(String[] args) {
        FDCApi apiInstance = new FDCApi();
        String apiecoKey = apiecoKey_example; // String | 
        String apiKey = apiKey_example; // String | Don't Change The Value
        String query = query_example; // String | One or more search terms.  The string may include [search operators](https://fdc.nal.usda.gov/help.html#bkmk-2)
        array[String] dataType = ; // array[String] | Optional. Filter on a specific data type; specify one or more values in an array.
        Integer pageSize = 56; // Integer | Optional. Maximum number of results to return for the current page. Default is 50.
        Integer pageNumber = 56; // Integer | Optional. Page number to retrieve. The offset into the overall result set is expressed as (pageNumber * pageSize)
        String sortBy = sortBy_example; // String | Optional. Specify one of the possible values to sort by that field. Note, dataType.keyword will be dataType and lowercaseDescription.keyword will be description in future releases.
        String sortOrder = sortOrder_example; // String | Optional. The sort direction for the results. Only applicable if sortBy is specified.
        String brandOwner = brandOwner_example; // String | Optional. Filter results based on the brand owner of the food. Only applies to Branded Foods
        try {
            array[SearchResult] result = apiInstance.getFoodsSearch(apiecoKey, apiKey, query, dataType, pageSize, pageNumber, sortBy, sortOrder, brandOwner);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FDCApi#getFoodsSearch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
String *apiecoKey = apiecoKey_example; // 
String *apiKey = apiKey_example; // Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)
String *query = query_example; // One or more search terms.  The string may include [search operators](https://fdc.nal.usda.gov/help.html#bkmk-2)
array[String] *dataType = ; // Optional. Filter on a specific data type; specify one or more values in an array. (optional)
Integer *pageSize = 56; // Optional. Maximum number of results to return for the current page. Default is 50. (optional)
Integer *pageNumber = 56; // Optional. Page number to retrieve. The offset into the overall result set is expressed as (pageNumber * pageSize) (optional)
String *sortBy = sortBy_example; // Optional. Specify one of the possible values to sort by that field. Note, dataType.keyword will be dataType and lowercaseDescription.keyword will be description in future releases. (optional)
String *sortOrder = sortOrder_example; // Optional. The sort direction for the results. Only applicable if sortBy is specified. (optional)
String *brandOwner = brandOwner_example; // Optional. Filter results based on the brand owner of the food. Only applies to Branded Foods (optional)

FDCApi *apiInstance = [[FDCApi alloc] init];

// Returns a list of foods that matched search (query) keywords
[apiInstance getFoodsSearchWith:apiecoKey
    apiKey:apiKey
    query:query
    dataType:dataType
    pageSize:pageSize
    pageNumber:pageNumber
    sortBy:sortBy
    sortOrder:sortOrder
    brandOwner:brandOwner
              completionHandler: ^(array[SearchResult] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FoodDataCentralApi = require('food_data_central_api');
var defaultClient = FoodDataCentralApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['api_key'] = "Token"

var api = new FoodDataCentralApi.FDCApi()
var apiecoKey = apiecoKey_example; // {{String}} 
var apiKey = apiKey_example; // {{String}} Don't Change The Value
var query = query_example; // {{String}} One or more search terms.  The string may include [search operators](https://fdc.nal.usda.gov/help.html#bkmk-2)
var opts = { 
  'dataType': , // {{array[String]}} Optional. Filter on a specific data type; specify one or more values in an array.
  'pageSize': 56, // {{Integer}} Optional. Maximum number of results to return for the current page. Default is 50.
  'pageNumber': 56, // {{Integer}} Optional. Page number to retrieve. The offset into the overall result set is expressed as (pageNumber * pageSize)
  'sortBy': sortBy_example, // {{String}} Optional. Specify one of the possible values to sort by that field. Note, dataType.keyword will be dataType and lowercaseDescription.keyword will be description in future releases.
  'sortOrder': sortOrder_example, // {{String}} Optional. The sort direction for the results. Only applicable if sortBy is specified.
  'brandOwner': brandOwner_example // {{String}} Optional. Filter results based on the brand owner of the food. Only applies to Branded Foods
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getFoodsSearch(apiecoKey, apiKey, query, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getFoodsSearchExample
    {
        public void main()
        {

            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("api_key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("api_key", "Bearer");

            var apiInstance = new FDCApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var apiKey = apiKey_example;  // String | Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)
            var query = query_example;  // String | One or more search terms.  The string may include [search operators](https://fdc.nal.usda.gov/help.html#bkmk-2)
            var dataType = new array[String](); // array[String] | Optional. Filter on a specific data type; specify one or more values in an array. (optional) 
            var pageSize = 56;  // Integer | Optional. Maximum number of results to return for the current page. Default is 50. (optional) 
            var pageNumber = 56;  // Integer | Optional. Page number to retrieve. The offset into the overall result set is expressed as (pageNumber * pageSize) (optional) 
            var sortBy = sortBy_example;  // String | Optional. Specify one of the possible values to sort by that field. Note, dataType.keyword will be dataType and lowercaseDescription.keyword will be description in future releases. (optional) 
            var sortOrder = sortOrder_example;  // String | Optional. The sort direction for the results. Only applicable if sortBy is specified. (optional) 
            var brandOwner = brandOwner_example;  // String | Optional. Filter results based on the brand owner of the food. Only applies to Branded Foods (optional) 

            try
            {
                // Returns a list of foods that matched search (query) keywords
                array[SearchResult] result = apiInstance.getFoodsSearch(apiecoKey, apiKey, query, dataType, pageSize, pageNumber, sortBy, sortOrder, brandOwner);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FDCApi.getFoodsSearch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer');

$api_instance = new Swagger\Client\ApiFDCApi();
$apiecoKey = apiecoKey_example; // String | 
$apiKey = apiKey_example; // String | Don't Change The Value
$query = query_example; // String | One or more search terms.  The string may include [search operators](https://fdc.nal.usda.gov/help.html#bkmk-2)
$dataType = ; // array[String] | Optional. Filter on a specific data type; specify one or more values in an array.
$pageSize = 56; // Integer | Optional. Maximum number of results to return for the current page. Default is 50.
$pageNumber = 56; // Integer | Optional. Page number to retrieve. The offset into the overall result set is expressed as (pageNumber * pageSize)
$sortBy = sortBy_example; // String | Optional. Specify one of the possible values to sort by that field. Note, dataType.keyword will be dataType and lowercaseDescription.keyword will be description in future releases.
$sortOrder = sortOrder_example; // String | Optional. The sort direction for the results. Only applicable if sortBy is specified.
$brandOwner = brandOwner_example; // String | Optional. Filter results based on the brand owner of the food. Only applies to Branded Foods

try {
    $result = $api_instance->getFoodsSearch($apiecoKey, $apiKey, $query, $dataType, $pageSize, $pageNumber, $sortBy, $sortOrder, $brandOwner);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FDCApi->getFoodsSearch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FDCApi;

# Configure API key authorization: ApiKeyAuth
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FDCApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $apiKey = apiKey_example; # String | Don't Change The Value
my $query = query_example; # String | One or more search terms.  The string may include [search operators](https://fdc.nal.usda.gov/help.html#bkmk-2)
my $dataType = []; # array[String] | Optional. Filter on a specific data type; specify one or more values in an array.
my $pageSize = 56; # Integer | Optional. Maximum number of results to return for the current page. Default is 50.
my $pageNumber = 56; # Integer | Optional. Page number to retrieve. The offset into the overall result set is expressed as (pageNumber * pageSize)
my $sortBy = sortBy_example; # String | Optional. Specify one of the possible values to sort by that field. Note, dataType.keyword will be dataType and lowercaseDescription.keyword will be description in future releases.
my $sortOrder = sortOrder_example; # String | Optional. The sort direction for the results. Only applicable if sortBy is specified.
my $brandOwner = brandOwner_example; # String | Optional. Filter results based on the brand owner of the food. Only applies to Branded Foods

eval { 
    my $result = $api_instance->getFoodsSearch(apiecoKey => $apiecoKey, apiKey => $apiKey, query => $query, dataType => $dataType, pageSize => $pageSize, pageNumber => $pageNumber, sortBy => $sortBy, sortOrder => $sortOrder, brandOwner => $brandOwner);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FDCApi->getFoodsSearch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['api_key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FDCApi()
apiecoKey = apiecoKey_example # String | 
apiKey = apiKey_example # String | Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)
query = query_example # String | One or more search terms.  The string may include [search operators](https://fdc.nal.usda.gov/help.html#bkmk-2)
dataType =  # array[String] | Optional. Filter on a specific data type; specify one or more values in an array. (optional)
pageSize = 56 # Integer | Optional. Maximum number of results to return for the current page. Default is 50. (optional)
pageNumber = 56 # Integer | Optional. Page number to retrieve. The offset into the overall result set is expressed as (pageNumber * pageSize) (optional)
sortBy = sortBy_example # String | Optional. Specify one of the possible values to sort by that field. Note, dataType.keyword will be dataType and lowercaseDescription.keyword will be description in future releases. (optional)
sortOrder = sortOrder_example # String | Optional. The sort direction for the results. Only applicable if sortBy is specified. (optional)
brandOwner = brandOwner_example # String | Optional. Filter results based on the brand owner of the food. Only applies to Branded Foods (optional)

try: 
    # Returns a list of foods that matched search (query) keywords
    api_response = api_instance.get_foods_search(apiecoKey, apiKey, query, dataType=dataType, pageSize=pageSize, pageNumber=pageNumber, sortBy=sortBy, sortOrder=sortOrder, brandOwner=brandOwner)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FDCApi->getFoodsSearch: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
api_key*
String
Don't Change The Value
Required
query*
String
One or more search terms. The string may include [search operators](https://fdc.nal.usda.gov/help.html#bkmk-2)
Required
dataType
array[String]
Optional. Filter on a specific data type; specify one or more values in an array.
pageSize
Integer
Optional. Maximum number of results to return for the current page. Default is 50.
pageNumber
Integer
Optional. Page number to retrieve. The offset into the overall result set is expressed as (pageNumber * pageSize)
sortBy
String
Optional. Specify one of the possible values to sort by that field. Note, dataType.keyword will be dataType and lowercaseDescription.keyword will be description in future releases.
sortOrder
String
Optional. The sort direction for the results. Only applicable if sortBy is specified.
brandOwner
String
Optional. Filter results based on the brand owner of the food. Only applies to Branded Foods

Responses

Status: 200 - List of foods that matched search terms

Status: 400 - bad input parameter


getJsonSpec

Returns this documentation in JSON format

The OpenAPI 3.0 specification for the FDC API rendered as JSON (JavaScript Object Notation)


/v1/json-spec

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/fooddata/fdc/v1/json-spec?api_key="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FDCApi;

import java.io.File;
import java.util.*;

public class FDCApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        FDCApi apiInstance = new FDCApi();
        String apiecoKey = apiecoKey_example; // String | 
        String apiKey = apiKey_example; // String | Don't Change The Value
        try {
            apiInstance.getJsonSpec(apiecoKey, apiKey);
        } catch (ApiException e) {
            System.err.println("Exception when calling FDCApi#getJsonSpec");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FDCApi;

public class FDCApiExample {

    public static void main(String[] args) {
        FDCApi apiInstance = new FDCApi();
        String apiecoKey = apiecoKey_example; // String | 
        String apiKey = apiKey_example; // String | Don't Change The Value
        try {
            apiInstance.getJsonSpec(apiecoKey, apiKey);
        } catch (ApiException e) {
            System.err.println("Exception when calling FDCApi#getJsonSpec");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
String *apiecoKey = apiecoKey_example; // 
String *apiKey = apiKey_example; // Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)

FDCApi *apiInstance = [[FDCApi alloc] init];

// Returns this documentation in JSON format
[apiInstance getJsonSpecWith:apiecoKey
    apiKey:apiKey
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FoodDataCentralApi = require('food_data_central_api');
var defaultClient = FoodDataCentralApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['api_key'] = "Token"

var api = new FoodDataCentralApi.FDCApi()
var apiecoKey = apiecoKey_example; // {{String}} 
var apiKey = apiKey_example; // {{String}} Don't Change The Value

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getJsonSpec(apiecoKey, apiKey, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getJsonSpecExample
    {
        public void main()
        {

            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("api_key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("api_key", "Bearer");

            var apiInstance = new FDCApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var apiKey = apiKey_example;  // String | Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)

            try
            {
                // Returns this documentation in JSON format
                apiInstance.getJsonSpec(apiecoKey, apiKey);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FDCApi.getJsonSpec: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer');

$api_instance = new Swagger\Client\ApiFDCApi();
$apiecoKey = apiecoKey_example; // String | 
$apiKey = apiKey_example; // String | Don't Change The Value

try {
    $api_instance->getJsonSpec($apiecoKey, $apiKey);
} catch (Exception $e) {
    echo 'Exception when calling FDCApi->getJsonSpec: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FDCApi;

# Configure API key authorization: ApiKeyAuth
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FDCApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $apiKey = apiKey_example; # String | Don't Change The Value

eval { 
    $api_instance->getJsonSpec(apiecoKey => $apiecoKey, apiKey => $apiKey);
};
if ($@) {
    warn "Exception when calling FDCApi->getJsonSpec: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['api_key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FDCApi()
apiecoKey = apiecoKey_example # String | 
apiKey = apiKey_example # String | Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)

try: 
    # Returns this documentation in JSON format
    api_instance.get_json_spec(apiecoKey, apiKey)
except ApiException as e:
    print("Exception when calling FDCApi->getJsonSpec: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
api_key*
String
Don't Change The Value
Required

Responses

Status: default - JSON rendering of OpenAPI 3.0 specification


getYamlSpec

Returns this documentation in JSON format

The OpenAPI 3.0 specification for the FDC API rendered as YAML (YAML Ain't Markup Language)


/v1/yaml-spec

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/fooddata/fdc/v1/yaml-spec?api_key="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FDCApi;

import java.io.File;
import java.util.*;

public class FDCApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        FDCApi apiInstance = new FDCApi();
        String apiecoKey = apiecoKey_example; // String | 
        String apiKey = apiKey_example; // String | Don't Change The Value
        try {
            apiInstance.getYamlSpec(apiecoKey, apiKey);
        } catch (ApiException e) {
            System.err.println("Exception when calling FDCApi#getYamlSpec");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FDCApi;

public class FDCApiExample {

    public static void main(String[] args) {
        FDCApi apiInstance = new FDCApi();
        String apiecoKey = apiecoKey_example; // String | 
        String apiKey = apiKey_example; // String | Don't Change The Value
        try {
            apiInstance.getYamlSpec(apiecoKey, apiKey);
        } catch (ApiException e) {
            System.err.println("Exception when calling FDCApi#getYamlSpec");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
String *apiecoKey = apiecoKey_example; // 
String *apiKey = apiKey_example; // Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)

FDCApi *apiInstance = [[FDCApi alloc] init];

// Returns this documentation in JSON format
[apiInstance getYamlSpecWith:apiecoKey
    apiKey:apiKey
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FoodDataCentralApi = require('food_data_central_api');
var defaultClient = FoodDataCentralApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['api_key'] = "Token"

var api = new FoodDataCentralApi.FDCApi()
var apiecoKey = apiecoKey_example; // {{String}} 
var apiKey = apiKey_example; // {{String}} Don't Change The Value

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getYamlSpec(apiecoKey, apiKey, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getYamlSpecExample
    {
        public void main()
        {

            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("api_key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("api_key", "Bearer");

            var apiInstance = new FDCApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var apiKey = apiKey_example;  // String | Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)

            try
            {
                // Returns this documentation in JSON format
                apiInstance.getYamlSpec(apiecoKey, apiKey);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FDCApi.getYamlSpec: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer');

$api_instance = new Swagger\Client\ApiFDCApi();
$apiecoKey = apiecoKey_example; // String | 
$apiKey = apiKey_example; // String | Don't Change The Value

try {
    $api_instance->getYamlSpec($apiecoKey, $apiKey);
} catch (Exception $e) {
    echo 'Exception when calling FDCApi->getYamlSpec: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FDCApi;

# Configure API key authorization: ApiKeyAuth
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FDCApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $apiKey = apiKey_example; # String | Don't Change The Value

eval { 
    $api_instance->getYamlSpec(apiecoKey => $apiecoKey, apiKey => $apiKey);
};
if ($@) {
    warn "Exception when calling FDCApi->getYamlSpec: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['api_key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FDCApi()
apiecoKey = apiecoKey_example # String | 
apiKey = apiKey_example # String | Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)

try: 
    # Returns this documentation in JSON format
    api_instance.get_yaml_spec(apiecoKey, apiKey)
except ApiException as e:
    print("Exception when calling FDCApi->getYamlSpec: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
api_key*
String
Don't Change The Value
Required

Responses

Status: default - YAML rendering of OpenAPI 3.0 specification


postFoods

Fetches details for multiple food items using input FDC IDs

Retrieves a list of food items by a list of up to 20 FDC IDs. Optional format and nutrients can be specified. Invalid FDC ID's or ones that are not found are omitted and an empty set is returned if there are no matches.


/v1/foods

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/fooddata/fdc/v1/foods?api_key="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FDCApi;

import java.io.File;
import java.util.*;

public class FDCApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        FDCApi apiInstance = new FDCApi();
        FoodsCriteria body = ; // FoodsCriteria | 
        String apiecoKey = apiecoKey_example; // String | 
        String apiKey = apiKey_example; // String | Don't Change The Value
        try {
            array[null] result = apiInstance.postFoods(body, apiecoKey, apiKey);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FDCApi#postFoods");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FDCApi;

public class FDCApiExample {

    public static void main(String[] args) {
        FDCApi apiInstance = new FDCApi();
        FoodsCriteria body = ; // FoodsCriteria | 
        String apiecoKey = apiecoKey_example; // String | 
        String apiKey = apiKey_example; // String | Don't Change The Value
        try {
            array[null] result = apiInstance.postFoods(body, apiecoKey, apiKey);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FDCApi#postFoods");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
FoodsCriteria *body = ; // 
String *apiecoKey = apiecoKey_example; // 
String *apiKey = apiKey_example; // Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)

FDCApi *apiInstance = [[FDCApi alloc] init];

// Fetches details for multiple food items using input FDC IDs
[apiInstance postFoodsWith:body
    apiecoKey:apiecoKey
    apiKey:apiKey
              completionHandler: ^(NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FoodDataCentralApi = require('food_data_central_api');
var defaultClient = FoodDataCentralApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['api_key'] = "Token"

var api = new FoodDataCentralApi.FDCApi()
var body = ; // {{FoodsCriteria}} 
var apiecoKey = apiecoKey_example; // {{String}} 
var apiKey = apiKey_example; // {{String}} Don't Change The Value

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.postFoods(bodyapiecoKeyapiKey, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class postFoodsExample
    {
        public void main()
        {

            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("api_key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("api_key", "Bearer");

            var apiInstance = new FDCApi();
            var body = new FoodsCriteria(); // FoodsCriteria | 
            var apiecoKey = apiecoKey_example;  // String | 
            var apiKey = apiKey_example;  // String | Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)

            try
            {
                // Fetches details for multiple food items using input FDC IDs
                array[null] result = apiInstance.postFoods(body, apiecoKey, apiKey);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FDCApi.postFoods: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer');

$api_instance = new Swagger\Client\ApiFDCApi();
$body = ; // FoodsCriteria | 
$apiecoKey = apiecoKey_example; // String | 
$apiKey = apiKey_example; // String | Don't Change The Value

try {
    $result = $api_instance->postFoods($body, $apiecoKey, $apiKey);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FDCApi->postFoods: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FDCApi;

# Configure API key authorization: ApiKeyAuth
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FDCApi->new();
my $body = WWW::SwaggerClient::Object::FoodsCriteria->new(); # FoodsCriteria | 
my $apiecoKey = apiecoKey_example; # String | 
my $apiKey = apiKey_example; # String | Don't Change The Value

eval { 
    my $result = $api_instance->postFoods(body => $body, apiecoKey => $apiecoKey, apiKey => $apiKey);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FDCApi->postFoods: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['api_key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FDCApi()
body =  # FoodsCriteria | 
apiecoKey = apiecoKey_example # String | 
apiKey = apiKey_example # String | Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)

try: 
    # Fetches details for multiple food items using input FDC IDs
    api_response = api_instance.post_foods(body, apiecoKey, apiKey)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FDCApi->postFoods: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Body parameters
Name Description
body *
Query parameters
Name Description
api_key*
String
Don't Change The Value
Required

Responses

Status: 200 - List of Food details matching specified FDC ID's. Invalid FDC ID's or ones that are not found are omitted.

Status: 400 - bad input parameter


postFoodsList

Returns a paged list of foods, in the 'abridged' format

Retrieves a paged list of foods. Use the pageNumber parameter to page through the entire result set.


/v1/foods/list

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/fooddata/fdc/v1/foods/list?api_key="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FDCApi;

import java.io.File;
import java.util.*;

public class FDCApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        FDCApi apiInstance = new FDCApi();
        FoodListCriteria body = ; // FoodListCriteria | 
        String apiecoKey = apiecoKey_example; // String | 
        String apiKey = apiKey_example; // String | Don't Change The Value
        try {
            array[AbridgedFoodItem] result = apiInstance.postFoodsList(body, apiecoKey, apiKey);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FDCApi#postFoodsList");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FDCApi;

public class FDCApiExample {

    public static void main(String[] args) {
        FDCApi apiInstance = new FDCApi();
        FoodListCriteria body = ; // FoodListCriteria | 
        String apiecoKey = apiecoKey_example; // String | 
        String apiKey = apiKey_example; // String | Don't Change The Value
        try {
            array[AbridgedFoodItem] result = apiInstance.postFoodsList(body, apiecoKey, apiKey);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FDCApi#postFoodsList");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
FoodListCriteria *body = ; // 
String *apiecoKey = apiecoKey_example; // 
String *apiKey = apiKey_example; // Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)

FDCApi *apiInstance = [[FDCApi alloc] init];

// Returns a paged list of foods, in the 'abridged' format
[apiInstance postFoodsListWith:body
    apiecoKey:apiecoKey
    apiKey:apiKey
              completionHandler: ^(array[AbridgedFoodItem] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FoodDataCentralApi = require('food_data_central_api');
var defaultClient = FoodDataCentralApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['api_key'] = "Token"

var api = new FoodDataCentralApi.FDCApi()
var body = ; // {{FoodListCriteria}} 
var apiecoKey = apiecoKey_example; // {{String}} 
var apiKey = apiKey_example; // {{String}} Don't Change The Value

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.postFoodsList(bodyapiecoKeyapiKey, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class postFoodsListExample
    {
        public void main()
        {

            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("api_key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("api_key", "Bearer");

            var apiInstance = new FDCApi();
            var body = new FoodListCriteria(); // FoodListCriteria | 
            var apiecoKey = apiecoKey_example;  // String | 
            var apiKey = apiKey_example;  // String | Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)

            try
            {
                // Returns a paged list of foods, in the 'abridged' format
                array[AbridgedFoodItem] result = apiInstance.postFoodsList(body, apiecoKey, apiKey);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FDCApi.postFoodsList: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer');

$api_instance = new Swagger\Client\ApiFDCApi();
$body = ; // FoodListCriteria | 
$apiecoKey = apiecoKey_example; // String | 
$apiKey = apiKey_example; // String | Don't Change The Value

try {
    $result = $api_instance->postFoodsList($body, $apiecoKey, $apiKey);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FDCApi->postFoodsList: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FDCApi;

# Configure API key authorization: ApiKeyAuth
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FDCApi->new();
my $body = WWW::SwaggerClient::Object::FoodListCriteria->new(); # FoodListCriteria | 
my $apiecoKey = apiecoKey_example; # String | 
my $apiKey = apiKey_example; # String | Don't Change The Value

eval { 
    my $result = $api_instance->postFoodsList(body => $body, apiecoKey => $apiecoKey, apiKey => $apiKey);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FDCApi->postFoodsList: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['api_key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FDCApi()
body =  # FoodListCriteria | 
apiecoKey = apiecoKey_example # String | 
apiKey = apiKey_example # String | Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)

try: 
    # Returns a paged list of foods, in the 'abridged' format
    api_response = api_instance.post_foods_list(body, apiecoKey, apiKey)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FDCApi->postFoodsList: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Body parameters
Name Description
body *
Query parameters
Name Description
api_key*
String
Don't Change The Value
Required

Responses

Status: 200 - List of foods for the requested page

Status: 400 - bad input parameter


postFoodsSearch

Returns a list of foods that matched search (query) keywords

Search for foods using keywords. Results can be filtered by dataType and there are options for result page sizes or sorting.


/v1/foods/search

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/fooddata/fdc/v1/foods/search?api_key="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FDCApi;

import java.io.File;
import java.util.*;

public class FDCApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        FDCApi apiInstance = new FDCApi();
        FoodSearchCriteria body = ; // FoodSearchCriteria | The query string may also include standard [search operators](https://fdc.nal.usda.gov/help.html#bkmk-2)
        String apiecoKey = apiecoKey_example; // String | 
        String apiKey = apiKey_example; // String | Don't Change The Value
        try {
            array[SearchResult] result = apiInstance.postFoodsSearch(body, apiecoKey, apiKey);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FDCApi#postFoodsSearch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FDCApi;

public class FDCApiExample {

    public static void main(String[] args) {
        FDCApi apiInstance = new FDCApi();
        FoodSearchCriteria body = ; // FoodSearchCriteria | The query string may also include standard [search operators](https://fdc.nal.usda.gov/help.html#bkmk-2)
        String apiecoKey = apiecoKey_example; // String | 
        String apiKey = apiKey_example; // String | Don't Change The Value
        try {
            array[SearchResult] result = apiInstance.postFoodsSearch(body, apiecoKey, apiKey);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FDCApi#postFoodsSearch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
FoodSearchCriteria *body = ; // The query string may also include standard [search operators](https://fdc.nal.usda.gov/help.html#bkmk-2)
String *apiecoKey = apiecoKey_example; // 
String *apiKey = apiKey_example; // Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)

FDCApi *apiInstance = [[FDCApi alloc] init];

// Returns a list of foods that matched search (query) keywords
[apiInstance postFoodsSearchWith:body
    apiecoKey:apiecoKey
    apiKey:apiKey
              completionHandler: ^(array[SearchResult] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FoodDataCentralApi = require('food_data_central_api');
var defaultClient = FoodDataCentralApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['api_key'] = "Token"

var api = new FoodDataCentralApi.FDCApi()
var body = ; // {{FoodSearchCriteria}} The query string may also include standard [search operators](https://fdc.nal.usda.gov/help.html#bkmk-2)
var apiecoKey = apiecoKey_example; // {{String}} 
var apiKey = apiKey_example; // {{String}} Don't Change The Value

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.postFoodsSearch(bodyapiecoKeyapiKey, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class postFoodsSearchExample
    {
        public void main()
        {

            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("api_key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("api_key", "Bearer");

            var apiInstance = new FDCApi();
            var body = new FoodSearchCriteria(); // FoodSearchCriteria | The query string may also include standard [search operators](https://fdc.nal.usda.gov/help.html#bkmk-2)
            var apiecoKey = apiecoKey_example;  // String | 
            var apiKey = apiKey_example;  // String | Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)

            try
            {
                // Returns a list of foods that matched search (query) keywords
                array[SearchResult] result = apiInstance.postFoodsSearch(body, apiecoKey, apiKey);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FDCApi.postFoodsSearch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'Bearer');

$api_instance = new Swagger\Client\ApiFDCApi();
$body = ; // FoodSearchCriteria | The query string may also include standard [search operators](https://fdc.nal.usda.gov/help.html#bkmk-2)
$apiecoKey = apiecoKey_example; // String | 
$apiKey = apiKey_example; // String | Don't Change The Value

try {
    $result = $api_instance->postFoodsSearch($body, $apiecoKey, $apiKey);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FDCApi->postFoodsSearch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FDCApi;

# Configure API key authorization: ApiKeyAuth
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FDCApi->new();
my $body = WWW::SwaggerClient::Object::FoodSearchCriteria->new(); # FoodSearchCriteria | The query string may also include standard [search operators](https://fdc.nal.usda.gov/help.html#bkmk-2)
my $apiecoKey = apiecoKey_example; # String | 
my $apiKey = apiKey_example; # String | Don't Change The Value

eval { 
    my $result = $api_instance->postFoodsSearch(body => $body, apiecoKey => $apiecoKey, apiKey => $apiKey);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FDCApi->postFoodsSearch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['api_key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FDCApi()
body =  # FoodSearchCriteria | The query string may also include standard [search operators](https://fdc.nal.usda.gov/help.html#bkmk-2)
apiecoKey = apiecoKey_example # String | 
apiKey = apiKey_example # String | Don't Change The Value (default to 0VemvF7RetM9c3eqaowR5a8xy83u7gKspRNkR8dh)

try: 
    # Returns a list of foods that matched search (query) keywords
    api_response = api_instance.post_foods_search(body, apiecoKey, apiKey)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FDCApi->postFoodsSearch: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Body parameters
Name Description
body *
Query parameters
Name Description
api_key*
String
Don't Change The Value
Required

Responses

Status: 200 - List of foods that matched search terms

Status: 400 - bad input parameter