Farmonaut developer docs

Agriculture Data API

One agriculture API for satellite imagery, crop-health indices, field weather, PDF reports and AI farm advisory. Register a field boundary once, and every satellite visit after that arrives as JSON over HTTPS.

How it works

  1. Create a fieldSend the boundary and crop with Create a field. You get a FieldID.
  2. Satellites observe itEach pass over the field becomes a sensed day. Passes happen every few days.
  3. Farmonaut processes the dataIndices, images, weather and reports are generated, usually within minutes.
  4. You read the resultsPoll List sensed days or get a webhook, then fetch what you need.

Satellite imagery API

Get rendered PNGs and georeferenced GeoTIFFs of any registered field for each satellite visit. Choose from 20 image types: true color, NDVI, EVI, SAVI, NDRE, NDWI, NDMI, evapotranspiration, soil organic carbon, elevation, land use, and radar (RVI, RSM) for cloudy weeks. The same satellite data is also available as numbers: field-average index values, multi-date time series and area-by-index-range breakdowns. Archive coverage starts in 2017.

Agriculture weather API

Get current conditions, 7-day daily forecasts and past daily weather for every field, or a forecast for any latitude and longitude without registering a field. Forecasts are delivered in the OpenWeather One Call 3.0 format or a Dark Sky-compatible format, so existing weather parsers work unchanged. A ready-made weather chart is available for farmer reports.

Field reports & AI advisory API

Generate a PDF field report for any visit date, in up to 9 languages, with your own logo on request. You can also request a structured JEEVN AI advisory with fertilizer, irrigation, pest, weed and soil recommendations, or an interactive advisory report you can share by link.

Pricing

API access comes with every Farmonaut subscription. Plans run from Basic ($30/month for 30 ha and 21 land parcels) to Elite ($950/month for 1,500 ha and 1,050 land parcels), and the price per hectare falls from $1.00 to about $0.63 as plans grow. Test mode lets you build and check your integration without using your plan.

PlanPriceLand parcelsAreaSatellite visits / monthPrice per hectare
Basic$30/month2130 ha180$1.00
Standard$65/month5680 ha480$0.81
Premium$225/month210300 ha1,800$0.75
Elite$950/month1,0501,500 ha9,000$0.63

What you can build

Crop monitoring & stress alerts

Track vegetation indices per field and alert agronomists when crop health drops.

Traceability & sustainable sourcing

Prove field-level compliance for supply chains such as cotton and palm oil.

Yield forecasting

Combine index trends and weather to estimate production and spot risk zones.

Agricultural insurance

Check claims and weather risk remotely, without a field visit.

At a glance

Base URLhttps://us-central1-farmbase-b2f7e.cloudfunctions.net
ProtocolHTTPS, POST with a JSON body, for every endpoint
AuthenticationAuthorization: Bearer <API key>. See Authentication.
Test mode"isTesting": true in any body returns sample data and is not billed
Machine-readable specOpenAPI 3.1 (openapi.json) ยท Postman workspace
CoverageGlobal, satellite archive from 2017

Get started

Quickstart

Go from no key to a field’s NDVI value in five steps. Step 2 runs in test mode, so it costs nothing.

Before you begin You need a Farmonaut account with an active subscription; API keys can be created once a plan is active. See Plans & billing. Use cURL, or any language with an HTTP client.

1. Get an API key

Create a key at sat.farmonaut.com/api. Keep it out of source code by putting it in an environment variable. Every example in these docs reads it from there.

export FARMONAUT_API_KEY="your_api_key"

2. Make a test call

Check that the key works by asking for your unit balance. "isTesting": true returns sample data and isn’t billed.

If you get {"error": "invalid api key"}, check that the header is Authorization: Bearer followed by your key.

3. Create a field

Send the boundary as [longitude, latitude] pairs, plus a crop code. This call creates a real field that counts toward your plan. Set isTesting to true if you only want to try it.

Save the FieldID from the response. Every other endpoint needs it.

4. Wait for the first satellite data

First results are usually ready within a few minutes. Poll the field’s sensed days until a date appears, or register a webhook so you don’t have to poll.

5. Read NDVI for that date

Use a date from step 4 to get the field-average NDVI and a rendered image.

Next steps

Get started

Authentication

Every request is authenticated with an API key sent as a bearer token.

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Get a key

Create and manage keys at sat.farmonaut.com/api. Keys can be created once your account has an active subscription. The same page also creates test keys, which let you build an integration without touching real data or your plan.

Test mode

Every endpoint accepts an optional isTesting boolean in the body:

  • true: returns a sample response. It isn’t billed and doesn’t count toward your plan.
  • false or omitted: runs the real request.

Use test mode in CI and while building your parser. Turn it off for production calls.

Keep keys safe

  • Call the API from your server only. Never ship a key inside a mobile app, a browser page or a public repository.
  • Store keys in environment variables or a secrets manager.
  • Regenerate a key at once if it may have leaked. You can create a new one at any time.

Iframe keys are different

The embeddable iframes use a separate key, passed in the URL. It is issued by Farmonaut support, not created on the API page.

Authentication errors

StatusBodyWhat to do
401{"error": "invalid api key"}The header is missing, misspelled or has the wrong key. Check the Bearer prefix.
403{"error": "forbidden"}The key may not perform this request. Contact support if you think it should.

Get started

Requests & responses

Conventions that apply to every endpoint. Read this once and the reference pages will make more sense.

Requests

  • Every endpoint is POST https://us-central1-farmbase-b2f7e.cloudfunctions.net/<endpointName>. The endpoint name is case-sensitive.
  • Every request sends two headers: Authorization: Bearer <API key> and Content-Type: application/json. See Authentication.
  • Parameters go in a JSON body. There are no query parameters.
  • IDs (FieldID, PolygonID) are strings of digits. Send them as strings.

Data formats

ValueFormatExample
Visit dates (SensedDay, history dates)YYYYMMDD string"20240825"
SowingDate in Create a field and Update sowing dateUnix timestamp in seconds, not in the future"1734240752"
SowingDate in Generate AI advisoryYYYYMMDD string"20250101"
Boundary input (Points)Array of [longitude, latitude], at least 3 points[[77.7635, 12.9794], โ€ฆ]
Boundary output (Coordinates)Object of points a, P_1โ€ฆ (fields) or P_0, P_1โ€ฆ (polygons), each {Latitude, Longitude}{"a": {"Latitude": 12.97, "Longitude": 77.76}}
Index valuesString from "0" to "100". See index scale."45" = 0.45
AreaSquare meters9457
Temperature ยท wind ยท pressureKelvin ยท m/s ยท hPa298.14 K = 25 ยฐC

Responses

Successful responses come in three shapes. Each reference page says which one an endpoint returns.

  • Object: most read endpoints, for example {"url": "https://โ€ฆ"}.
  • String: most write endpoints return a JSON string confirmation, for example "Field Deleted Successfully!".
  • Array: for example List expired fields.
Check the body, not just the status A few endpoints report problems with HTTP 200, either as {"error": โ€ฆ} or as a plain string. Examples are an unknown field in Get current weather, or a paused field in Generate AI advisory. Treat any body with an error key as a failure. These cases are listed on each reference page.

Key names are not fully consistent, so match them exactly. For example, Get GeoTIFF returns URL while the other image endpoints return url.

Get started

Errors

Errors use standard HTTP status codes and a JSON body with a single error message.

{"error": "invalid api key"}

Common errors

Any endpoint can return these. Reference pages list them as chips and only spell out errors specific to that endpoint.

StatusMessageCauseFixRetry?
400undefined request. Please fix the JSON request.The body is empty or not valid JSON.Send a JSON object and set Content-Type: application/json.No
400invalid requestA required parameter is missing or has the wrong type.Compare the body with the endpoint’s parameter table.No
401invalid api keyMissing or wrong Authorization header.Send Bearer <key>. See Authentication.No
403forbiddenThe key is not allowed to perform this request.Check the field belongs to this account, or contact support.No
403units_exhausted (sometimes units exhausted)Legacy API-unit accounts only: no units left.Check Get API usage, then top up or move to a subscription plan.After top-up
500internal errorSomething failed on Farmonaut’s side.Retry with exponential backoff. If it continues, contact support with the endpoint, FieldID and time.Yes

