USDA Agricultural Research Service (ARS) Food Search API

Search foods by keywords or other criteria

Operations 2

GET /foods/search Search Foods by Keywords #
POST /foods/search Search Foods by Keywords (POST) #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/usda-agricultural-research-service-ars--food-search-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

usda-agricultural-research-service-ars--food-search-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: USDA FoodData Central Food Search API
  description: The USDA FoodData Central (FDC) API provides access to an integrated data system with extended nutritional and food component data. Data types include Foundation Foods, SR Legacy, Survey Foods (FNDDS), Branded Foods, and Experimental Foods. Requires a free data.gov API key.
  version: '1.0'
  contact:
    name: USDA National Agricultural Library - FoodData Central
    url: https://fdc.nal.usda.gov/api-guide/
  license:
    name: CC0 1.0 Universal
    url: https://creativecommons.org/publicdomain/zero/1.0/
servers:
- url: https://api.nal.usda.gov/fdc/v1
security:
- ApiKeyQuery: []
tags:
- name: Food Search
  description: Search foods by keywords or other criteria
paths:
  /foods/search:
    get:
      tags:
      - Food Search
      operationId: searchFoodsGet
      summary: Search Foods by Keywords
      description: Returns foods matching the search query. Supports boolean AND/OR operators. Returns up to 50 results per page.
      parameters:
      - name: query
        in: query
        required: true
        description: One or more keywords to search for
        schema:
          type: string
        example: cheddar cheese
      - name: dataType
        in: query
        description: Filter by data type(s)
        schema:
          type: array
          items:
            type: string
            enum:
            - Foundation
            - Branded
            - Survey (FNDDS)
            - SR Legacy
            - Experimental
        style: form
        explode: false
      - name: pageSize
        in: query
        description: Number of results per page (max 200)
        schema:
          type: integer
          default: 50
          maximum: 200
      - name: pageNumber
        in: query
        schema:
          type: integer
          default: 1
      - name: sortBy
        in: query
        schema:
          type: string
          enum:
          - dataType.keyword
          - lowercaseDescription.keyword
          - fdcId
          - publishedDate
      - name: sortOrder
        in: query
        schema:
          type: string
          enum:
          - asc
          - desc
      - name: brandOwner
        in: query
        description: Filter by brand owner (Branded Foods only)
        schema:
          type: string
      - name: api_key
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Food search results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResult'
        '400':
          description: Bad request
    post:
      tags:
      - Food Search
      operationId: searchFoodsPost
      summary: Search Foods by Keywords (POST)
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                  description: Search keywords
                dataType:
                  type: array
                  items:
                    type: string
                pageSize:
                  type: integer
                  default: 50
                pageNumber:
                  type: integer
                  default: 1
                sortBy:
                  type: string
                sortOrder:
                  type: string
                brandOwner:
                  type: string
      responses:
        '200':
          description: Food search results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResult'
components:
  schemas:
    SearchResult:
      type: object
      description: Food search response
      properties:
        totalHits:
          type: integer
          description: Total matching foods
        currentPage:
          type: integer
        totalPages:
          type: integer
        foods:
          type: array
          items:
            $ref: '#/components/schemas/SearchResultFood'
    AbridgedFoodNutrient:
      type: object
      properties:
        nutrientId:
          type: integer
        nutrientName:
          type: string
        nutrientNumber:
          type: string
        unitName:
          type: string
        value:
          type: number
    SearchResultFood:
      type: object
      properties:
        fdcId:
          type: integer
        description:
          type: string
        dataType:
          type: string
        publishedDate:
          type: string
          format: date
        brandOwner:
          type:
          - string
          - 'null'
        brandName:
          type:
          - string
          - 'null'
        ingredients:
          type:
          - string
          - 'null'
        foodNutrients:
          type: array
          items:
            $ref: '#/components/schemas/AbridgedFoodNutrient'
        foodCategory:
          type:
          - string
          - 'null'
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api_key
      description: data.gov API key. Register at https://api.data.gov/signup/
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-Api-Key