food

Search foods by text. Return maximum of 20 items

get/foods/search_by_text

Query parameters

search_textstring required
context_user_idstring
extended_queryboolean
food_name_onlyboolean
primary_data_origin_codestring

When set, only return foods whose primary_data_origin_code matches (e.g. cnf for recipe ingredient pickers).

Response

successful operation

search_idinteger
search_textstring required

Example response

{
  "results": [
    {
      "nutrient_overrides": {
        "aa_patient": {
          "ontology": {
            "id": 42,
            "levels": [
              "food"
            ]
          }
        },
        "bb_reviewer": {
          "ontology": {
            "id": 42,
            "levels": [
              "food"
            ]
          }
        },
        "cc_external": {
          "ontology": {
            "id": 42,
            "levels": [
              "food"
            ]
          }
        },
        "dd_estimate": {
          "ontology": {
            "id": 42,
            "levels": [
              "food"
            ]
          }
        },
        "ee_validation": {
          "ontology": {
            "id": 42,
            "levels": [
              "food"
            ]
          }
        }
      }
    }
  ]
}

Changes