Handling errors in code

Because some failures arrive with HTTP 200, check both the status and the body:

import os, time, requests

BASE = "https://us-central1-farmbase-b2f7e.cloudfunctions.net"
HEADERS = {"Authorization": f"Bearer {os.environ['FARMONAUT_API_KEY']}"}

def call(endpoint, body, retries=3):
    for attempt in range(retries):
        r = requests.post(f"{BASE}/{endpoint}", json=body, headers=HEADERS, timeout=60)
        if r.status_code >= 500 and attempt < retries - 1:
            time.sleep(2 ** attempt)          # back off and retry server errors only
            continue
        data = r.json()
        if r.status_code >= 400 or (isinstance(data, dict) and "error" in data):
            raise RuntimeError(f"{endpoint}: {r.status_code} {data}")
        return data
  • Retry only 5xx errors, with backoff. Retrying a 4xx without changing the request returns the same error.
  • Log the endpoint, body (without the key) and response. That is what support needs to help you.

Concepts

Fields & polygons

A field is a boundary you ask Farmonaut to monitor. Everything else in the API hangs off its FieldID.

Boundaries

  • Send at least 3 points as [longitude, latitude], in clockwise or counter-clockwise order. Longitude comes first.
  • The area must be between 0.01 ha (100 mยฒ) and 1,000 ha. Split larger estates into several fields.
  • Check an area before creating a field with Calculate boundary area.
  • The API does not detect duplicates. The same boundary sent twice becomes two fields, billed twice.

Crop and sowing date

The crop code and sowing date tell Farmonaut what is growing and at what stage. They feed yield estimates and advisory. Set them when you create the field. Update them each season with Update crop and Update sowing date, and new estimates start from the next satellite visit.

Field lifecycle

ActiveMonitored on every satellite visit
PausedPause keeps the remaining plan ยท Resume
ExpiredPlan used up ยท List ยท Extend
DeletedDelete ยท List ยท Restore

Paused and expired fields can’t request historical data or generate advisory. The field object exposes the state through Paused, Expired and Expiring.

Polygons

A polygon is a sub-area inside a field, for example one farmer’s plot in a cluster. Polygons have their own PolygonID, and several endpoints accept an optional PolygonID to scope results to it. Polygon endpoints are enabled only for selected enterprise accounts. Contact support to request access.

Concepts

Satellite visits

Data exists only for dates when a satellite passed over the field. Those dates are the field’s sensed days.

Sensed days

Optical satellites revisit a location every few days. Each visit that produces usable data is added to SensedDays as a YYYYMMDD key. Every date-based endpoint (images, index values, reports) needs one of these dates. Read them from List sensed days. Schedule polling around the revisit cycle, because calling daily mostly returns nothing new.

Clouds and radar

Clouds block optical sensors. A cloudy visit is recorded in FailedDays, or flagged with isCloudy. Radar (SAR) sees through cloud. Radar dates are listed by List radar days, and the radar indices rvi (vegetation) and rsm (soil moisture) are the fallback during monsoon or persistent cloud.

Zone alerts

For each sensed day, the field is split into a 3ร—3 grid. cropRedZones and irrigationRedZones list the zones that need attention.

1NW2N3NE 4W5Center6E 7SW8S9SE

Historical data

A field gets data from its creation date onwards. To go further back (to 2017), request it with Request historical data for one date, or in bulk for a range. Historical requests count toward your plan. One month typically covers 5โ€“6 satellite visits. See Plans & billing.

Concepts

Image types & indices

An image type is a way of looking at a field. Each one is either a rendered image or a numeric index computed from satellite bands.

Choosing an image type

Use caseCodes
Natural-color viewtci, etci (enhanced)
Quick overall viewhybrid, hybrid_blind (color-blind friendly)
Crop health, early growthndvi, evi, savi
Crop health, later growthndre
Irrigation & water stressndwi, ndmi, evapo
Soilsoc (soil organic carbon), bsi
Cloudy weather (radar)rvi, rsm
Terrain and land usedem, lulc
Other indicesvari, avi, si

The full list is in Image type codes.

The 0โ€“100 index scale

Raw indices range from โˆ’1 to 1. The API returns them as strings from "0" to "100":

  • Values from 0 to 1 are multiplied by 100. An NDVI of 0.45 is returned as "45".
  • Negative values (water, bare soil, cloud shadow) are returned as "0".

Divide by 100 to get the original value back. Field-average values (Get index value) and the Health map both use this scale.

Color maps

Rendered images color each pixel by its index value. Color map 1 suits tall vegetation and shows very low values as red. Color map 2 suits short vegetation and shows them as black. High values are green in both. Choose one with ColorMap in Get field image.

Color Map 1
Color map 1
Color Map 2
Color map 2

Color legend

Use these colors to draw your own legend. Click a color to copy its hex code.

Ready-made legend images

Embed these scale images next to rendered field images in your UI. Each card shows the URL to use.

Concepts

Plans & billing

API access comes with a Farmonaut subscription. Your plan sets how many land parcels (fields) and how many hectares you can monitor.

Subscription plans

PlanPriceLand parcelsAreaSatellite visits / monthPrice per hectare
Basic$30/month2130 ha180$1.00
Standard$65/month5680 ha480$0.81
Premium$225/month210300 ha1,800$0.75
Elite$950/month1,0501,500 ha9,000$0.63

Satellite visits are the monitoring updates your plan includes each month. Each satellite pass that produces new data for one of your fields uses one visit, and the allowance is shared across all your fields. Historical data requests use visits too.

The number of land parcels in each plan is 70% of its hectare allowance, so a Basic plan covers up to 21 fields across 30 ha. Larger plans lower the price per hectare from $1.00 to about $0.63. For current offers and annual billing, see the pricing page. For larger areas or custom terms, contact [email protected].

Getting API access

  • API keys can be created at sat.farmonaut.com/api once your account has an active subscription.
  • Fields you create through the API count toward your plan’s land parcels and area, exactly like fields drawn in the app.
  • Requests sent with "isTesting": true return sample data. They aren’t billed and don’t count toward your plan.

Staying within your plan

  • Check the area of a boundary before creating it with Calculate boundary area.
  • Pause fields you don’t need right now, and delete fields you no longer monitor.
  • Historical data requests also count toward your plan. One month of history typically covers 5โ€“6 satellite visits, so check your account before large backfills.
  • To monitor more land than your plan allows, upgrade. The new limits apply immediately.

Legacy billing: API units

Older accounts only Before subscriptions, API access was billed in prepaid API units. New accounts use the subscription plans above. This section applies only to accounts still on unit billing.
  • Check the unit balance with Get API usage: OrderedUnits, UsedUnits and remainingUnits.
  • When units run out, billable endpoints return 403 units_exhausted.
  • Each unit-billed field records the hectare units it uses in hUnits. Its monitoring period can be extended with Extend monitoring. Subscription fields (Subscription: true) follow the plan instead.
  • Unused units roll over to the next month if 1,000 hectares or more are under monthly monitoring. Otherwise they expire at the end of each month.

Guide

Monitor a field end to end

The core loop most integrations need: register fields, learn when new data arrives, store the indices, and act on alerts.

1. Register the field

Validate the drawn boundary first, then create the field and store its FieldID next to your own record.

2. Find out when new data arrives

Register a webhook once per account. Farmonaut then POSTs to it whenever new data is processed for a field. If you can’t expose a public endpoint, poll List sensed days on a schedule that matches the satellite revisit cycle (every few days, not every hour).

3. Pull the indices you care about

For a new date, fetch several indices in one call and store them for your own time series.

4. Act on zone alerts

Each sensed day can include cropRedZones and irrigationRedZones, which are grid zones needing attention. A common pattern is to notify the farmer or agronomist when a zone appears in two visits in a row, or when NDVI drops more than a set threshold from the previous visit.

