Quantcast
Channel: User Kamil Maciorowski - Super User
Viewing all articles
Browse latest Browse all 837

Comment by Kamil Maciorowski on How can I fetch a single nutrition result from USDA Food API?

$
0
0
(1) If in a shell, single-quote the URL, otherwise & will be treated as command terminator (and there may be other issues). (2) Passing the query with double-quotes hopefully makes the search consider Cheddar Cheese and not the two words separately. I believe it will be query=%22Cheddar%20Cheese%22 (3): In the output I notice "requireAllWords":false; in case you do want to use multiple words, try with search?api_key=DEMO_KEY&requireAllWords=true&query=…. // All this is still not enough to get exactly one result, as the search examines many fields like description and such.

Viewing all articles
Browse latest Browse all 837

Trending Articles