# USDA FoodData Central Food Search

> USDA FoodData Central Food Search is a paid API for AI agents from api.companyrecords-api.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-24).

Searches USDA FoodData Central for food items by name, returning FDC ID, description, data type, brand owner, and publication date (no nutrient values).

## Facts

- Endpoint: GET https://api.companyrecords-api.workers.dev/api/gov/usda-fooddata-central?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/usda-fooddata-central-food-search-e25f6088
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6DpUNmrfrvcqTTjrLqh5V

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability usda-fooddata-central-food-search-e25f6088
```

Example prompt: Search the USDA FoodData Central database for 'cheddar cheese' and show me up to 5 results with their FDC IDs, data types, and brand owners.

## When to prefer this

Use this endpoint when you need to identify foods in the USDA FoodData Central database by name, retrieve FDC IDs, check data types (Branded, Foundation, SR Legacy), or find brand owner information. It is ideal for food catalog enrichment, compliance lookups, or resolving a food name to a canonical USDA identifier. Do not use this if you need nutrient values — this endpoint returns search metadata only, not nutritional content.

## Known failure modes

- Query string shorter than 2 or longer than 60 characters returns a validation error
- Limit outside 1-10 range causes an error
- No matching foods found returns an empty foods array with totalHits of 0
- USDA FoodData Central upstream API unavailable causes a service error
- Network timeout from the upstream USDA API

## How this service works

Pay-per-call company registry, government, legal and B2B data tools for AI agents, from official registers and public sources. Payment: x402, USDC on Base, Solana, Arc, Polygon, Arbitrum, Monad, World Chain, Optimism, Avalanche, Celo or Stellar, or RLUSD/XRP on the XRP Ledger. No signup, no API key; a failed call is not charged.

## Output

Returns a JSON object with a list of food items (each with fdcId, dataType, brandOwner, description, and publishedDate), the original query string, the source URL, the timestamp of the check, and totalHits indicating how many records exist in the database.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "query"
     ],
     "properties": {
      "limit": {
       "type": "string",
       "description": "Foods to return, 1 to 10 (default 5)"
      },
      "query": {
       "type": "string",
       "description": "Food name, 2 to 60 characters"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "foods": [
   {
    "fdcId": 454004,
    "dataType": "Branded",
    "brandOwner": "TREECRISP 2 GO",
    "description": "APPLE",
    "publishedDate": "2019-04-01"
   },
   {
    "fdcId": 2117388,
    "dataType": "Branded",
    "brandOwner": "Associated Wholesale Grocers, Inc.",
    "description": "APPLE",
    "publishedDate": "2021-10-28"
   }
  ],
  "query": "apple",
  "source": "https://api.nal.usda.gov/fdc/v1/foods/search",
  "checkedAt": "2026-10-23T09:37:09.076Z",
  "totalHits": 25775
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/usda-fooddata-central-food-search-e25f6088/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.companyrecords-api.workers.dev](https://www.zero.xyz/host/api.companyrecords-api.workers.dev/llms.txt)