5. Update the field each season

Keep each field’s settings in line with what is happening on the ground, so yield estimates and advisory stay accurate.

  • A new crop is sown: send the new crop with Update crop and the new sowing date with Update sowing date. Estimates use them from the next satellite visit.
  • The field is left empty between crops: Pause monitoring, then Resume monitoring when the next crop goes in.
  • The monitoring period is ending: the field object’s Expiring flag turns yes shortly before it ends, so check it and renew in time.

Guide

Satellite imagery API guide

Show a field on a map, chart its health over time, or take the data into GIS software.

Display an image in your app

Get a rendered PNG for one image type and date, and put a legend image beside it.

Chart health over time

One call returns every index for every visit since the field was created. Divide values by 100 to get raw index values.

Show how much of the field is healthy

The index breakdown gives the area (mยฒ) in each 0.1-wide index range. Sum the top ranges to report, for example, “62% of the field has NDVI above 0.6”.

Use the data in GIS tools

Download a georeferenced GeoTIFF to open in QGIS, ArcGIS or your own pipeline.

Guide

Agriculture weather API guide

Weather is available for any registered field, and the forecast is also available for any coordinate.

You needUse
Conditions right nowGet current weather
Next 7 days at a fieldGet weather forecast
Next 7 days anywhere, without a fieldGet forecast by coordinates
Past N daysGet past weather
A ready-made chart for reportsGet weather chart
Units Temperatures are in kelvin (subtract 273.15 for ยฐC), wind speed in m/s, pressure in hPa. Forecasts follow the OpenWeather One Call 3.0 format, or a Dark Sky-compatible format with "DataFormat": "dark_sky_format".

Example: hold irrigation when heavy rain is forecast

Fetch the forecast and skip irrigation or spraying if a day’s expected rainfall exceeds a threshold, for example 40 mm.

In the normal format, read daily[i].rain (mm) and daily[i].pop (probability of precipitation).

Guide

Field reports & AI advisory API

Turn satellite data into documents and recommendations you can send to farmers.

PDF field report

Each sensed day can produce a PDF report covering weather, radar, crop health and irrigation indices. Set the report languages once per field, then fetch reports by date.

Open the sample report (PDF). To add your own logo, contact [email protected].

JEEVN AI advisory

Generate structured, field-specific recommendations for fertilizer, irrigation, pests and diseases, weeds and soil. Pass the crop and sowing date for growth-stage-aware advice.

For a shareable, interactive version, generate an advisory report URL for one or more fields:

Jeevn Ai Advisory Report

Crop-solution database

Look up treatments and doses for a crop’s known pests and diseases.

Guide

Receive webhooks

Instead of polling, let Farmonaut call you when new data has been processed for one of your fields.

1. Build a receiving endpoint

Expose a public HTTPS URL that accepts POST requests with a JSON body and returns a 2xx status quickly. Do slow work, such as fetching images, in a background job after you respond.

from flask import Flask, request

app = Flask(__name__)

@app.post("/farmonaut-webhook")
def farmonaut_webhook():
    event = request.get_json(silent=True) or {}
    queue_for_processing(event)   # your background job
    return "", 200

2. Register it

Registering sends a test request to your URL straight away. If your endpoint doesn’t answer with a success status, registration fails with Failed to trigger webhook.

3. Process events

  • Log the first test request your endpoint receives to see the exact payload your account gets.
  • Make processing idempotent. If the same event arrives twice, the result should be the same.
  • After an event, call List sensed days for the field to find the new date, then fetch the data you need.

Guide

Backfill historical data

Get satellite data for dates before a field was registered, from 2017 onwards, to compare seasons or train models.

  1. Make sure the fields are active. Paused or expired fields are rejected.
  2. Check your plan allowance. Each month of history typically covers 5โ€“6 satellite visits. See Plans & billing.
  3. Submit the request:

The response estimates the processing time in minutes. After that, the new dates appear in List sensed days. For a single date on one field, use Request historical data, which usually finishes within a few hours.

Guide

Embed with iframes

Drop Farmonaut’s field-drawing and field-viewing screens into your own web app without building map UI.

Add-on feature Iframes are available to API customers on request and use a separate iframe key. Contact [email protected] or +1 (669) 666-6882.

Add Field

Lets your user draw a boundary on a map and creates the field in your account. First results are usually ready within 5 minutes.

<iframe src="https://farmonaut.com/add_field_iframe2.html?APIKey=YOUR_IFRAME_KEY"
        width="100%" height="720" style="border:0" allow="geolocation"></iframe>
URL parameterRequiredDescription
APIKeyrequiredYour iframe key (not your API key).
Add Field iframe walkthrough

Visualize Field

Shows one field with its information, a timeline chart and an image overlay that users can change with map controls.

<iframe src="https://farmonaut.com/satellite_data_admin2?APIKey=YOUR_IFRAME_KEY&FieldID=1668483626232&ImageType=ndvi"
        width="100%" height="720" style="border:0"></iframe>
URL parameterRequiredDescription
APIKeyrequiredYour iframe key.
FieldIDrequiredThe field to show.
ImageTypeoptionalThe layer shown first. See Image type codes.
Visualize Field iframe walkthrough
Visualize Field Iframe, View 1 Visualize Field Iframe, View 2

Guide

Best practices

Patterns that make integrations cheaper, faster and more reliable.

Call frequency

Data quality

  • Under heavy cloud, use radar indices (rvi, rsm) or wait for the next clear visit.
  • Combine indices with weather. For example, read a low NDWI alongside recent rainfall before recommending irrigation.
  • Draw boundaries tightly around the crop and avoid overlapping fields.
  • Keep crop code and sowing date current each season. Yield and advisory depend on them.

Operations

  • Keep keys server-side in environment variables, and use test mode in CI.
  • Group work by region and batch it, rather than sending bursts of single calls.
  • On legacy API-unit accounts, watch remainingUnits and alert before it runs out.

Automation recipes

NDVI drop alert

On each new sensed day, compare NDVI with the previous visit and notify field staff when it drops past a threshold.

Rain-aware scheduling

Delay irrigation or spraying when the forecast shows heavy rain.

Weekly health report

Generate the PDF report or AI advisory for each field and send it by email or WhatsApp.

Planting windows

Combine forecast temperatures with history to guide planting and harvest dates.

Reference data

Crop codes

Values for CropCode. Use 999 (Other) if a crop is not listed.

CropCode
Alfalfa117
Almonds122
Apple35
Apricot36
Areca Nut37
Artichoke156
Asparagus157
Avocado136
Bajra (Pearl Millet)5
Bamboo38
Banana26
Barley39
Beetroot128
Bell Pepper34
Bengal Gram41
Ber (Jujube)42
Betel Leaf43
Bitter Gourd44
Black Gram (Urad)45
Black Pepper144
Blueberry137
Bottle Gourd46
Broccoli131
Buckwheat155
Cabbage28
Cantaloupe/Muskmelon140
Cardamom47
Carrot127
Cashew48
Cassava (Tapioca)101
Castor49
Cauliflower27
Celery158
Cherry51
Chickpea (Gram)8
Chili23
Cinnamon146
Clover152
Cloves145
Cocoa (Cacao)150
Coconut18
Coffee54
Coriander55
Cotton14
Cow Pea56
Cucumber29
Cumin58
Custard Apple111
Date Palm121
Dragon Fruit115
Eggplant (Brinjal)33
Elephant foot yam116
Fennel149
Fig60
French Bean40
Garlic134
Ginger135
Ginseng162
Grape24
Grape Fruit63
Green Gram (Moong)64
Guar66
Guava67
Hemp120
Hops165
Horse Gram114
Indigo164
Jackfruit110
Jowar (Sorghum)4
Jute15
Kidney Bean62
Kiwi108
Leek159
Lemon141
Lentils125
Lettuce130
Lima Bean169
Lime142
Linseed (Flax)126
Litchi68
Maize (Corn)6
Mandarin/Tangerine143
Mango69
Marigold119
Mint153
Mulberry72
Mushroom161
Mustard73
Nutmeg/Mace147
Oats123
Oil Palm107
Okra30
Olive160
Onion17
Opium Poppy75
Orange76
Other999
Paddy77
Papaya78
Pea79
Peach80
Peanut (Groundnut)20
Pear81
Pigeon Pea (Tur/Red Gram)9
Pine Tree112
Pineapple84
Pistachio166
Plum85
Pomegranate86
Potato16
Pumpkin132
Quinoa154
Radish88
Ragi (Finger Millet)89
Rapeseed (Canola)10
Raspberry138
Rice1
Rose91
Rubber92
Rye124
Safflower93
Saffron167
Sesame95
Sisal151
Soybean11
Spinach129
Squash133
Star Anise168
Stevia163
Strawberry113
Sugar Beet99
Sugarcane13
Sunflower12
Sweet Cherry100
Tea25
Teak102
Tobacco19
Tomato32
Turmeric21
Turnip103
Vanilla148
Walnut106
Watermelon139
Wheat2

