{"uid":"cap_twgqBffyARrzHL8qTneyR","slug":"food-memoryapi-org-9a048327","name":"USDA FDC Food Nutrition Comparator","description":"USDA FoodData Central nutrition data API with x402 micropayments. Search foods, get full nutrition profiles, and compare multiple foods side-by-side.","url":"https://food.memoryapi.org/x402/food/compare","method":"GET","headers":{},"bodySchema":null,"responseSchema":{"example":{"foods":[{"id":173950,"name":"Avocados","protein":2,"calories":160}],"success":true,"winner_by_protein":"Chicken, breast","winner_by_calories":"Avocados"}},"example":{"request":{"ids":"171477,175167,172476"},"response":{"count":3,"foods":[{"id":171477,"fat":null,"name":"Chicken, broilers or fryers, breast, meat only, cooked, roasted","brand":null,"carbs":null,"fiber":null,"sodium":null,"protein":null,"calories":null},{"id":175167,"fat":null,"name":"Fish, salmon, Atlantic, farmed, raw","brand":null,"carbs":null,"fiber":null,"sodium":null,"protein":null,"calories":null},{"id":172476,"fat":null,"name":"Tofu, raw, regular, prepared with calcium sulfate","brand":null,"carbs":null,"fiber":null,"sodium":null,"protein":null,"calories":null}],"source":"USDA FoodData Central","success":true,"winner_by_protein":null,"winner_by_calories":null}},"exampleRequest":{"ids":"171477,175167,172476"},"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_KBjsVCtHmz2BIY_h8KZxZ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compare nutrition profiles of multiple foods side-by-side using their USDA FoodData Central (FDC) IDs.","exampleAgentPrompt":"Compare the nutrition side-by-side for chicken breast (FDC ID 171477), Atlantic salmon (FDC ID 175167), and firm tofu (FDC ID 172476) — I want to see macros, key vitamins, and minerals for all three at once.","exampleUseCases":null,"resultDescription":"A side-by-side nutritional comparison of multiple foods identified by USDA FDC IDs, showing macronutrients (protein, fat, carbohydrates, calories), vitamins, and minerals for each food in a structured comparative format.","failureModes":["Invalid or non-existent FDC ID returns an error or empty result for that item","Fewer than two FDC IDs provided may result in a validation error","Payment not processed (x402 payment required) results in 402 response","Rate limiting or service unavailability returns 429 or 5xx errors","FDC IDs for foods not in the USDA database return null data for those entries"],"whenToPreferThis":"Use this endpoint when you need to compare nutrition across multiple foods simultaneously using their USDA FDC IDs. It is ideal when the user wants a side-by-side breakdown rather than individual lookups, saving multiple API calls. Prefer this over the single-food profile endpoint when comparing two or more options for dietary, fitness, or meal planning decisions.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:36:12.635Z","isFirstParty":false}