β‘οΈ query-layer-data-spec
GET https://{{host}}.arcgis.com/{{org_id}}/ArcGIS/rest/services/{{service_name}}/FeatureServer/{{layer_id}}/query
Use the query
operation to access de data in a feature layer. Learn more about what Feature layers are and how they work in β‘οΈ query-feature-layer-metadata-spec

In the [Structures and definitions] folder you will find request to help you setting the: host
, org_id
, service_name
and layer_id
environment variables.
π API reference: query
operation
π§ͺ Playground: each Feature Layer includes a web interface under the URL https://<host>.arcgis.com/<org_id>/ArcGIS/rest/services/<service_name>/FeatureServer/<layer_id>/query
(Utils: video tutorial & Chrome Extension)
π Related guides: Hosted feature layers > Get feature layer data
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
f | string | (Required) Format of the response: html | |
token | string | You need a valid access token if acccessing private layers. To learn more, read the collection's documentation. | |
where | string | SQL where clause syntax | |
geometry | string | Geometry to apply as the spatial filter. | |
geometryType | string | esriGeometryPoint | |
spatialRel | string | The spatial relationship to be applied to the input geometry for the query. esriSpatilRelIntersects | |
outFields | string | List of fields to include in the returned result. | |
returnGeometry | string | The default is true . | |
resultRecordCount | string | Fetch query results up to the number specified. |