Reference data

Image type codes

Values for ImageType. See Image types & indices for which to use when.

Image typeCode
NDVIndvi
NDWIndwi
EVAPOevapo
NDMIndmi
EVIevi
RVIrvi
RSMrsm
NDREndre
VARIvari
SAVIsavi
AVIavi
BSIbsi
SIsi
SOCsoc
TCItci
ETCIetci
HYBRIDhybrid
COLORBLINDhybrid_blind
DEMdem
LULClulc

Reference data

Language codes

ISO 639-1 language codes. Report languages (Add report languages) currently support only en, hi, bn, pa, mr, ta, te, ar and uz.

LanguageCode
Afrikaansaf
Amharicam
Arabicar
Armenianhy
Azerbaijaniaz
Basqueeu
Bengalibn
Bulgarianbg
Cambodiankm
Catalanca
Chinesezh
Chinese (Traditional)zh-TW
Croatianhr
Czechcs
Danishda
Dutchnl
Englishen
Finnishfi
Frenchfr
Galiciangl
Georgianka
Greekel
Gujaratigu
Hebrewhe
Hindihi
Hungarianhu
Icelandicis
Indonesianid
Italianit
Japaneseja
Javanesejv
Kannadakn
Koreanko
Laolo
Latvianlv
Lithuanianlt
Malayalamml
Marathimr
Nepaline
Norwegianno
Persianfa
Polishpl
Portuguesept
Punjabipa
Romanianro
Russianru
Serbiansr
Sinhalesesi
Slovaksk
Spanishes
Sundanesesu
Swahilisw
Swedishsv
Tamilta
Telugute
Thaith
Turkishtr
Ukrainianuk
Urduur
Zuluzu

Resources

Support & FAQ

Raise a ticket

farmonaut.com/support. Include the endpoint, request body (without your key), response and time.

Email

[email protected], also for partnerships, large-scale and custom needs.

Postman

Farmonaut public workspace. Use the desktop app or IDE extension; the web version has a known issue.

OpenAPI

openapi.json. Import it into Postman or Insomnia, or generate a client SDK.

FAQ

Can I use the API worldwide?

Yes. Fields anywhere in the world can be monitored, and the forecast-by-coordinates endpoint works for any location.

What format are responses in?

JSON. Most responses are objects, and some write endpoints return a JSON string. See Requests & responses.

Is historical data available?

Yes. Satellite data from 2017 can be requested per field, and past weather is available for registered fields. See Backfill historical data.

What happens if clouds block the image?

Cloudy visits are flagged (FailedDays, isCloudy). Use radar indices such as RVI, or wait a few days for the next clear visit.

Can reports carry my company’s logo?

Yes. Contact [email protected] to set up custom branding.

Do I need a subscription to use the API?

Yes. API keys can be created once your account has an active subscription, and fields created through the API count toward your plan. See Plans & billing.

Farmonaut apps

Web app ยท Android ยท iOS

API reference

API reference

42 endpoints, grouped by resource. Every endpoint is POST https://us-central1-farmbase-b2f7e.cloudfunctions.net/<name> with a JSON body.

Shared objects: Field ยท Polygon ยท Weather day. Machine-readable: openapi.json.

Fields

Create, read, update and delete the farm boundaries you monitor.

Create a field/submitFieldRegisters a new field (farm or plot) and starts satellite monitoring for it.
Retrieve a field/getFarmerDataReturns everything stored for one field: boundary, status, sensed days, index summaries, weather and yield.
List field IDs/getAllFieldIDsReturns the ID and name of every field in your account.
Calculate boundary area/getFieldAreaByBoundaryPointsCalculates the area of a boundary without creating a field.
Update field details/change_field_dataUpdates a field’s descriptive data: name, address, farmer contact and crop.
Update field boundary/modifyFieldPointsReplaces a field’s boundary, for example to correct a wrongly drawn field.
Update crop/updateCropCodeChanges the crop recorded for a field, for example when a new season starts with a different crop.
Update sowing date/updateSowingDateChanges the sowing date of a field. Growth-stage and yield estimates use it from the next satellite visit.
Delete a field/deleteFieldDeletes a field and its data. Deleted fields can be restored.
List deleted fields/getAllDeletedFieldsReturns the fields you have deleted, newest first, with cursor pagination.
Restore deleted fields/restoreDeletedFieldsRestores one or more deleted fields.
List expired fields/getExpiredFarmsReturns the IDs of fields whose monitoring plan has expired.

Monitoring

Control when satellites observe a field and find out which dates have data.

List sensed days/getSensedDaysReturns the dates on which satellite data is available for a field or polygon, with zone-level alerts.
List radar days/getSARDaysReturns the dates on which radar (SAR) data is available for a field. Radar works through clouds.
Pause monitoring/pauseFieldMonitoringPauses satellite monitoring for a field. The remaining plan is kept for later.
Resume monitoring/resumeFieldMonitoringResumes monitoring for a paused field. Data generation restarts from the next satellite visit until the plan runs out.
Extend monitoring/addMonthsToFarmAdds months of satellite monitoring to a field billed in API units (legacy billing).
Request historical data/requestPreviousSatelliteDataRequests satellite data for one date before the field was created.
Request historical data in bulk/requestBulkHistoricalSatelliteDataRequests satellite data for a date range across one or more fields.

Imagery & indices

Satellite images, GeoTIFFs and vegetation/water/soil index values for a visit date.

Get field image/getFieldImageReturns a URL to a rendered satellite image of a field for one image type, visit date and color map.
Get GeoTIFF/generate_geotif_fileReturns a URL to a georeferenced GeoTIFF of a field for one image type and visit date, for use in GIS tools.
Get index value/getIndexValueReturns the field-average value of one index on one visit date.
Get index values for dates/getIndexValuesBasedOnSenseddaysReturns several indices for several visit dates in one call.
Get all index values/getAllIndexValuesReturns every index for every satellite visit since the field was created.
Get index breakdown/getFieldIndexBreakdownReturns how much of a field’s area falls into each index range on one visit date.
Get index breakdown image/getFieldIndexAreaImageReturns a URL to a chart image of the index breakdown (area per index range) for one visit date.

Weather

Current conditions, 7-day forecasts and historical weather for a field or any coordinate.

Get current weather/getPresentWeatherReturns the latest weather conditions at a field.
Get weather forecast/getForecastWeatherReturns a daily weather forecast for the next 7 days at a field.
Get forecast by coordinates/getForecastWeatherFromLatLongReturns a 7-day daily forecast for any latitude and longitude, without creating a field.
Get past weather/getHistoricalFieldWeatherReturns daily weather for a field for a number of days before today, where available.
Get weather chart/getPastWeatherGraphReturns a URL to a chart of temperature, cloud cover, humidity, pressure and wind speed over the last 7 satellite visits.

Reports & advisory

PDF field reports, JEEVN AI advisory and the crop-solution database.

