Skip to content

Get index statistics

GET
/v1/fields/{id}/statistics
curl --request GET \
--url 'https://api.agrosat.uz/v1/fields/cmgz7k2qv0004l8p3a9d1x6rt/statistics?index=ndvi&from=2026-05-01&to=2026-05-31&source=sentinel-2' \
--header 'X-API-Key: <X-API-Key>'

Per-date statistics of one index over the field, oldest first. A date with no valid pixels has null values and valid_fraction 0. Dates whose preparation ended without statistics in the last 24 hours are listed in unavailable_dates instead of being retried. Costs ceil(area_ha × dates returned / 10) units, at least 1; a response with no dates costs 0.

id
required
string

Example

cmgz7k2qv0004l8p3a9d1x6rt

Field id returned by registration

index
required
string
Allowed values: ndvi ndre ndmi msavi evi gndvi rci rendvi sipi gci ndpi

Vegetation index. With source=planet: ndvi, ndre, msavi, evi, gndvi, rci, sipi, gci.

from
required
string format: date

Example

2026-05-01

First day of the window

to
required
string format: date

Example

2026-05-31

Last day, at most 366 days after from

source
string
Allowed values: sentinel-2 planet

sentinel-2 (default) or planet. Planet requires a separate agreement.

Statistics in the window

Media typeapplication/json
object
success
required
boolean
data
required
object
field_id
required
string
index
required
string
Allowed values: ndvi ndre ndmi msavi evi gndvi rci rendvi sipi gci ndpi
data
required

Oldest first

Array<object>
object
date
required
string format: date
mean
required

Mean index value over valid pixels; null if none

number
nullable
median
required

Median

number
nullable
min
required

Minimum

number
nullable
max
required

Maximum

number
nullable
std
required

Standard deviation

number
nullable
p10
required

10th percentile

number
nullable
p90
required

90th percentile

number
nullable
valid_fraction
required

Share of field pixels that were valid, 0 to 1

number
cloud_fraction
required

Share of field pixels masked as cloud, 0 to 1

number
nullable
cloud_mask

sentinel-2 only. scl_cld: scene classification plus cloud probability; scl: scene classification only

string
Allowed values: scl_cld scl
unavailable_dates
required

Catalog dates whose preparation ended without statistics, ascending

Array<string>

Example

{
"success": true,
"data": {
"field_id": "cmgz7k2qv0004l8p3a9d1x6rt",
"index": "ndvi",
"data": [
{
"date": "2026-05-14",
"mean": 0.6124,
"median": 0.6347,
"min": 0.1812,
"max": 0.8021,
"std": 0.0938,
"p10": 0.4783,
"p90": 0.7214,
"valid_fraction": 0.9871,
"cloud_fraction": 0.0129,
"cloud_mask": "scl_cld"
}
],
"unavailable_dates": []
}
}
X-AgroSat-Units
integer
Example
13

Units this response consumed

Data is being prepared. Repeat the request after Retry-After seconds. Not billed.

Media typeapplication/json
object
success
required
boolean
error
required
object
code
required
string
Allowed values: invalid_api_key rate_limited field_not_found invalid_geometry field_too_large duplicate_geometry external_id_conflict quota_exceeded invalid_index source_not_enabled invalid_date_range date_out_of_range no_imagery_for_date data_pending invalid_request not_found internal_error
message
required

English text; may change, branch on code

string
existing_field_id

Field already holding this external_id or geometry (409 only)

string

Examples

Exampledata_pending

data_pending

{
"success": false,
"error": {
"code": "data_pending",
"message": "Statistics for this window are being prepared."
}
}
Retry-After
integer
Example
30

Seconds to wait before repeating the request

The index or window is not acceptable

Media typeapplication/json
object
success
required
boolean
error
required
object
code
required
string
Allowed values: invalid_api_key rate_limited field_not_found invalid_geometry field_too_large duplicate_geometry external_id_conflict quota_exceeded invalid_index source_not_enabled invalid_date_range date_out_of_range no_imagery_for_date data_pending invalid_request not_found internal_error
message
required

English text; may change, branch on code

string
existing_field_id

Field already holding this external_id or geometry (409 only)

string

Examples

invalid_index

{
"success": false,
"error": {
"code": "invalid_index",
"message": "index must be one of: ndvi, ndre, ndmi, msavi, evi, gndvi, rci, rendvi, sipi, gci, ndpi."
}
}

X-API-Key is missing, unknown, revoked or expired, or the API is not enabled.

Media typeapplication/json
object
success
required
boolean
error
required
object
code
required
string
Allowed values: invalid_api_key rate_limited field_not_found invalid_geometry field_too_large duplicate_geometry external_id_conflict quota_exceeded invalid_index source_not_enabled invalid_date_range date_out_of_range no_imagery_for_date data_pending invalid_request not_found internal_error
message
required

English text; may change, branch on code

string
existing_field_id

Field already holding this external_id or geometry (409 only)

string

Examples

Exampleinvalid_api_key

invalid_api_key

{
"success": false,
"error": {
"code": "invalid_api_key",
"message": "Missing or invalid API key."
}
}

Source or quota not available

Media typeapplication/json
object
success
required
boolean
error
required
object
code
required
string
Allowed values: invalid_api_key rate_limited field_not_found invalid_geometry field_too_large duplicate_geometry external_id_conflict quota_exceeded invalid_index source_not_enabled invalid_date_range date_out_of_range no_imagery_for_date data_pending invalid_request not_found internal_error
message
required

English text; may change, branch on code

string
existing_field_id

Field already holding this external_id or geometry (409 only)

string

Examples

source_not_enabled

{
"success": false,
"error": {
"code": "source_not_enabled",
"message": "PlanetScope imagery is not enabled for this organization."
}
}

No such field in your organization

Media typeapplication/json
object
success
required
boolean
error
required
object
code
required
string
Allowed values: invalid_api_key rate_limited field_not_found invalid_geometry field_too_large duplicate_geometry external_id_conflict quota_exceeded invalid_index source_not_enabled invalid_date_range date_out_of_range no_imagery_for_date data_pending invalid_request not_found internal_error
message
required

English text; may change, branch on code

string
existing_field_id

Field already holding this external_id or geometry (409 only)

string

Examples

Examplefield_not_found

field_not_found

{
"success": false,
"error": {
"code": "field_not_found",
"message": "Field not found."
}
}

Over the per-key request rate. Not billed.

Media typeapplication/json
object
success
required
boolean
error
required
object
code
required
string
Allowed values: invalid_api_key rate_limited field_not_found invalid_geometry field_too_large duplicate_geometry external_id_conflict quota_exceeded invalid_index source_not_enabled invalid_date_range date_out_of_range no_imagery_for_date data_pending invalid_request not_found internal_error
message
required

English text; may change, branch on code

string
existing_field_id

Field already holding this external_id or geometry (409 only)

string

Examples

Examplerate_limited

rate_limited

{
"success": false,
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded."
}
}
Retry-After
integer
Example
30

Seconds to wait before repeating the request