# Sentinel-2 NDVI Time Series: Field Crop Monitor (`treesap_1127/sentinel2-ndvi-time-series`) Actor

NDVI vegetation index per field and clear-sky date from Sentinel-2 satellite imagery. Give coordinates, get a crop greenness time series.

- **URL**: https://apify.com/treesap_1127/sentinel2-ndvi-time-series.md
- **Developed by:** [TaeSung Lee](https://apify.com/treesap_1127) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 observations

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Sentinel-2 NDVI Time Series: Field Crop Monitor

Get a vegetation (NDVI) time series for any field on Earth from Sentinel-2 satellite imagery. Give coordinates or a bounding box and receive one row per field and clear-sky date: mean, median, min, max and standard deviation of NDVI, how many pixels were clear, and which scene was used. No satellite account, API key or GIS software is needed.

### What you get

- One dataset item per field and clear observation date, newest first.
- NDVI statistics computed from the 10 m red (B04) and near-infrared (B08) bands of the Sentinel-2 L2A archive, using only pixels the scene classification (SCL) marks as usable: vegetation, bare soil, water, unclassified and low-probability areas. Cloud, cloud shadow, snow, saturated and missing pixels are left out.
- Field and scene details: label, centre coordinates, area in hectares, satellite (Sentinel-2A, 2B or 2C), MGRS tile, scene id, whole-scene cloud cover and a link to the scene metadata.
- Built for crop and land monitoring, insurance and lending checks, ESG reporting, commodity analysis and AI agents that need "how green is this place right now".

### Input

| Field | Meaning |
|---|---|
| `fields` (required) | One field per line, optional label before a pipe. Point: `latitude,longitude` in Google Maps order, for example `Imperial Valley field\|32.9500,-115.4500`. Bounding box: `minLon,minLat,maxLon,maxLat` in GeoJSON order, for example `-115.4530,32.9480,-115.4470,32.9520`. At most 5 km per side. |
| `startDate`, `endDate` | Observation window in UTC, `YYYY-MM-DD`. Default: the last 60 days. Windows longer than 366 days are shortened. |
| `maxCloudCover` | Skip scenes whose whole-scene cloud cover is above this percentage. Default 50. |
| `minValidPixelRatio` | Minimum share of the field's pixels that must be clear. Default 0.6. Observations below it are not saved or charged. |
| `pointBufferMeters` | A point becomes a square extending this far in every direction. Default 30 (about 60 m wide, 36 pixels). |
| `maxResults` | Maximum observations saved in the whole run. Default 200. |

Example input:

```json
{
  "fields": ["Imperial Valley field|32.9500,-115.4500", "Salton Sea water|33.3000,-115.8500"],
  "startDate": "2026-10-01",
  "endDate": "2026-11-10",
  "maxCloudCover": 40
}
```

Invalid lines are skipped with a warning. The run fails only when no line is valid.

### Output

Each item looks like this (full example in `sample-output.json`):

```json
{
  "field": "Imperial Valley field",
  "date": "2026-11-10",
  "satellite": "Sentinel-2C",
  "mgrsTile": "11SPS",
  "sceneId": "S2C_11SPS_20261110_0_L2A",
  "sceneCloudCover": 0.042807,
  "ndviMean": 0.752,
  "ndviMedian": 0.752,
  "validPixels": 36,
  "totalPixels": 36,
  "validPixelRatio": 1,
  "areaHectares": 0.36,
  "attribution": "Contains modified Copernicus Sentinel data 2026"
}
```

The remaining fields are `fieldInput`, `fieldIndex`, `acquiredAt`, `ndviMin`, `ndviMax`, `ndviStdDev`, `centerLat`, `centerLon` and `sceneMetadataUrl`.

NDVI is (NIR - Red) / (NIR + Red), between -1 and 1: water is negative, bare soil is near 0.1, and healthy crops are roughly 0.6 to 0.9. If a field was seen by several scenes on the same day, only the scene with the most clear pixels is read. Results can be downloaded as JSON, CSV or Excel, or read through the Apify API.

### How it works

- The Actor reads the public Sentinel-2 L2A Cloud Optimized GeoTIFF archive on AWS Open Data. It never downloads whole files: it asks for the file header and only the internal tiles that cover your field, which is about 3 MB per clear observation.
- It first reads the small scene classification band and only reads red and near-infrared on days when enough of the field is clear.
- Requests are sent one at a time and failed requests are retried 3 times with growing waits. Blocked or changed responses are not bypassed.
- If some fields fail, the others are saved and the run still succeeds. The run fails only when every valid field failed. A field with no scenes or no clear day is a warning, not an error.
- Scenes appear in the archive about one day after acquisition.

#### Limits

- Resolution is 10 m, so fields smaller than about 0.5 ha contain very few pixels and the numbers are noisy. A field is a rectangle; polygons are not supported.
- Sentinel-2 revisits every 2 to 5 days; persistent cloud means fewer or no observations.
- Coverage is 80°S to 84°N. Remote areas may have no scenes for a window.

### Pricing

The Actor uses pay per event: you are charged per observation saved to the dataset. The draft price is **$0.005 per observation** (about $5 per 1,000). One field over the default 60 days typically returns 10 to 15 observations, so roughly $0.05 to $0.08; one field for a year is about $0.5 to $0.75. The final price is whatever is configured in the Apify Console when the Actor is published. The Actor stops by itself when your maximum cost per run or `maxResults` is reached.

### Legal and FAQ

#### Is the data allowed to be reused?

The archive is described on AWS Open Data as "Access to Sentinel data is free, full and open for the broad Regional, National, European and International user community". The Copernicus Sentinel Data Legal Notice states that EU law grants free access to Copernicus Sentinel data for reproduction, distribution, communication to the public, and adaptation, modification and combination with other data, in so far as it is lawful. Distribution requires the source "Copernicus Sentinel data \[Year]", and modified data must be marked as modified. Every result therefore carries "Contains modified Copernicus Sentinel data \[Year]". The bucket has no robots.txt and no documented request limit, so this Actor reads only the fields and dates you ask for, one request at a time.

#### Is this an official service?

No. This Actor is not affiliated with, endorsed by or operated by ESA, the European Commission, Copernicus or Element 84. No Copernicus, ESA or Element 84 logos are used.

#### Does it collect personal data?

No. The output contains coordinates you provided and image statistics only.

#### Are the numbers guaranteed?

No. The data is provided as is, without warranty. NDVI from a 10 m satellite pixel grid is an estimate and can be affected by haze, shadows or undetected cloud. It is not agronomic, insurance or investment advice.

#### Responsibility

You are responsible for complying with the terms, licences and laws that apply to your use of the data. This section summarises the source terms as checked on 2026-11-11 and is not legal advice.

#### Why did I get fewer observations than I expected?

Either no scene was clear enough (see `maxCloudCover` and `minValidPixelRatio`), the window had no scenes, or `maxResults` or your cost limit stopped the run. The log lists scenes, clear observations and saved items per field.

#### Can I get imagery, other indices or polygon fields?

Not in this version: only NDVI statistics for point and rectangle fields.

# Actor input Schema

## `fields` (type: `array`):

One field per line, optional label before a pipe. Point: `latitude,longitude` (as copied from Google Maps), e.g. `My field|32.9500,-115.4500`. Bounding box: `minLon,minLat,maxLon,maxLat` (GeoJSON order), e.g. `-115.4530,32.9480,-115.4470,32.9520`. Max 5 km per side.

## `startDate` (type: `string`):

First observation date (UTC, inclusive), YYYY-MM-DD. Empty = end date minus 60 days. Periods longer than 366 days are shortened.

## `endDate` (type: `string`):

Last observation date (UTC, inclusive), YYYY-MM-DD. Empty = today.

## `maxCloudCover` (type: `integer`):

Scenes with a higher whole-scene cloud percentage are skipped without reading pixels.

## `minValidPixelRatio` (type: `number`):

Minimum share of the field's pixels that must be clear (no cloud, shadow, snow or missing data). Observations below this are not saved or charged.

## `pointBufferMeters` (type: `integer`):

A point is turned into a square extending this many meters in each direction (30 = about 60 m wide, 36 pixels).

## `maxResults` (type: `integer`):

Maximum number of observations (dataset items) saved in the whole run. Newest dates are kept first.

## Actor input object example

```json
{
  "fields": [
    "Imperial Valley field|32.9500,-115.4500"
  ],
  "maxCloudCover": 50,
  "minValidPixelRatio": 0.6,
  "pointBufferMeters": 30,
  "maxResults": 20
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "fields": [
        "Imperial Valley field|32.9500,-115.4500"
    ],
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("treesap_1127/sentinel2-ndvi-time-series").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "fields": ["Imperial Valley field|32.9500,-115.4500"],
    "maxResults": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("treesap_1127/sentinel2-ndvi-time-series").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "fields": [
    "Imperial Valley field|32.9500,-115.4500"
  ],
  "maxResults": 20
}' |
apify call treesap_1127/sentinel2-ndvi-time-series --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,treesap_1127/sentinel2-ndvi-time-series"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Dv06laf6OZsOobiit/builds/syjAqmCNHALKFEiuK/openapi.json