Get field report/getFieldReportReturns a URL to the PDF report for a field (or polygon) on one visit date.
Add report languages/addReportLanguageAdds languages to a field’s reports. Later reports are generated in every configured language.
Remove report languages/removeReportLanguageRemoves languages from a field’s reports.
Generate AI advisory/askJeevnAPIGenerates a personalized JEEVN AI farm advisory from crop, satellite indices, location and weather forecast.
Get advisory report/getAdvisoryReportGenerates an interactive HTML advisory report for one or more fields and returns its URL.
Search crop solutions/getDatabaseReturns known pests and diseases for a crop, or treatments for one issue, with dosage.

Polygons

Sub-areas inside a field. Enabled only for selected enterprise accounts.

Create or update a polygon/submitOrUpdateFarmPolygonCreates a polygon (a sub-area inside a field) or updates an existing one.
Retrieve a polygon/getPolygonFarmerDataReturns everything stored for one polygon: boundary, area, address and farmer data.
Delete polygons/deleteFarmPolygonsDeletes one or more polygons and their data.

Account & webhooks

Real-time notifications, plus usage for legacy API-unit accounts.

Get API usage/getMyUsageReturns the API-unit balance and request counters for accounts on legacy API-unit billing.
Register a webhook/setup_webhookRegisters the URL that Farmonaut calls with a POST request whenever new data is processed for one of your fields.

Fields

Create a field

POST/submitField

Registers a new field (farm or plot) and starts satellite monitoring for it.

First results are usually ready within a few minutes. After that, data for each new satellite visit is generated automatically and can be read at any time.

The API does not check for duplicates. Submitting the same boundary twice creates (and bills) two fields.
Create a field walkthrough

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

CropCodestringrequiredThe crop grown on the field. See Crop codes.
PointsarrayrequiredThe field boundary as an array of [longitude, latitude] pairs, in clockwise or counter-clockwise order. At least 3 points.
FieldNamestringoptionalA display name that helps you recognize the field.
PaymentTypeintegeroptionalHow many months to monitor the field for (1, 3, 6 or 12). Default: -2.
SowingDatestringoptionalSowing date as a Unix timestamp in seconds. Must not be in the future. Recommended for seasonal crops because it improves growth-stage estimates.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object The new field object. Store its FieldID: every other endpoint needs it.

FieldIDstringThe unique ID of the new field.
FieldAreanumberField area in square meters.
hUnitsintegerHectare units charged for this field.
CoordinatesobjectThe boundary as labeled points (a, P_1, P_2โ€ฆ).
SubscriptionbooleanTrue if the field is covered by a subscription plan; false if it is billed in legacy API units.
OrderDatestringDate the monitoring order was placed, as dd-mm-yyyy.
โ€ฆPlus the other field object properties.

Errors

StatusMessageCauseFix
400UID undefinedThe API key could not be mapped to an account.Check the Authorization header.
400Field Points undefinedPoints is missing.Send the boundary in Points.
400At Least 3 boundary points must be submiited.Fewer than 3 boundary points.Send at least 3 points.
400Couldn't register location โ€ฆ greater than 0.01 HectaresThe boundary is smaller than 0.01 ha (100 mยฒ).Check the boundary; fields must be at least 0.01 ha.
400Couldn't register location โ€ฆ less than 1000 HectaresThe boundary is 1,000 ha or larger.Split large areas into several fields.
400CropCode undefinedCropCode is missing.Send a valid crop code.
400Invalid sowing dateโ€ฆSowingDate is not a past Unix timestamp in seconds.Send seconds, not milliseconds or a date string.

Common errors:400 undefined request. Please fix the JSON request.401 invalid api key403 forbidden403 units_exhausted500 internal error

Related

Fields

Retrieve a field

POST/getFarmerData

Returns everything stored for one field: boundary, status, sensed days, index summaries, weather and yield.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object An object with a single key, the FieldID, whose value is the field object.

Errors

Common errors:400 undefined request. Please fix the JSON request.400 invalid request401 invalid api key403 forbidden403 units_exhausted500 internal error

Related

Fields

List field IDs

POST/getAllFieldIDs

Returns the ID and name of every field in your account.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object An object mapping each FieldID to its field name.

Errors

Common errors:400 invalid request401 invalid api key500 internal error

Related

Fields

Calculate boundary area

POST/getFieldAreaByBoundaryPoints

Calculates the area of a boundary without creating a field.

Use it to validate a boundary drawn by a user (for example against the 0.01โ€“1,000 ha limits) before you call Create a field.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

PointsarrayrequiredThe field boundary as an array of [longitude, latitude] pairs, in clockwise or counter-clockwise order. At least 3 points.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object An object with the area.

FieldAreaintegerArea in square meters.

Errors

StatusMessageCauseFix
400At Least 3 boundary points must be submiited.Fewer than 3 points.Send at least 3 points.

Common errors:400 undefined request. Please fix the JSON request.400 invalid request401 invalid api key403 forbidden403 units_exhausted500 internal error

Fields

Update field details

POST/change_field_data

Updates a field’s descriptive data: name, address, farmer contact and crop.

Send only the properties you want to change. To change the boundary, use Update field boundary.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
FieldDescriptionstringoptionalThe field name.
FieldAddressstringoptionalA free-text address for the field.
NamestringoptionalThe farmer’s name.
PhonestringoptionalThe farmer’s phone number.
CropCodestringoptionalA new crop code. See Crop codes.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object An object confirming the change.

datastringAlways changed successfully.

Errors

StatusMessageCauseFix
400insufficiant dataNo updatable property was sent.Send at least one optional property.

Common errors:400 invalid request401 invalid api key500 internal error

Fields

Update field boundary

POST/modifyFieldPoints

Replaces a field’s boundary, for example to correct a wrongly drawn field.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
PointsarrayrequiredThe field boundary as an array of [longitude, latitude] pairs, in clockwise or counter-clockwise order. At least 3 points.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object The updated field object.

Errors

StatusMessageCauseFix
400At Least 3 boundary points must be submiited.Fewer than 3 points.Send at least 3 points.
400Field Points undefinedPoints is missing.Send the boundary in Points.
405field ID invalid.No field with this ID exists in your account.Check the ID with List field IDs.

Common errors:400 undefined request. Please fix the JSON request.400 invalid request401 invalid api key403 forbidden403 units_exhausted500 internal error

Fields

Update crop

POST/updateCropCode

Changes the crop recorded for a field, for example when a new season starts with a different crop.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
CropCodestringrequiredThe new crop code. See Crop codes.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON string A confirmation string. New yield estimates start from the next satellite visit.

Errors

Common errors:400 undefined request. Please fix the JSON request.400 invalid request401 invalid api key403 forbidden403 units_exhausted500 internal error

Fields

Update sowing date

POST/updateSowingDate

Changes the sowing date of a field. Growth-stage and yield estimates use it from the next satellite visit.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
SowingDatestringrequiredSowing date as a Unix timestamp in seconds. Must not be in the future.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON string A confirmation string.

Errors

StatusMessageCauseFix
400Invalid sowing dateโ€ฆThe value is not a past Unix timestamp in seconds.Send seconds, not milliseconds or a date string.

Common errors:400 undefined request. Please fix the JSON request.400 invalid request401 invalid api key403 forbidden403 units_exhausted500 internal error

Fields

Delete a field

POST/deleteField

Deletes a field and its data. Deleted fields can be restored.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON string A confirmation string.

Errors

Common errors:400 undefined request. Please fix the JSON request.401 invalid api key403 forbidden403 units_exhausted500 internal error

Related

Fields

List deleted fields

POST/getAllDeletedFields

Returns the fields you have deleted, newest first, with cursor pagination.

The summary value is currently returned as a string, not a JSON object.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

LimitintegeroptionalMaximum number of fields to return. Default: 10000.
EndFieldIDstringoptionalPagination cursor. Returns fields that come just before this FieldID. Pass the last ID of the previous page to get the next page.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object An object mapping each deleted FieldID to a summary with fieldName, farmerName, farmerPhone and farmArea (mยฒ).

Errors

