Copy for LLM[View as Markdown](https://docs.planet.com/develop/apis/statistical/reference/) # Statistical API Reference * Stats API * Statistical * postSubmit statistical request [API docs by Redocly](https://redocly.com/redoc/) # API Reference (1.0.0) Download OpenAPI specification:[Download](https://docs.planet.com/redocusaurus/sh-prod-statistical-api-spec.yaml) ## [](#tag/statistical)Statistical ## [](#tag/statistical/operation/submitStatisticalRequest)Submit statistical request ##### Authorizations: *OAuth2* ##### Request Body schema:application/jsonapplication/json | | | | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | inputrequired | object (ProcessRequestInput) | | aggregationrequired | object (StatisticalRequestAggregation)Specifies how data is aggregated and processed before statistics is calculated. `timeRange` and `aggregationInterval` combined define sampling intervals in time dimension. Width/height or resx/resy combined with `input.bounds` define a sample matrix (i.e. "image") in spatial dimension. | | calculations | object (StatisticalRequestCalculations)Define which statistics and histogram to calculate. It can be specified differently for each evalscript output. If omitted only the basic statistic (min, max, mean, stDev) will be calculated. | ### Responses **200** Successful response **400** Bad request **403** Insufficient permissions post/statistics/v1 https\://services.sentinel-hub.com/statistics/v1 ### Request samples * Payload Content type application/jsonapplication/json Copy Expand all Collapse all `{ "input": { "bounds": { "bbox": [ 13.822174072265625, 45.85080395917834, 14.55963134765625, 46.29191774991382 ], "geometry": { "type": "Polygon", "coordinates": [ [ [ 14.000701904296873, 46.23685258143992 ], [ 13.822174072265625, 46.09037664604301 ], [ 14.113311767578125, 45.85080395917834 ], [ 14.55963134765625, 46.038922598236 ], [ 14.441528320312498, 46.28717293114449 ], [ 14.17236328125, 46.29191774991382 ], [ 14.000701904296873, 46.23685258143992 ] ] ] }, "properties": { "crs": "http://www.opengis.net/def/crs/OGC/1.3/CRS84" } }, "data": [ { "type": "sentinel-2-l1c", "id": "string", "dataFilter": { "timeRange": { "from": "2018-10-01T00:00:00.000Z", "to": "2018-11-01T00:00:00.000Z" }, "mosaickingOrder": "mostRecent", "maxCloudCoverage": 100 }, "processing": { "upsampling": "NEAREST", "downsampling": "NEAREST", "harmonizeValues": true } } ] }, "aggregation": { "timeRange": { "from": "2019-08-24T14:15:22Z", "to": "2019-08-24T14:15:22Z" }, "aggregationInterval": { "of": "string", "lastIntervalBehavior": "SKIP" }, "width": 512, "height": 512, "resx": 0.1, "resy": 0.1, "evalscript": "string" }, "calculations": { "output name1": { "histograms": { "band name1": { "nBins": 0, "binWidth": 0, "lowEdge": 0, "highEdge": 0, "bins": [ 0 ] }, "band name2": { "nBins": 0, "binWidth": 0, "lowEdge": 0, "highEdge": 0, "bins": [ 0 ] } }, "statistics": { "band name1": { "percentiles": { "k": [ 1 ] } }, "band name2": { "percentiles": { "k": [ 1 ] } } } }, "output name2": { "histograms": { "band name1": { "nBins": 0, "binWidth": 0, "lowEdge": 0, "highEdge": 0, "bins": [ 0 ] }, "band name2": { "nBins": 0, "binWidth": 0, "lowEdge": 0, "highEdge": 0, "bins": [ 0 ] } }, "statistics": { "band name1": { "percentiles": { "k": [ 1 ] } }, "band name2": { "percentiles": { "k": [ 1 ] } } } } } }` ### Response samples * 200 * 400 Content type application/json Copy Expand all Collapse all `{ "status": "OK", "geometryPixelCount": 0, "data": [ { "interval": { "from": "2019-08-24T14:15:22Z", "to": "2019-08-24T14:15:22Z" }, "outputs": { "output name1": { "bands": { "band name1": { "histogram": { "overflow": 0, "underflow": 0, "bins": [ { "lowEdge": null, "highEdge": null, "count": null } ] }, "stats": { "min": 0, "max": 0, "mean": 0, "stDev": 0, "sampleCount": 0, "noDataCount": 0, "percentiles": { "percentile [0,1]1": 0.1, "percentile [0,1]2": 0.1 } } }, "band name2": { "histogram": { "overflow": 0, "underflow": 0, "bins": [ { "lowEdge": null, "highEdge": null, "count": null } ] }, "stats": { "min": 0, "max": 0, "mean": 0, "stDev": 0, "sampleCount": 0, "noDataCount": 0, "percentiles": { "percentile [0,1]1": 0.1, "percentile [0,1]2": 0.1 } } } } }, "output name2": { "bands": { "band name1": { "histogram": { "overflow": 0, "underflow": 0, "bins": [ { "lowEdge": null, "highEdge": null, "count": null } ] }, "stats": { "min": 0, "max": 0, "mean": 0, "stDev": 0, "sampleCount": 0, "noDataCount": 0, "percentiles": { "percentile [0,1]1": 0.1, "percentile [0,1]2": 0.1 } } }, "band name2": { "histogram": { "overflow": 0, "underflow": 0, "bins": [ { "lowEdge": null, "highEdge": null, "count": null } ] }, "stats": { "min": 0, "max": 0, "mean": 0, "stDev": 0, "sampleCount": 0, "noDataCount": 0, "percentiles": { "percentile [0,1]1": 0.1, "percentile [0,1]2": 0.1 } } } } } }, "error": { "type": "BAD_REQUEST" } } ] }`