Foreign Agricultural Service ESR API

U.S. Weekly Export Sales of Agricultural Commodity Data

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/foreign-agricultural-service-esr-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 email required.

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

OpenAPI Specification

foreign-agricultural-service-esr-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: USDA FAS Open Data Services ESR API
  version: '1.0'
  description: "Best-effort OpenAPI 3.1 description of the USDA Foreign Agricultural\nService (FAS) Open Data Services, derived from the public Swagger 2.0\ndocument at https://apps.fas.usda.gov/opendata/swagger/docs/v1 and the\nOpendataWeb portal at https://apps.fas.usda.gov/opendataweb/home.\nThe API exposes three datasets:\n  - ESR: U.S. weekly Export Sales of Agricultural Commodity Data\n  - GATS: Global Agricultural Trade System (Census and UN Trade)\n  - PSD: Production, Supply and Distribution\nAuthentication uses an `API_KEY` header issued via api.data.gov.\n"
  contact:
    name: USDA Foreign Agricultural Service
    url: https://www.fas.usda.gov/
servers:
- url: https://apps.fas.usda.gov/OpenData
  description: Production
security:
- apiKey: []
tags:
- name: ESR
  description: U.S. Weekly Export Sales of Agricultural Commodity Data
paths:
  /api/esr/regions:
    get:
      tags:
      - ESR
      summary: List ESR regions
      responses:
        '200':
          $ref: '#/components/responses/Json'
  /api/esr/countries:
    get:
      tags:
      - ESR
      summary: List ESR countries
      responses:
        '200':
          $ref: '#/components/responses/Json'
  /api/esr/commodities:
    get:
      tags:
      - ESR
      summary: List ESR commodities
      responses:
        '200':
          $ref: '#/components/responses/Json'
  /api/esr/unitsOfMeasure:
    get:
      tags:
      - ESR
      summary: List ESR units of measure
      responses:
        '200':
          $ref: '#/components/responses/Json'
  /api/esr/datareleasedates:
    get:
      tags:
      - ESR
      summary: List ESR data release dates
      responses:
        '200':
          $ref: '#/components/responses/Json'
  /api/esr/exports/commodityCode/{commodityCode}/allCountries/marketYear/{marketYear}:
    parameters:
    - $ref: '#/components/parameters/CommodityCode'
    - $ref: '#/components/parameters/MarketYear'
    get:
      tags:
      - ESR
      summary: Get ESR exports for a commodity across all countries for a market year
      responses:
        '200':
          $ref: '#/components/responses/Json'
  /api/esr/exports/commodityCode/{commodityCode}/countryCode/{countryCode}/marketYear/{marketYear}:
    parameters:
    - $ref: '#/components/parameters/CommodityCode'
    - $ref: '#/components/parameters/CountryCode'
    - $ref: '#/components/parameters/MarketYear'
    get:
      tags:
      - ESR
      summary: Get ESR exports for a commodity, country, and market year
      responses:
        '200':
          $ref: '#/components/responses/Json'
components:
  responses:
    Json:
      description: JSON response
      content:
        application/json:
          schema:
            type: array
            items:
              type: object
              additionalProperties: true
  parameters:
    CountryCode:
      name: countryCode
      in: path
      required: true
      schema:
        type: string
    MarketYear:
      name: marketYear
      in: path
      required: true
      schema:
        type: integer
    CommodityCode:
      name: commodityCode
      in: path
      required: true
      schema:
        type: string
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: API_KEY
      description: API key issued via api.data.gov for the FAS Open Data Services