Common errors:400 invalid request401 invalid api key500 internal error

Related

Fields

Restore deleted fields

POST/restoreDeletedFields

Restores one or more deleted fields.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDsarrayrequiredThe IDs of the deleted fields to restore, as strings.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object Two lists showing which fields were restored.

successfularrayIDs that were restored.
unsuccessfularrayIDs that could not be restored.

Errors

StatusMessageCauseFix
400fieldId is required and need to pass as list.FieldIDs is missing or not an array.Send an array of strings.

Common errors:400 invalid request401 invalid api key500 internal error

Fields

List expired fields

POST/getExpiredFarms

Returns the IDs of fields whose monitoring plan has expired.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON array An array of FieldID strings.

Errors

Common errors:400 invalid request401 invalid api key500 internal error

Related

Monitoring

List sensed days

POST/getSensedDays

Returns the dates on which satellite data is available for a field or polygon, with zone-level alerts.

Zones divide the field into a 3ร—3 grid: 1 north-west, 2 north, 3 north-east, 4 west, 5 center, 6 east, 7 south-west, 8 south, 9 south-east.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
PolygonIDstringoptionalThe ID of a polygon (a sub-area inside the field). When set, the request applies to that polygon instead of the whole field.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object An object whose SensedDays map is keyed by date (YYYYMMDD).

SensedDays.{date}string | objectEither yes, or an object with the zone alerts below.
SensedDays.{date}.cropRedZonesarrayZones where crop health is poor.
SensedDays.{date}.irrigationRedZonesarrayZones where water stress is high.
SensedDays.{date}.isCloudybooleanTrue if clouds affected this visit.

Errors

Common errors:400 undefined request. Please fix the JSON request.400 invalid request401 invalid api key403 forbidden403 units_exhausted500 internal error

Related

Monitoring

List radar days

POST/getSARDays

Returns the dates on which radar (SAR) data is available for a field. Radar works through clouds.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object An object whose SARDays map has each radar date (YYYYMMDD) as a key and yes as the value.

Errors

Common errors:400 undefined request. Please fix the JSON request.400 invalid request401 invalid api key403 forbidden403 units_exhausted500 internal error

Related

Monitoring

Pause monitoring

POST/pauseFieldMonitoring

Pauses satellite monitoring for a field. The remaining plan is kept for later.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON string A confirmation string.

Errors

Common errors:400 undefined request. Please fix the JSON request.400 invalid request401 invalid api key403 forbidden403 units_exhausted500 internal error

Related

Monitoring

Resume monitoring

POST/resumeFieldMonitoring

Resumes monitoring for a paused field. Data generation restarts from the next satellite visit until the plan runs out.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON string A confirmation string.

Errors

Common errors:400 undefined request. Please fix the JSON request.400 invalid request401 invalid api key403 forbidden500 internal error

Related

Monitoring

Extend monitoring

POST/addMonthsToFarm

Adds months of satellite monitoring to a field billed in API units (legacy billing).

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
NumberOfMonthsintegerrequiredHow many months to add.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON string A confirmation string that starts with the number of months added.

Errors

StatusMessageCauseFix
403More months cannot be added to monitoring as this fieldis billed by subscription, not API units.The field belongs to a subscription plan.Manage the duration through your subscription instead.

Common errors:400 undefined request. Please fix the JSON request.400 invalid request401 invalid api key403 forbidden403 units_exhausted500 internal error

Related

Monitoring

Request historical data

POST/requestPreviousSatelliteData

Requests satellite data for one date before the field was created.

Example: a field created on 15 June 2021 can request data for 5 June 2021. The field must not be paused or expired. Historical requests use satellite visits from your plan quota.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
RequestedDatestringrequiredThe historical date in YYYYMMDD format. Year from 2017 to the current year.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON string A confirmation string. Data is usually ready within a few hours.

Errors

StatusMessageCauseFix
400Year should be within 2017 and current year.The date is outside the archive.Use a date from 2017 onwards.

Common errors:400 undefined request. Please fix the JSON request.400 invalid request401 invalid api key403 forbidden403 units_exhausted500 internal error

Related

Monitoring

Request historical data in bulk

POST/requestBulkHistoricalSatelliteData

Requests satellite data for a date range across one or more fields.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDsarrayrequiredThe field IDs, as strings. Fields must not be paused or expired.
FromDatestringrequiredStart of the range, YYYYMMDD. Year from 2017 to the current year.
ToDatestringrequiredEnd of the range, YYYYMMDD.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON string A confirmation string with the estimated processing time in minutes. Check List sensed days after that time.

Errors

StatusMessageCauseFix
200Request failed for the Farms due field monitoring being paused or expired.Some fields are paused or expired.Resume or extend them first.
400invalid request; no field idsFieldIDs is empty or missing.Send at least one ID.
400Invalid from or to dateโ€ฆA date is malformed or outside 2017โ€“current year.Use YYYYMMDD within the archive.

Errors marked 200 arrive with a success status. Check the body. See Requests & responses.

Common errors:400 invalid request401 invalid api key500 internal error

Related

Imagery & indices

Get field image

POST/getFieldImage

Returns a URL to a rendered satellite image of a field for one image type, visit date and color map.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
ImageTypestringrequiredThe image type code, for example ndvi. See Image type codes.
SensedDaystringrequiredA satellite visit date in YYYYMMDD format. Must be one of the field’s sensed days.
ColorMapstringoptional1 for tall vegetation, 2 for short vegetation. Default: 1. Color map 2 is not available for TCI, ETCI, Hybrid, Colorblind and Evapotranspiration. See Color maps.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object An object with the image URL.

urlstringURL of the PNG image.

Errors

StatusMessageCauseFix
400image not foundNo image exists for this type and date.Check the date with List sensed days.

Common errors:400 undefined request. Please fix the JSON request.400 invalid request401 invalid api key403 forbidden403 units_exhausted500 internal error

Related

Imagery & indices

Get GeoTIFF

POST/generate_geotif_file

Returns a URL to a georeferenced GeoTIFF of a field for one image type and visit date, for use in GIS tools.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
ImageTypestringrequiredThe image type code, for example ndvi. See Image type codes.
SensedDaystringrequiredA satellite visit date in YYYYMMDD format. Must be one of the field’s sensed days.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object An object with the file URL.

URLstringURL of the GeoTIFF file. Note the upper-case key.

Errors

Common errors:400 undefined request. Please fix the JSON request.400 invalid request401 invalid api key403 forbidden403 units_exhausted500 internal error

Related

Imagery & indices

Get index value

POST/getIndexValue

Returns the field-average value of one index on one visit date.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
ImageTypestringrequiredThe image type code, for example ndvi. See Image type codes.
SensedDaystringrequiredA satellite visit date in YYYYMMDD format. Must be one of the field’s sensed days.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object An object keyed by the image type, for example {"ndvi": "33"}. Values use the 0โ€“100 index scale.

Errors

Common errors:400 undefined request. Please fix the JSON request.400 invalid request401 invalid api key403 forbidden403 units_exhausted500 internal error

Related

Imagery & indices

Get index values for dates

POST/getIndexValuesBasedOnSenseddays

Returns several indices for several visit dates in one call.

The top-level key in the response is the literal string FieldID, not the field’s ID.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
ImageTypearrayrequiredImage type codes, for example ["ndvi", "savi"].
SensedDayarrayrequiredVisit dates in YYYYMMDD format.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object An object keyed by date, then by index name. Values use the 0โ€“100 index scale.

Errors

StatusMessageCauseFix
400uid is required.The key could not be mapped to an account.Check the Authorization header.
400Fieldid is required.FieldID is missing.Send the field ID.
400index names is required.ImageType is missing or empty.Send at least one code.
400sensed days is required.SensedDay is missing or empty.Send at least one date.

Common errors:401 invalid api key

Imagery & indices

Get all index values

POST/getAllIndexValues

Returns every index for every satellite visit since the field was created.

Use it to build time-series charts without one call per date.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object An object keyed by index name (ndvi, eviโ€ฆ), then by date. Values use the 0โ€“100 index scale.

