Get Started using a CDN

ArcGIS REST JS is hosted on unpkg. You can find URLs for individual packages in the API reference.

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>ArcGIS REST JS</title>
</head>
<body>
  Open your console to see the demo.
</body>
  <!-- require polyfills for fetch and Promise from https://polyfill.io -->
  <script src="https://polyfill.io/v3/polyfill.min.js?features=es5%2Cfetch%2CPromise"></script>

  <!-- require ArcGIS REST JS libraries from https://unpkg.com -->
  <script src="https://unpkg.com/@esri/arcgis-rest-request@3.6.0/dist/umd/request.umd.js"></script>

  <script>
    /* when including ArcGIS REST JS all exports are available
    from the same arcgisRest global */
    arcgisRest.request("https://www.arcgis.com/sharing/rest/info")
      .then(response => {
        console.log(response);
      });
  </script>
</html>