← All Topics / global

/api/v1/ingredient_lookup Endpoint Specification

ingredient_lookup_endpoint_spec

global 800 tok en 2026-07-18

/api/v1/ingredient_lookup Endpoint Specification

Purpose

Cross-standard ingredient lookup for pet food regulatory compliance.

Currently supports 3 data sources with different data types (all local files, verified 2026-07-19):

  • AAFCO Ch6 (2024 OP): Ingredient definitions — 650 entries across 34 numeric chapters + tentative codes (pdf-parsed/us-2026/aafco_ch6_2024_parsed.json, verbatim-backed by pdf-raw/aafco_ch6_2024.txt)
  • EU FMR Reg68: Feed products — 4,704 products in 13 category codes incl. 1,164 Unknown (pdf-parsed/eu_fmr_products_20260714_v4.json)
  • CFIA FeedList: Registered feed descriptions — 7,366 entries, livestock species only (pdf-parsed/ca-2026/cfia_approved/cfia_approved_ingredients.json)

Endpoint Signature

`` GET /api/v1/ingredient_lookup?query=<keyword>&standard=<standard>&category=<category>&limit=<limit> ``

Query Parameters

ParameterTypeRequiredDescription
querystringYesSearch keyword (e.g. "barley", "salmon", "whey")
standardstringNoFilter by standard: aafco / eu_fmr / cfia / all (default)
categorystringNoFilter by cross-category (draft mapping, see 02_cross_index_overview)
limitintNoMax results (default 50, max 500)

Response Format (illustrative — all entries below are REAL records)

``json { "query": "salmon", "results": [ { "standard": "EU_FMR_Reg68", "reg68_code": "10_Fish", "id": "002444-EN", "name": "Salmon Protein Hydrolysate 95% (HBC-SPH 95%)" }, { "standard": "EU_FMR_Reg68", "reg68_code": "10_Fish", "id": "009865-EN", "name": "Dehydrated salmon meat proteins" }, { "standard": "AAFCO_Ch6", "code": "87.36", "name": "Phaffia Yeast (color additive for salmonid fish feed)", "note": "AAFCO 2024 parsed set has no salmon-ingredient definition; matches are use-context mentions" } ], "total_results": 3, "standards_searched": ["EU_FMR_Reg68", "AAFCO_Ch6", "CFIA_FeedList"] } ``

Verified Data Profiles

AAFCO Ch6 2024 (650 entries) — chapter → content (verified against parsed entries)

ChaptersContentCount
12,42,69,75,78,93,48Cereal grains & co-products (barley, grain sorghum, oats, rice, rye, wheat, corn)79
15,27Brewers/distillers co-products16
24,71,84Oil-seed & plant-protein meals (cottonseed, canola/other, soybean)60
51Fish & marine18
54Milk products (whey, casein, buttermilk…)40
63Molasses & beet products17
57Minerals139
33Fats & oils21
36Fermentation products15
96Yeast13
90Vitamins42
66Non-protein nitrogen (urea, biuret)5
30Enzymes3
73Chemical preservatives36
40,45,81,60Pomace/forage/screenings/miscellaneous (60.x incl. kelp, pulses, BSFL)62
21Citrus co-products3
87Special-purpose & color additives (mixed)53
16,18,22,70,74,TParse artifacts & tentative codes28
Total650

Note: the classic AAFCO chapter 9 (animal protein products) is NOT present in the parsed 2024 set — do not promise animal-meal definitions in responses.

EU FMR Reg68 (4,704 products) — category code → count (verified)

Unknown 1164 · 6_Forages 815 · 11_Minerals 526 · 9_Animal_products 362 · 7_Other_plants 327 · 4_Tubers 311 · 3_Legumes 309 · 2_Oil_seeds 245 · 1_Cereals 185 · 12_Fermentation 156 · 8_Milk 118 · 5_Other_seeds 101 · 10_Fish 85

CFIA FeedList (7,366 entries)

Livestock feed registry extracted from CFIA FeedList datalists. Species: Layer Chicken, Broiler Chicken, Turkey, Swine, Dairy, Beef, Sheep, Fish, Minor Species, Livestock and Multiple Species — no dog/cat entries; do not return CFIA results for pet-species queries without this caveat.

Implementation Notes

  1. AAFCO Ch6 lookup: Search name+definition fields in the 650-entry JSON
  2. EU FMR lookup: Search name field in 4,704 products (filter by reg68_category_code)
  3. CFIA lookup: Search name field in 7,366 entries (filter by feed_type + species)
  4. Query latency target: < 200ms (12,720 total entries, in-memory index)

Data Type Heterogeneity

These 3 standards are NOT 1:1 mappable:

  • AAFCO Ch6 = ingredient definitions (what an ingredient IS)
  • EU FMR = registered feed products
  • CFIA FeedList = registered livestock feeds/brands

Cross-mapping is at the category level (draft), not the ingredient level. The planned cross_standard_ingredient_index.json does NOT exist yet — see 02_cross_index_overview for current status.

---

*Last updated: 2026-07-19 (verified against local data files)*

Sources

  • cross_standard_ingredient_index.json