Errors

Common errors:400 undefined request. Please fix the JSON request.400 invalid request401 invalid api key403 forbidden403 units_exhausted500 internal error

Imagery & indices

Get index breakdown

POST/getFieldIndexBreakdown

Returns how much of a field’s area falls into each index range on one visit date.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
ImageTypestringrequiredThe image type code, for example ndvi. See Image type codes.
SensedDaystringrequiredA satellite visit date in YYYYMMDD format. Must be one of the field’s sensed days.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object An object keyed by image type. The value is 10 areas in mยฒ, for the index ranges 0โ€“0.1, 0.1โ€“0.2 โ€ฆ 0.9โ€“1.0, in that order.

Errors

Common errors:400 undefined request. Please fix the JSON request.400 invalid request401 invalid api key403 forbidden403 units_exhausted500 internal error

Related

Imagery & indices

Get index breakdown image

POST/getFieldIndexAreaImage

Returns a URL to a chart image of the index breakdown (area per index range) for one visit date.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
ImageTypestringrequiredThe image type code, for example ndvi. See Image type codes.
SensedDaystringrequiredA satellite visit date in YYYYMMDD format. Must be one of the field’s sensed days.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object An object with the image URL.

urlstringURL of the chart image.

Errors

Common errors:400 undefined request. Please fix the JSON request.400 invalid request401 invalid api key403 forbidden403 units_exhausted500 internal error

Related

Weather

Get current weather

POST/getPresentWeather

Returns the latest weather conditions at a field.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object Current conditions in OpenWeather One Call 3.0 format.

lat, lonnumberLocation used for the weather lookup.
timezonestringIANA timezone name.
timezone_offsetintegerUTC offset in seconds.
currentobjectCurrent conditions (temperatures in kelvin).

Errors

StatusMessageCauseFix
200No Farm Exists with this Field IDโ€ฆUnknown FieldID.Check the ID.
200Error retrieving weather data.The weather provider did not respond.Retry later.

Errors marked 200 arrive with a success status. Check the body. See Requests & responses.

Common errors:400 invalid request401 invalid api key500 internal error

Weather

Get weather forecast

POST/getForecastWeather

Returns a daily weather forecast for the next 7 days at a field.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
DataFormatstringoptionalnormal for OpenWeather One Call 3.0 format, or dark_sky_format for a Dark Sky-compatible structure. Default: normal.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object A daily forecast in the format selected by DataFormat. The example shows both formats side by side, keyed by format name.

Errors

StatusMessageCauseFix
404field not foundUnknown FieldID.Check the ID.
500Error retrieving weather data.The weather provider did not respond.Retry with backoff.

Common errors:400 invalid request401 invalid api key500 internal error

Related

Weather

Get forecast by coordinates

POST/getForecastWeatherFromLatLong

Returns a 7-day daily forecast for any latitude and longitude, without creating a field.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

LatitudestringrequiredLatitude in decimal degrees.
LongitudestringrequiredLongitude in decimal degrees.
DataFormatstringoptionalnormal or dark_sky_format. Default: normal.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object Same shape as Get weather forecast.

Errors

StatusMessageCauseFix
500Error retrieving weather data.The weather provider did not respond.Retry with backoff.

Common errors:400 invalid request401 invalid api key500 internal error

Weather

Get past weather

POST/getHistoricalFieldWeather

Returns daily weather for a field for a number of days before today, where available.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
NumberOfDaysintegerrequiredHow many days before today to return.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object An object keyed by date. Each value is a weather day object.

Errors

Common errors:400 undefined request. Please fix the JSON request.400 invalid request401 invalid api key403 forbidden403 units_exhausted500 internal error

Weather

Get weather chart

POST/getPastWeatherGraph

Returns a URL to a chart of temperature, cloud cover, humidity, pressure and wind speed over the last 7 satellite visits.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
SensedDaystringrequiredA satellite visit date in YYYYMMDD format. Must be one of the field’s sensed days.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object An object with the image URL.

urlstringURL of the chart image.

Errors

StatusMessageCauseFix
404file not found; weather graph is generated when more then 1 satellite data is generatedโ€ฆThe field has only one satellite visit so far.Wait for a second visit.

Common errors:400 undefined request. Please fix the JSON request.400 invalid request401 invalid api key403 forbidden403 units_exhausted500 internal error

Reports & advisory

Get field report

POST/getFieldReport

Returns a URL to the PDF report for a field (or polygon) on one visit date.

To brand reports with your own logo, contact [email protected].

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
SensedDaystringrequiredA satellite visit date in YYYYMMDD format. Must be one of the field’s sensed days.
LanguagestringoptionalReport language code. Default: en.
PolygonIDstringoptionalThe ID of a polygon (a sub-area inside the field). When set, the request applies to that polygon instead of the whole field.
ReportFormatstringoptionalOnly PDF is supported. Default: PDF.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object An object with the report URL.

urlstringURL of the PDF.

Errors

Common errors:400 undefined request. Please fix the JSON request.400 invalid request401 invalid api key403 forbidden403 units_exhausted500 internal error

Related

Reports & advisory

Add report languages

POST/addReportLanguage

Adds languages to a field’s reports. Later reports are generated in every configured language.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
LanguagearrayrequiredISO 639-1 codes of report languages. Supported: en, hi, bn, pa, mr, ta, te, ar, uz.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON string A confirmation string.

Errors

StatusMessageCauseFix
400Invalid language codesA code is not in the supported list.Use only the supported codes.

Common errors:400 invalid request401 invalid api key403 forbidden403 units_exhausted500 internal error

Related

Reports & advisory

Remove report languages

POST/removeReportLanguage

Removes languages from a field’s reports.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
LanguagearrayrequiredISO 639-1 codes of report languages. Supported: en, hi, bn, pa, mr, ta, te, ar, uz.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON string A confirmation string.

Errors

Common errors:400 invalid request401 invalid api key500 internal error

Related

Reports & advisory

Generate AI advisory

POST/askJeevnAPI

Generates a personalized JEEVN AI farm advisory from crop, satellite indices, location and weather forecast.

Unlike other endpoints, SowingDate here is YYYYMMDD, not a Unix timestamp.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
CropstringrequiredThe crop or plantation name, for example sugarcane.
LanguagestringoptionalLanguage code for the advisory. Default: English.
SowingDatestringoptionalSowing date as YYYYMMDD. Used to work out the growth stage.
LastSensedDaystringoptionalGenerate the advisory for this visit date (YYYYMMDD, within the past year) instead of the latest one.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object The advisory object. A full explanation of every key is in the advisory key reference (PDF).

Satellite_DataobjectShare of field area in each health color class (green, orange, red, purple, white).
SensedDay, SARDaystringOptical and radar dates the advisory is based on.
advisoryobjectRecommendations by topic: fertilizers, irrigation, pest & disease, weed, soil management, plus references.
advisory_generatedstringsuccessful when the advisory was produced.
fieldID, fieldName, fieldAreastringField identity and area.
timestampstringGeneration time in Unix milliseconds.

Errors

StatusMessageCauseFix
200Field does not existUnknown FieldID.Check the ID.
200Field is PausedMonitoring is paused.Resume monitoring.
200Field is ExpiredThe plan has expired.Extend monitoring.
200Last sensed day is before 15 days.No satellite visit in the last 15 days.Wait for a visit, or pass LastSensedDay.

Errors marked 200 arrive with a success status. Check the body. See Requests & responses.

Common errors:400 invalid request401 invalid api key403 forbidden403 units_exhausted

Related

Reports & advisory

Get advisory report

POST/getAdvisoryReport

Generates an interactive HTML advisory report for one or more fields and returns its URL.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldsobjectrequiredMaps each FieldID to a list of visit dates (YYYYMMDD). An empty list means “latest available dates”.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object An object with the report URL.

jeevnAiReporturlstringURL of the interactive report.

Errors

