ArcGIS REST JS is a lightweight, open source JavaScript library for working with the ArcGIS REST APIs in client-side web apps and server-side Node.js environments. It provides wrapper classes for accessing ArcGIS services to build mapping and spatial analysis applications. Common tasks include querying data, geocoding, routing, and managing portal content.
ArcGIS REST JS does not render maps or visual elements. It is designed to be flexible and works in both browser (client side) and server side JavaScript environments, as well as across different module systems. The library is distributed as native ES modules, CommonJS modules, and UMD modules.
Capabilities
ArcGIS REST JS provides a lightweight, modular design for accessing ArcGIS REST API service endpoints. Its capabilities include:
- Simple functions for tasks such as querying data, geocoding, routing, data enrichment, elevation, and content management
- Support for multiple authentication patterns in both client and server environments
- Flexible setup options through a CDN, Node.js, or modern module bundlers
- Easy integration with mapping libraries such as ArcGIS Maps SDK for JavaScript, Leaflet, MapLibre GL JS, OpenLayers, and CesiumJS
Packages
ArcGIS REST JS divides functionality into separate packages. This structure helps reduce application size by including only the functionality an application needs. All packages have a peer dependency on @esri/arcgis-rest-request that handles authentication.
| Package | Description |
|---|---|
@esri/arcgis-rest-request | Core package for request and response handling, authentication, and error processing. Required for all other packages. |
@esri/arcgis-rest-feature-service | Provides functions to query and edit features in hosted feature layers. |
@esri/arcgis-rest-geocoding | A geocoding wrapper for ArcGIS REST JS. |
@esri/arcgis-rest-routing | A routing and directions wrapper for ArcGIS REST JS. |
@esri/arcgis-rest-demographics | Accesses the ArcGIS GeoEnrichment service. |
@esri/arcgis-rest-elevation | Accesses the ArcGIS Elevation service. |
@esri/arcgis-rest-places | Accesses the ArcGIS Places service. |
@esri/arcgis-rest-portal | Accesses and manages users, groups, and content in an ArcGIS Portal. |
@esri/arcgis-rest-developer-credentials | Manages API keys and OAuth 2.0 application credentials. |
@esri/arcgis-rest-basemap-sessions | Helpers for starting and managing basemap sessions in ArcGIS REST JS. |