
Product
Introducing Socket Scanning for VS Code Marketplace Extensions
Socket now scans VS Code extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.
@embedearth/sdk
Advanced tools
EmbedEarth is an open, programmable geographic layer for physical-world data. Use one SDK to search places and observations, run spatial analysis, build routes, render maps, and work with local data.
npm install @embedearth/sdk
Use @embedearth/sdk/node for Stratum and filesystem-backed work.
| Mode | Purpose |
|---|---|
auto | Use verified local Stratum data first, then run the function in Cloud. |
offline | Use only verified local data and make no network request. |
cloud | Run the function in EmbedEarth Cloud. A key is optional, but unauthenticated use is heavily limited. |
An API key is required for unlimited Search and Compute and for Street View image access. Create one at embed.earth and pass it as apiKey; a key is not required to try Cloud mode.
const e2 = new E2({ apiKey: process.env.E2_API_KEY });
Search returns a GeoJSON FeatureCollection. feature is a canonical feature key or numeric ID; use area for a name, area_id for an exact ID, coordinates for a point lookup, or country_code and state_code for code-based area selection.
await e2.search({ feature: "restaurant", area: "New York", mode: "auto" });
await e2.search({ feature: "restaurant", area_id: "4915", mode: "cloud" });
await e2.search({ feature: "restaurant", latitude: 40.7128, longitude: -74.006, mode: "cloud" });
await e2.search({ feature: "restaurant", country_code: "US", state_code: "NY", mode: "cloud" });
Compute returns spatial analysis instead of raw records. feature is what is measured and area or area_id is the scope; relation methods such as near name the related feature.
| Primitive | Purpose |
|---|---|
nearest | Find the closest features. |
distance | Measure distance between feature sets. |
within | Select features inside a relation distance. |
count | Count related features. |
density | Measure feature concentration. |
coverage | Measure reached area. |
gaps | Find unreached areas. |
cluster | Group nearby features. |
await e2.compute.feature("restaurant").areaId("4915").near("park", 500).count();
await e2.compute.feature("restaurant").area("New York").near("park", 500).density();
await e2.compute.run({ primitive: "COUNT", feature: "restaurant", latitude: 40.7128, longitude: -74.006 });
Routing builds directions and network-analysis responses from coordinates or indexed features. It supports feature routes, direct routes, matrices, isochrones, map matching, locate, and height.
Set routeUrl only when you want a custom compatible routing service.
| Function | Purpose |
|---|---|
e2.route.feature(...).from(...).nearest(...) | Route from a coordinate to a matching feature, such as the closest restaurant. |
e2.route.route(...) | Build a route between one or more coordinates. |
e2.route.matrix(...) | Return travel costs between multiple sources and targets. |
e2.route.isochrone(...) | Calculate the area reachable within one or more time limits. |
e2.route.mapMatch(...) | Match a recorded coordinate trace to the road network. |
e2.route.locate(...) | Resolve a coordinate to the routable network. |
e2.route.height(...) | Return elevation data for one or more locations. |
const e2 = new E2({ routeUrl: "https://your-router.example" });
await e2.route.feature("restaurant").from({ lat: 40.7128, lon: -74.006 }).nearest({ mode: "walking" });
await e2.route.matrix({ sources: [{ lat: 40.7128, lon: -74.006 }], targets: [{ lat: 40.7306, lon: -73.9352 }] });
await e2.route.isochrone({ locations: [{ lat: 40.7128, lon: -74.006 }], contours: [{ time: 10 }, { time: 20 }] });
Maps returns MapLibre-ready Planet and feature PMTiles source descriptors. Use @embedearth/sdk/map when you want browser rendering.
const sources = await e2.map.sources(["restaurant"]);
Stratum provides geographic lookup, published data discovery, verified caching, downloads, local queries, and namespaced local uploads. Use it from the Node entry point for local GeoJSON, CSV, Parquet, and SQLite workflows.
| Function | Purpose |
|---|---|
cache.* | Manage verified local data. |
features.* / areas.* | Look up built-in inputs. |
datasets.* | Inspect published data. |
download / query | Pull and query Cloud or local data. |
upload | Add namespaced local data. |
import { E2, stratum } from "@embedearth/sdk/node";
const local = new E2({ cacheDirectory: "./.e2" });
await local.stratum.download({ feature: "restaurant", regionId: "4915" });
await local.stratum.upload({ path: "./stores.geojson", database: "./stores.db", feature: "stores", namespace: "my-app" });
const standalone = stratum({ cacheDirectory: "./.e2" });
Geographical features are the canonical physical-world types used across the SDK, such as restaurants, infrastructure, observations, and imagery-linked records. Browse them at Catalog Features.
Geographical areas are countries, states, cities, and other regions used to scope data. Browse names and stable IDs at Catalog Areas.
EmbedEarth ingests billions of Street View images and discovers new features or where imagery pairs with reported places. Street View is Cloud-only for now because of cost; an API key and an active subscription are required for unlimited use.
FAQs
Official JavaScript/TypeScript SDK for EmbedEarth.
The npm package @embedearth/sdk receives a total of 21 weekly downloads. As such, @embedearth/sdk popularity was classified as not popular.
We found that @embedearth/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Product
Socket now scans VS Code extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.

Research
/Security News
Socket uncovered two malicious VS Code themes in a GlassWorm-linked cluster with thousands of installs across VS Code Marketplace and Open VSX.

Security News
/Company News
Capital One is partnering with Socket to proactively secure its open source supply chain.