StatusMessageCauseFix
400please enter the fields to generate the reportFields is missing.Send the Fields object.
400invalid request enter the data in the dictionary formatFields is not an object.Send an object.
400invalid request please enter the field name as stringA key is not a string.Use string field IDs.
400The date is invalid or not in the format yyyymmdd.A date is malformed.Use YYYYMMDD.

Common errors:400 invalid request401 invalid api key500 internal error

Related

Reports & advisory

Search crop solutions

POST/getDatabase

Returns known pests and diseases for a crop, or treatments for one issue, with dosage.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

CropstringoptionalLower-case crop name. Required unless Issue is sent.
IssuestringoptionalPest or disease name. Required unless Crop is sent.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object An object keyed by disease or pest name. Each value describes one treatment.

{issue}.formulationstringProduct formulation to use.
{issue}.dilutionstringDilution per liter of water.
{issue}.ai_gmstringActive-ingredient quantity.

Errors

Common errors:400 undefined request. Please fix the JSON request.400 invalid request401 invalid api key403 forbidden403 units_exhausted500 internal error

Polygons

Create or update a polygon

POST/submitOrUpdateFarmPolygon

Creates a polygon (a sub-area inside a field) or updates an existing one.

First results for a new polygon are usually ready within a few minutes.

Polygon endpoints are enabled only for selected enterprise accounts. Contact support to request access.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
CoordinatesobjectrequiredThe polygon boundary as points keyed P_0, P_1, P_2โ€ฆ, each with Latitude and Longitude.
PolygonIDstringoptionalThe polygon to update. Omit it to create a new polygon.
NamestringoptionalThe farmer’s name.
PhoneNumberstringoptionalThe farmer’s phone number.
CitystringoptionalThe nearest city.
FullAddressstringoptionalThe address of the polygon.
FarmerInfoDataobjectoptionalOrganization-specific farmer data: FarmerCode, crop, variety, village, taluka, district, state, zone, PhoneNumber, and internal keys amro, store, declaredArea.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object The polygon object.

Errors

StatusMessageCauseFix
500polygon create/update failedThe polygon could not be saved.Retry; contact support if it persists.

Common errors:400 undefined request. Please fix the JSON request.400 invalid request401 invalid api key403 forbidden403 units_exhausted500 internal error

Polygons

Retrieve a polygon

POST/getPolygonFarmerData

Returns everything stored for one polygon: boundary, area, address and farmer data.

Polygon endpoints are enabled only for selected enterprise accounts. Contact support to request access.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

FieldIDstringrequiredThe ID of the field, as returned by Create a field. List all your IDs with List field IDs.
PolygonIDstringrequiredThe polygon ID.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object The polygon object.

Errors

Common errors:400 undefined request. Please fix the JSON request.400 invalid request401 invalid api key403 forbidden403 units_exhausted500 internal error

Polygons

Delete polygons

POST/deleteFarmPolygons

Deletes one or more polygons and their data.

Polygon endpoints are enabled only for selected enterprise accounts. Contact support to request access.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

PolygonIDsarrayrequiredThe polygon IDs to delete, as integers.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON string A confirmation string.

Errors

Common errors:400 undefined request. Please fix the JSON request.400 invalid request401 invalid api key403 forbidden403 units_exhausted500 internal error

Account & webhooks

Get API usage

POST/getMyUsage

Returns the API-unit balance and request counters for accounts on legacy API-unit billing.

Call it before large jobs, and alert when remainingUnits runs low, to avoid units_exhausted errors.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object A usage object.

OrderedUnitsintegerAPI units purchased.
UsedUnitsintegerAPI units consumed.
remainingUnitsintegerUnits left (OrderedUnits โˆ’ UsedUnits).
WeatherRequestsintegerWeather calls made.
TotalWeatherRequestsintegerWeather calls made, all time.
FieldAreaRequestsintegerCalls to Calculate boundary area.
TotalJeevnaiRequestsintegerCalls to Generate AI advisory.

Errors

Common errors:400 invalid request401 invalid api key500 internal error

Account & webhooks

Register a webhook

POST/setup_webhook

Registers the URL that Farmonaut calls with a POST request whenever new data is processed for one of your fields.

Requires authentication: Authorization: Bearer <key> and Content-Type: application/json.

Request body

urlstringrequiredA public HTTPS endpoint that accepts POST requests and responds with a 2xx status.
isTestingbooleanoptionalIf true, returns a sample response that isn’t billed and doesn’t count toward your plan. Default: false.

Returns

JSON object A confirmation. Farmonaut sends a test POST to the URL as part of registration.

WebhookURLstringThe registered URL.
messagestringConfirmation text.

Errors

StatusMessageCauseFix
400invalid request url is requiredurl is missing.Send the URL.
400Invalid webhook URLThe URL is malformed.Send an absolute https:// URL.
400Failed to trigger webhookThe test POST did not get a success response.Make the endpoint public and return 200.

Common errors:400 invalid request401 invalid api key500 internal error

Related

Objects

The field object

Everything Farmonaut stores about a field. Returned by Retrieve a field, Update field boundary and (partly) Create a field.

Map keys written in braces, like {date}, are placeholders. The real key is a value such as 20240825 or ndvi.

Properties

FieldIDstringUnique ID of the field.
UIDstringYour account ID (also called API ID).
Name, EmailstringOwner name and email.
FieldAddressstringStreet address, looked up from the boundary.
CoordinatesobjectBoundary points keyed a, P_1, P_2โ€ฆ each with Latitude and Longitude.
CenterLat, CenterLongnumberCenter of the field in decimal degrees.
FieldMinLat, FieldMaxLat, FieldMinLong, FieldMaxLongnumberBounding box.
FieldLatLen, FieldLongLennumberHeight and width of the bounding box in degrees.
FieldAreaintegerArea in square meters.
CropCodestringCrop code. See Crop codes.
hUnitsintegerHectare units used by this field.
OrderDatestringDate of the first monitoring order.
PaymentTypestringPlan length of the last order in months: 1, 3, 6 or 12.
PaidstringYes or No: whether the current order is paid.
Paused, Expired, Expiringstringyes or no. A missing key means no.
GenTifstringyes if GeoTIFF generation is enabled.
LanguagestringComma-separated report language codes.
SensedDaysobjectSatellite visit dates (YYYYMMDD) โ†’ yes or zone alerts. See List sensed days.
SARDaysobjectRadar visit dates โ†’ yes.
FailedDaysobjectVisit dates with no usable data because of clouds โ†’ yes.
HealthobjectImage type โ†’ date โ†’ field-average index on the 0โ€“100 scale.
IndexBreakdownobjectDate โ†’ image type โ†’ 10 areas (mยฒ) for index ranges 0โ€“0.1 โ€ฆ 0.9โ€“1.0.
WeatherobjectVisit date โ†’ weather day object.
YieldobjectVisit date โ†’ estimated yield in metric tons.

Objects

The polygon object

A sub-area inside a field. Returned by Retrieve a polygon and Create or update a polygon.

Properties

PolygonIDstringUnique ID of the polygon.
FieldIDstringThe parent field.
UIDstringYour account ID.
CoordinatesobjectBoundary points keyed P_0, P_1โ€ฆ with Latitude/Longitude.
AreaintegerPolygon area.
Name, PhoneNumberstringFarmer name and phone number.
City, FullAddressstringNearest city and full address.
FarmerInfoDataobjectOrganization-specific farmer data (see Create or update a polygon).
TimeStampstringInternal timestamp (Unix milliseconds).

Objects

The weather day object

Daily weather summary used by Get past weather and the Weather map of the field object.

Properties

stationstringName of the nearest weather station.
min_temp, max_tempnumberMinimum and maximum temperature, in kelvin.
humidityintegerRelative humidity, %.
cloud_coverintegerCloud cover, %.
pressureintegerAtmospheric pressure at sea level, hPa.
wind_speednumberWind speed, m/s.
wind_degintegerWind direction, meteorological degrees.
Farmonaut Farmonaut Trusted by 200,000+ users and 100+ businesses 200,000+ users trust us Get started