Leaf Agriculture Fields API

The Fields API from Leaf Agriculture — 6 operation(s) for fields.

Operations 8

GET /services/fields/api/fields Get all fields #
GET /services/fields/api/users/{leafUserId}/fields/{fieldId} Get a field #
DELETE /services/fields/api/users/{leafUserId}/fields/{fieldId} Delete a field #
PATCH /services/fields/api/users/{leafUserId}/fields/{fieldId} Update a field #
POST /services/fields/api/users/{leafUserId}/fields Create a field #
POST /services/fields/api/users/{leafUserId}/fields/{fieldId}/integration/{providerName} Upload field to provider #
POST /services/fields/api/fields/query/intersects Get fields by geometry #
POST /services/fields/api/users/{leafUserId}/fields/intersect Get intersection of fields #

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/leaf-agriculture:leaf-agriculture-fields-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

leaf-agriculture-fields-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Leaf Fields API
  description: Food and Agriculture developers use Leaf's API to access clean, standardized, and aggregated Farm data from all major sources.
  version: 1.0.0
servers:
- url: https://api.withleaf.io
security:
- bearerAuth: []
tags:
- name: Fields
paths:
  /services/fields/api/fields:
    get:
      tags:
      - Fields
      summary: Get all fields
      operationId: getAllFields
      security:
      - bearerAuth: []
      parameters:
      - name: leafUserId
        in: query
        schema:
          type: string
      - name: provider
        in: query
        schema:
          type: string
      - name: type
        in: query
        schema:
          type: string
      - name: beforeCreatedTime
        in: query
        schema:
          type: string
          format: date-time
      - name: afterCreatedTime
        in: query
        schema:
          type: string
          format: date-time
      - name: beforeUpdatedTime
        in: query
        schema:
          type: string
          format: date-time
      - name: afterUpdatedTime
        in: query
        schema:
          type: string
          format: date-time
      - name: farmId
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Successful response
  /services/fields/api/users/{leafUserId}/fields/{fieldId}:
    get:
      tags:
      - Fields
      summary: Get a field
      operationId: getField
      security:
      - bearerAuth: []
      parameters:
      - name: leafUserId
        in: path
        required: true
        schema:
          type: string
      - name: fieldId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
    delete:
      tags:
      - Fields
      summary: Delete a field
      operationId: deleteField
      security:
      - bearerAuth: []
      parameters:
      - name: leafUserId
        in: path
        required: true
        schema:
          type: string
      - name: fieldId
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Field deleted
    patch:
      tags:
      - Fields
      summary: Update a field
      operationId: updateField
      security:
      - bearerAuth: []
      parameters:
      - name: leafUserId
        in: path
        required: true
        schema:
          type: string
      - name: fieldId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                farmId:
                  type: string
                geometry:
                  type: object
      responses:
        '200':
          description: Field updated
  /services/fields/api/users/{leafUserId}/fields:
    post:
      tags:
      - Fields
      summary: Create a field
      operationId: createField
      security:
      - bearerAuth: []
      parameters:
      - name: leafUserId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                geometry:
                  type: object
                  properties:
                    type:
                      type: string
                      example: MultiPolygon
                    coordinates:
                      type: array
                      items:
                        type: array
      responses:
        '201':
          description: Field created
  /services/fields/api/users/{leafUserId}/fields/{fieldId}/integration/{providerName}:
    post:
      tags:
      - Fields
      summary: Upload field to provider
      operationId: uploadFieldToProvider
      security:
      - bearerAuth: []
      parameters:
      - name: leafUserId
        in: path
        required: true
        schema:
          type: string
      - name: fieldId
        in: path
        required: true
        schema:
          type: string
      - name: providerName
        in: path
        required: true
        schema:
          type: string
      - name: organizationId
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Field uploaded to provider
  /services/fields/api/fields/query/intersects:
    post:
      tags:
      - Fields
      summary: Get fields by geometry
      operationId: getFieldsByGeometry
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                geometry:
                  type: object
                  properties:
                    type:
                      type: string
                      example: MultiPolygon
                    coordinates:
                      type: array
                      items:
                        type: array
      responses:
        '200':
          description: Successful response
  /services/fields/api/users/{leafUserId}/fields/intersect:
    post:
      tags:
      - Fields
      summary: Get intersection of fields
      operationId: getFieldsIntersection
      security:
      - bearerAuth: []
      parameters:
      - name: leafUserId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
      responses:
        '200':
          description: Successful response
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
x-provenance:
  method: harvested
  publisher: Leaf Agriculture
  source: https://docs.withleaf.io/openapi.yaml
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)