USDA Ag Data Commons CKAN API — Datasets

USDA Ag Data Commons CKAN API — Datasets. 5 operations. Lead operation: Search Datastore Resource Records. Self-contained Naftiko capability covering one Usda Agricultural Research Service Ars business surface.

Run with Naftiko Usda Agricultural Research Service ArsDatasets

What You Can Do

GET
Searchdatastoreresource — Search Datastore Resource Records
/v1/api/action/datastore-search
GET
Listorganizations — List Dataset Organizations
/v1/api/action/organization-list
GET
Searchdatasets — Search Agricultural Research Datasets
/v1/api/action/package-search
GET
Getdataset — Get Dataset by ID
/v1/api/action/package-show
GET
Listtags — List Dataset Tags
/v1/api/action/tag-list

MCP Tools

search-datastore-resource-records

Search Datastore Resource Records

read-only idempotent
list-dataset-organizations

List Dataset Organizations

read-only idempotent
search-agricultural-research-datasets

Search Agricultural Research Datasets

read-only idempotent
get-dataset-id

Get Dataset by ID

read-only idempotent
list-dataset-tags

List Dataset Tags

read-only idempotent

Capability Spec

usda-ars-ag-data-commons-datasets.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: USDA Ag Data Commons CKAN API — Datasets
  description: 'USDA Ag Data Commons CKAN API — Datasets. 5 operations. Lead operation: Search Datastore Resource Records.
    Self-contained Naftiko capability covering one Usda Agricultural Research Service Ars business surface.'
  tags:
  - Usda Agricultural Research Service Ars
  - Datasets
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    USDA_AGRICULTURAL_RESEARCH_SERVICE_ARS_API_KEY: USDA_AGRICULTURAL_RESEARCH_SERVICE_ARS_API_KEY
capability:
  consumes:
  - type: http
    namespace: usda-ars-ag-data-commons-datasets
    baseUri: https://data.nal.usda.gov
    description: USDA Ag Data Commons CKAN API — Datasets business capability. Self-contained, no shared references.
    resources:
    - name: api-action-datastore_search
      path: /api/action/datastore_search
      operations:
      - name: searchdatastoreresource
        method: GET
        description: Search Datastore Resource Records
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: resource_id
          in: query
          type: string
          description: The resource ID to query
          required: true
        - name: q
          in: query
          type: string
          description: Full-text search query
        - name: filters
          in: query
          type: string
          description: JSON object of field-value filter pairs
        - name: limit
          in: query
          type: integer
          description: Number of rows to return
        - name: offset
          in: query
          type: integer
          description: Offset for pagination
        - name: fields
          in: query
          type: string
          description: Comma-separated list of fields to return
        - name: sort
          in: query
          type: string
          description: Comma-separated list of fields to sort by
    - name: api-action-organization_list
      path: /api/action/organization_list
      operations:
      - name: listorganizations
        method: GET
        description: List Dataset Organizations
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: api-action-package_search
      path: /api/action/package_search
      operations:
      - name: searchdatasets
        method: GET
        description: Search Agricultural Research Datasets
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: q
          in: query
          type: string
          description: Search query string
        - name: fq
          in: query
          type: string
          description: Filter query (e.g., 'tags:"corn" organization:"ars"')
        - name: rows
          in: query
          type: integer
          description: Number of results to return (max 1000)
        - name: start
          in: query
          type: integer
          description: Offset for pagination
        - name: sort
          in: query
          type: string
          description: Sort field and direction
    - name: api-action-package_show
      path: /api/action/package_show
      operations:
      - name: getdataset
        method: GET
        description: Get Dataset by ID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: query
          type: string
          description: Dataset ID or name slug
          required: true
    - name: api-action-tag_list
      path: /api/action/tag_list
      operations:
      - name: listtags
        method: GET
        description: List Dataset Tags
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: vocabulary_id
          in: query
          type: string
  exposes:
  - type: rest
    namespace: usda-ars-ag-data-commons-datasets-rest
    port: 8080
    description: REST adapter for USDA Ag Data Commons CKAN API — Datasets. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/action/datastore-search
      name: api-action-datastore-search
      description: REST surface for api-action-datastore_search.
      operations:
      - method: GET
        name: searchdatastoreresource
        description: Search Datastore Resource Records
        call: usda-ars-ag-data-commons-datasets.searchdatastoreresource
        with:
          resource_id: rest.resource_id
          q: rest.q
          filters: rest.filters
          limit: rest.limit
          offset: rest.offset
          fields: rest.fields
          sort: rest.sort
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/action/organization-list
      name: api-action-organization-list
      description: REST surface for api-action-organization_list.
      operations:
      - method: GET
        name: listorganizations
        description: List Dataset Organizations
        call: usda-ars-ag-data-commons-datasets.listorganizations
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/action/package-search
      name: api-action-package-search
      description: REST surface for api-action-package_search.
      operations:
      - method: GET
        name: searchdatasets
        description: Search Agricultural Research Datasets
        call: usda-ars-ag-data-commons-datasets.searchdatasets
        with:
          q: rest.q
          fq: rest.fq
          rows: rest.rows
          start: rest.start
          sort: rest.sort
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/action/package-show
      name: api-action-package-show
      description: REST surface for api-action-package_show.
      operations:
      - method: GET
        name: getdataset
        description: Get Dataset by ID
        call: usda-ars-ag-data-commons-datasets.getdataset
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/action/tag-list
      name: api-action-tag-list
      description: REST surface for api-action-tag_list.
      operations:
      - method: GET
        name: listtags
        description: List Dataset Tags
        call: usda-ars-ag-data-commons-datasets.listtags
        with:
          vocabulary_id: rest.vocabulary_id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: usda-ars-ag-data-commons-datasets-mcp
    port: 9090
    transport: http
    description: MCP adapter for USDA Ag Data Commons CKAN API — Datasets. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: search-datastore-resource-records
      description: Search Datastore Resource Records
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: usda-ars-ag-data-commons-datasets.searchdatastoreresource
      with:
        resource_id: tools.resource_id
        q: tools.q
        filters: tools.filters
        limit: tools.limit
        offset: tools.offset
        fields: tools.fields
        sort: tools.sort
      outputParameters:
      - type: object
        mapping: $.
    - name: list-dataset-organizations
      description: List Dataset Organizations
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: usda-ars-ag-data-commons-datasets.listorganizations
      outputParameters:
      - type: object
        mapping: $.
    - name: search-agricultural-research-datasets
      description: Search Agricultural Research Datasets
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: usda-ars-ag-data-commons-datasets.searchdatasets
      with:
        q: tools.q
        fq: tools.fq
        rows: tools.rows
        start: tools.start
        sort: tools.sort
      outputParameters:
      - type: object
        mapping: $.
    - name: get-dataset-id
      description: Get Dataset by ID
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: usda-ars-ag-data-commons-datasets.getdataset
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: list-dataset-tags
      description: List Dataset Tags
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: usda-ars-ag-data-commons-datasets.listtags
      with:
        vocabulary_id: tools.vocabulary_id
      outputParameters:
      - type: object
        mapping: $.