USDA Agricultural Research Service (ARS) API Rules

Spectral linting rules defining API design standards and conventions for USDA Agricultural Research Service (ARS).

7 Rules error 2 warn 3 info 2
View Rules File View on GitHub

Rule Categories

usda

Rules

error
usda-ars-operation-summary
All operations must have a summary
$.paths[*][*]
warn
usda-ars-operation-tags
All operations must have tags
$.paths[*][*]
error
usda-ars-get-200-response
GET operations must define a 200 response
$.paths[*].get
info
usda-ars-api-key-authentication
FoodData Central API requires api_key parameter
$.paths[*].get.parameters[*]
warn
usda-ars-path-params-documented
Path parameters must have descriptions
$.paths[*][*].parameters[?(@.in == 'path')]
info
usda-ars-license-info
APIs should document the CC0 license
$.info
warn
usda-ars-contact-info
APIs should have contact information
$.info

Spectral Ruleset

Raw ↑
extends: "spectral:oas"
rules:
  usda-ars-operation-summary:
    description: All operations must have a summary
    message: "Operation missing summary"
    severity: error
    given: "$.paths[*][*]"
    then:
      field: summary
      function: truthy

  usda-ars-operation-tags:
    description: All operations must have tags
    message: "Operation missing tags"
    severity: warn
    given: "$.paths[*][*]"
    then:
      field: tags
      function: truthy

  usda-ars-get-200-response:
    description: GET operations must define a 200 response
    message: "GET operation missing 200 response"
    severity: error
    given: "$.paths[*].get"
    then:
      field: responses.200
      function: truthy

  usda-ars-api-key-authentication:
    description: FoodData Central API requires api_key parameter
    message: "FDC API endpoints should document api_key query parameter"
    severity: info
    given: "$.paths[*].get.parameters[*]"
    then:
      function: truthy

  usda-ars-path-params-documented:
    description: Path parameters must have descriptions
    message: "Path parameter missing description"
    severity: warn
    given: "$.paths[*][*].parameters[?(@.in == 'path')]"
    then:
      field: description
      function: truthy

  usda-ars-license-info:
    description: APIs should document the CC0 license
    message: "API should include license information (CC0 1.0 Universal)"
    severity: info
    given: "$.info"
    then:
      field: license
      function: truthy

  usda-ars-contact-info:
    description: APIs should have contact information
    message: "API missing contact information"
    severity: warn
    given: "$.info"
    then:
      field: contact
      function: truthy

Work with this as data

Every ruleset 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 spectral rules

4 MCP tools reach this
  • find_rulesBrowse and filter every ruleset in the catalog.
  • 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 ruleset
curl "https://apis.io/api/v1/rules/usda-agricultural-research-service-ars--rules"
All spectral rules
curl "https://apis.io/api/v1/rules?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.