Skip to content

Instantly share code, notes, and snippets.

Matt Silverman mattsilv

Block or report user

Report or block mattsilv

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:4d89d5797b2c7dac7b99da04a9701297
Verifying my Blockstack ID is secured with the address 1KYH9LSLa4SLDzVXDXHiLpYVg38Q9a3ghm https://explorer.blockstack.org/address/1KYH9LSLa4SLDzVXDXHiLpYVg38Q9a3ghm
@mattsilv
mattsilv / example.md
Last active Aug 6, 2018
Nutritionix API v2 - Example GET Request to /search/item Endpoint
View example.md
@mattsilv
mattsilv / example.md
Last active Dec 13, 2016
Nutritionix API v2: Natural Exercise Endpoint Sample
View example.md

POST /v2/natural/exercise

headers:

  • x-app-id
  • x-app-key
  • Content-Type: application/json

POST request body:

{
 "query":"ran 3 miles",
@mattsilv
mattsilv / autocomplete.md
Last active May 16, 2016
Nutritionix API v2: Autocomplete
View autocomplete.md

API V2: Autocomplete

The V2 autocomplete API aims to allow users the convenience of "as you type" suggestions.

HTTP GET to /v2/autocomplete

To make perform a search, make an HTTP GET request to the /v2/autocomplete endpoint.

GET Parameters

@mattsilv
mattsilv / nutritionix-usda.md
Last active May 22, 2017
Nutritionix API USDA Documentation
View nutritionix-usda.md

USDA Getting Started

Example NXQL Queries

// returns items that are not restaurants and nf_serving_weight_grams is not null
// includes usda_fields in the results so items that contain those fields will return
// fields.usda_fields
{
  "fields":["item_name","brand_name","keywords","usda_fields"],
  "query":"celery",
View photo-upload.md
View nql-example.md

Nutritionix Querying Language (NXQL)

NXQL allows developers to write more advanced queries against our data pool. Examples of what you can do with an advanced query:

  • Filter items by their type (show ONLY USDA items or ONLY CPG items)
  • Filter nutrient ranges (>100 calories AND <500 calories)

All requests are POST and require a valid JSON object be sent to https://api.nutritionix.com/v1_1/search You can paste any of the below JSON examples into this curl request and they will retrieve results assuming you have added your appKey, and appId.

Request Requirements

You can’t perform that action at this time.