{"openapi":"3.1.0","info":{"title":"USDA Food Data Central (BYOK) API","version":"0.1.0","description":"USDA Food Data Central (BYOK) lets an AI assistant read your own USDA Food Data Central data through the USDA Food Data Central API with a key you supply (api.data.gov API key for FoodData Central). Read-only: 6 tools (search_foods, search_branded_foods, get_food, get_food_nutrients, get_foods, list_foods). The BYOK key travels with each request, is used for that one call only and is never...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-fooddatacentral.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-fooddatacentral/docs"},"termsOfService":"https://connectorbay.com/byok-fooddatacentral/terms"},"servers":[{"url":"https://byok-fooddatacentral.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-fooddatacentral/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/search_foods":{"post":{"operationId":"search_foods","summary":"Search FoodData Central foods by keywords, optionally restricted to a data type (Branded, Foundation, Survey (FNDDS), SR","description":"Search FoodData Central foods by keywords, optionally restricted to a data type (Branded, Foundation, Survey (FNDDS), SR Legacy); returns id, description, brand, ingredients and the main nutrient values. Use for \"How much protein is in cheddar cheese\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"query":{"description":"Search terms, for example 'cheddar cheese'.","maxLength":200,"title":"Query","type":"string"},"data_type":{"anyOf":[{"enum":["Branded","Foundation","Survey (FNDDS)","SR Legacy"],"type":"string"},{"type":"null"}],"default":null,"description":"Only this data type: Branded, Foundation, Survey (FNDDS) or SR Legacy.","title":"Data Type"},"brand_owner":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only foods of this brand owner (applies to Branded foods).","title":"Brand Owner"},"page_size":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"Results per page, 1 to 200.","title":"Page Size"},"page_number":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Page number as the service defines it; omit for the first page.","title":"Page Number"},"sort_by":{"anyOf":[{"enum":["dataType.keyword","lowercaseDescription.keyword","fdcId","publishedDate"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort field: dataType.keyword, lowercaseDescription.keyword, fdcId or publishedDate.","title":"Sort By"},"sort_order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"asc or desc; applies only when sort_by is given.","title":"Sort Order"}},"required":["query"],"title":"search_foodsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_branded_foods":{"post":{"operationId":"search_branded_foods","summary":"Search packaged (branded) foods by keywords and brand owner; returns id, description, brand owner, barcode (GTIN/UPC), i","description":"Search packaged (branded) foods by keywords and brand owner; returns id, description, brand owner, barcode (GTIN/UPC), ingredients and nutrient values. Use for \"Find Kellogg's cereals with their ingredients\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"query":{"description":"Search terms, for example 'corn flakes'.","maxLength":200,"title":"Query","type":"string"},"data_type":{"anyOf":[{"const":"Branded","type":"string"},{"type":"null"}],"default":"Branded","description":"Fixed value Branded: only packaged foods.","title":"Data Type"},"brand_owner":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only foods of this brand owner, for example Kellogg Company.","title":"Brand Owner"},"page_size":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"Results per page, 1 to 200.","title":"Page Size"},"page_number":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Page number as the service defines it; omit for the first page.","title":"Page Number"}},"required":["query"],"title":"search_branded_foodsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_food":{"post":{"operationId":"get_food","summary":"Get one food by id: description, data type, brand, ingredients, serving size, category and the full list of nutrient amo","description":"Get one food by id: description, data type, brand, ingredients, serving size, category and the full list of nutrient amounts. Use for \"Show the nutrients of food 534358\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"fdc_id":{"description":"FoodData Central food id (fdcId) as returned by search_foods, for example 534358.","maxLength":12,"title":"Fdc Id","type":"string"},"format":{"anyOf":[{"enum":["abridged","full"],"type":"string"},{"type":"null"}],"default":"abridged","description":"abridged for the main fields, full for every field (full answers are large).","title":"Format"},"nutrients":{"anyOf":[{"maxLength":120,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated nutrient numbers (at most 25) to keep in the answer, for example 203,204,205,208; omit for all nutrients.","title":"Nutrients"}},"required":["fdc_id"],"title":"get_foodArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_food_nutrients":{"post":{"operationId":"get_food_nutrients","summary":"Get only chosen nutrients of one food by id, given nutrient numbers, with the food's description and serving size. Use f","description":"Get only chosen nutrients of one food by id, given nutrient numbers, with the food's description and serving size. Use for \"What are the nutrients 203, 204, 205 and 208 of food 534358\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"fdc_id":{"description":"FoodData Central food id (fdcId) as returned by search_foods, for example 534358.","maxLength":12,"title":"Fdc Id","type":"string"},"nutrients":{"description":"Comma-separated nutrient numbers (at most 25), for example 203,204,205,208.","maxLength":120,"title":"Nutrients","type":"string"},"format":{"anyOf":[{"const":"abridged","type":"string"},{"type":"null"}],"default":"abridged","description":"Fixed value abridged.","title":"Format"}},"required":["fdc_id","nutrients"],"title":"get_food_nutrientsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_foods":{"post":{"operationId":"get_foods","summary":"Get several foods at once by a list of ids, in abridged or full format. Use for \"Compare foods 534358 and 373052\".","description":"Get several foods at once by a list of ids, in abridged or full format. Use for \"Compare foods 534358 and 373052\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"fdc_ids":{"description":"Comma-separated food ids (fdcId), for example 534358,373052.","maxLength":200,"title":"Fdc Ids","type":"string"},"format":{"anyOf":[{"enum":["abridged","full"],"type":"string"},{"type":"null"}],"default":"abridged","description":"abridged for the main fields, full for every field (full answers are large).","title":"Format"},"nutrients":{"anyOf":[{"maxLength":120,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated nutrient numbers (at most 25) to keep in the answer, for example 203,204,205,208; omit for all nutrients.","title":"Nutrients"}},"required":["fdc_ids"],"title":"get_foodsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_foods":{"post":{"operationId":"list_foods","summary":"List foods in abridged form page by page, optionally by data type and sort order; no keywords needed. Use for \"List the ","description":"List foods in abridged form page by page, optionally by data type and sort order; no keywords needed. Use for \"List the first Foundation foods by id\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"data_type":{"anyOf":[{"enum":["Branded","Foundation","Survey (FNDDS)","SR Legacy"],"type":"string"},{"type":"null"}],"default":null,"description":"Only this data type: Branded, Foundation, Survey (FNDDS) or SR Legacy.","title":"Data Type"},"page_size":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"Results per page, 1 to 200.","title":"Page Size"},"page_number":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Page number as the service defines it; omit for the first page.","title":"Page Number"},"sort_by":{"anyOf":[{"enum":["dataType.keyword","lowercaseDescription.keyword","fdcId","publishedDate"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort field: dataType.keyword, lowercaseDescription.keyword, fdcId or publishedDate.","title":"Sort By"},"sort_order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"asc or desc; applies only when sort_by is given.","title":"Sort Order"}},"title":"list_foodsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}