Get index statistics
const url = 'https://api.agrosat.uz/v1/fields/cmgz7k2qv0004l8p3a9d1x6rt/statistics?index=ndvi&from=2026-05-01&to=2026-05-31&source=sentinel-2';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
cmgz7k2qv0004l8p3a9d1x6rtField id returned by registration
Query Parameters
Section titled “Query Parameters”Vegetation index. With source=planet: ndvi, ndre, msavi, evi, gndvi, rci, sipi, gci.
Example
2026-05-01First day of the window
Example
2026-05-31Last day, at most 366 days after from
sentinel-2 (default) or planet. Planet requires a separate agreement.
Responses
Section titled “Responses”Statistics in the window
object
object
Oldest first
object
Mean index value over valid pixels; null if none
Median
Minimum
Maximum
Standard deviation
10th percentile
90th percentile
Share of field pixels that were valid, 0 to 1
Share of field pixels masked as cloud, 0 to 1
sentinel-2 only. scl_cld: scene classification plus cloud probability; scl: scene classification only
Catalog dates whose preparation ended without statistics, ascending
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": [] }}Headers
Section titled “Headers”Example
13Units this response consumed
Data is being prepared. Repeat the request after Retry-After seconds. Not billed.
object
object
English text; may change, branch on code
Field already holding this external_id or geometry (409 only)
Examples
data_pending
{ "success": false, "error": { "code": "data_pending", "message": "Statistics for this window are being prepared." }}Headers
Section titled “Headers”Example
30Seconds to wait before repeating the request
The index or window is not acceptable
object
object
English text; may change, branch on code
Field already holding this external_id or geometry (409 only)
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." }}invalid_date_range
{ "success": false, "error": { "code": "invalid_date_range", "message": "to must be on or after from, at most 366 days apart." }}date_out_of_range
{ "success": false, "error": { "code": "date_out_of_range", "message": "The earliest date available to this organization is 2024-01-01." }}X-API-Key is missing, unknown, revoked or expired, or the API is not enabled.
object
object
English text; may change, branch on code
Field already holding this external_id or geometry (409 only)
Examples
invalid_api_key
{ "success": false, "error": { "code": "invalid_api_key", "message": "Missing or invalid API key." }}Source or quota not available
object
object
English text; may change, branch on code
Field already holding this external_id or geometry (409 only)
Examples
source_not_enabled
{ "success": false, "error": { "code": "source_not_enabled", "message": "PlanetScope imagery is not enabled for this organization." }}quota_exceeded
{ "success": false, "error": { "code": "quota_exceeded", "message": "Monthly unit quota reached (10000 of 10000)." }}No such field in your organization
object
object
English text; may change, branch on code
Field already holding this external_id or geometry (409 only)
Examples
field_not_found
{ "success": false, "error": { "code": "field_not_found", "message": "Field not found." }}Over the per-key request rate. Not billed.
object
object
English text; may change, branch on code
Field already holding this external_id or geometry (409 only)
Examples
rate_limited
{ "success": false, "error": { "code": "rate_limited", "message": "Rate limit exceeded." }}Headers
Section titled “Headers”Example
30Seconds to wait before repeating the request
