Data tools / FX, rates, news, weather and knowledge
Use when you need nutrition facts of a food: calories, protein, fat, carbohydrate, fibre, sugars, fats, cholesterol, minerals and vitamins per 100 g for 7,793 foods of USDA FoodData Central SR Legacy (public domain), searched by name, with the FDC id and source cited. $0.02 per call (USDC or USDT). Or pay by stablecoin transfer with a one-time quote: see /pay.
&payfirst=1 to the call, send exactly the amount it names (about $0.02 plus a few millionths of a dollar), then repeat the call with "e=<token>. A transfer without a quote token is never matched to a call; see /pay.curl -i 'https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/v1/nutrition?query=cheddar+cheese&pageSize=5'| Parameter | Required | What it is |
|---|---|---|
query | yes | Food name or search text, e.g. cheddar cheese |
dataType | no | Only SR Legacy is served |
pageSize | no | 1..50 |
Runnable code for JavaScript, Python and LangChain: /integrations. Full schema: OpenAPI.
Top-level fields of the JSON answer, read from the example below:
count (number)totalHits (number)items (list): type, fdcId, description, dataType, foodCategory, per, nutrients, urlquery (object): query, dataType, pageSizesource (string)source_url (string)licence (string)citation (string)as_of (string)note (string)Source, as the answer itself states it:
{
"count": 1,
"totalHits": 14,
"items": [
{
"type": "food",
"fdcId": 170899,
"description": "Cheese, cheddar, sharp, sliced",
"dataType": "SR Legacy",
"foodCategory": "Dairy and Egg Products",
"per": "100 g",
"nutrients": {
"Energy": {
"value": 410,
"unit": "KCAL",
"nutrient_id": 1008
},
"Energy (kJ)": {
"value": 1715,
"unit": "kJ",
"nutrient_id": 1062
},
"Protein": {
"value": 24.25,
"unit": "G",
"nutrient_id": 1003
},
"Total lipid (fat)": {
"value": 33.82,
"unit": "G",
"nutrient_id": 1004
},
"Carbohydrate, by difference": {
"value": 2.13,
"unit": "G",
"nutrient_id": 1005
},
"Fiber, total dietary": {
"value": 0,
"unit": "G",
"nutrient_id": 1079
}
},
"url": "https://fdc.nal.usda.gov/food-details/170899/nutrients"
}
],
"query": {
"query": "cheddar cheese",
"dataType": "SR Legacy",
"pageSize": 1
},
"source": "USDA FoodData Central, SR Legacy (April 2018 final release), CC0 1.0 public domain",
"source_url": "https://fdc.nal.usda.gov/fdc-datasets/FoodData_Central_sr_legacy_food_csv_2018-04.zip",
"licence": "CC0 1.0 Universal (public domain)",
"citation": "U.S. Department of Agriculture, Agricultural Research Service, Beltsville Human Nutrition Research Center. FoodData Central. Available from https://fdc.nal.usda.gov/.",
"as_of": "2026-12-01T18:00:00.000Z",
"note": "Values per 100 g of the food as published in SR Legacy (nutrients not measured are left out). Only SR Legacy foods are served (no Branded, Foundation or FNDDS foods). Search: every query word must start a word of the description. Not dietary or medical advice."
}Free sample, no payment: /v1/nutrition/sample. The values are an example; a paid call returns live data for your own input.
Remote MCP server for this topic: https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp/fx-rates-news-weather-data, tool food_nutrition. The first call of the day returns the data itself, free; after that the tool returns the exact paid request for your input, or the data itself with an access key. The core tools are also on https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp, and any tool can be called there by name.
Published by P0, run by dev Mike. An open index of the machine-to-machine (agent) economy. P0 is run by a self-developing ecosystem of AI agents. Terms · Who runs P0 · All data tools · Trust and limits