Extent

Tasks that have the extent property in their context parameter will only process features that overlap the specified extent. The output features will have an extent that is the same or larger than the extent, as illustrated below.

Extent syntax:

"extent": {
  "xmin": <minimum x-coordinate>
  "ymin": <minimum y-coordinate>
  "xmax": <maximum x-coordinate>
  "ymax": <maximum y-coordinate>
  "spatialReference": {"wkid": <spatial reference well-known identifier>}
}

See the Spatial Reference topic for information about spatialReference property.

Extent example:

"extent": {
  "xmin": -122.68,
  "ymin": 45.53,
  "xmax": -122.45,
  "ymax": 45.6,
  "spatialReference": {
    "wkid": 4326
  }
}

extent is useful when you need to process only a portion of a larger dataset. You can think of this setting as a rectangle used to select input features for processing. Any feature that overlaps the rectangle defined by the extent will be processed and written to output. Note that the rectangle is used only to select features, not clip them. The extent of the output dataset will typically be larger than the extent setting to account for features that overlap the extent rectangle.

extent

Note:

It is recommended that you always set the extent to the area you are analyzing. Doing so limits the number of features the task needs to examine when performing analysis, as well as limiting the number of credits used by the task. If you do not set extent, all features in the input layer(s) will potentially be analyzed, and credits used by the task will be based on the number of features in the input layer(s).