API documentation
Build on the scene.
Reference for the TwinEarth API, version 1: authentication, layers and features, tiles, the 3D scene, imagery, satellite analyses, exports and webhooks.
Overview
The TwinEarth API gives your systems direct access to the scene: its layers, its imagery, its 3D tiles and the analyses run on it. It follows open geospatial standards wherever one exists, so most GIS software, web map libraries and 3D engines can connect without a custom client.
- Base URL
https://api.twinearth.io/v1- Format
- JSON and GeoJSON over HTTPS
- Standards
- OGC API Features, OGC API Tiles, 3D Tiles, STAC
- Coordinate reference
- WGS 84 (CRS84) by default; others on request per collection
Every response carries the source, the observation date and the terms of use of the data it returns, exactly as the scene does.
Authentication
Access is granted per organisation. Each key is issued with an access key, which identifies it, and a secret key, which never travels with a request. A key works only from the network addresses registered for it, only for the permissions it holds and only inside the areas it covers.
Every request is signed. It carries four headers:
| Header | Type | Description |
|---|---|---|
X-TE-Access-Key | string | The access key. |
X-TE-Timestamp | integer | The current time in Unix seconds. Requests more than five minutes from the server's clock are refused. |
X-TE-Nonce | string | A random value of 16 to 64 characters (letters, digits, -, _), new for every request. A value is accepted once. |
X-TE-Signature | string | HMAC-SHA256 of the string below, keyed with the secret key, in lowercase hexadecimal. |
The string to sign is six lines joined by a line feed: the method, the path, the query, the timestamp, the nonce and the SHA-256 of the body in hexadecimal. The query is written with each name and value percent-encoded and the pairs sorted by name; for a request without a body, the last line is the SHA-256 of the empty string.
GET
/v1/collections/buildings/items
bbox=8.5%2C47.35%2C8.6%2C47.4&limit=100
1796468000
k3J9s0QwX2mVbT7nLr4HcA8dZy6PfUeG
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855import hashlib, hmac, json, secrets, time
from urllib.parse import quote, urlsplit, parse_qsl
import requests
BASE = "https://api.twinearth.io"
def call(method, path_and_query, body=None, *, access_key, secret_key):
parts = urlsplit(path_and_query)
pairs = sorted((quote(k, safe=""), quote(v, safe="")) for k, v in parse_qsl(parts.query, keep_blank_values=True))
query = "&".join(f"{k}={v}" for k, v in pairs)
data = b"" if body is None else json.dumps(body).encode()
timestamp, nonce = str(int(time.time())), secrets.token_urlsafe(24)
to_sign = "\n".join([method, parts.path, query, timestamp, nonce, hashlib.sha256(data).hexdigest()])
headers = {
"X-TE-Access-Key": access_key,
"X-TE-Timestamp": timestamp,
"X-TE-Nonce": nonce,
"X-TE-Signature": hmac.new(secret_key.encode(), to_sign.encode(), hashlib.sha256).hexdigest(),
}
if body is not None:
headers["Content-Type"] = "application/json"
return requests.request(method, BASE + path_and_query, data=data or None, headers=headers, timeout=30)
r = call("GET", "/v1/collections", access_key=ACCESS_KEY, secret_key=SECRET_KEY)The examples on this page use this call function. Because the body and the query are part of the signature, a request that is altered on the way, or sent a second time, is refused.
| Permission | Type | Description |
|---|---|---|
collections:read | read | List and describe collections. |
features:read | read | Read features. |
tiles:read | read | Read map tiles. |
scene:read | read | Read 3D scenes. |
imagery:read | read | Search the imagery catalogue. |
analyses:read | read | Read analysis results. |
analyses:run | write | Start satellite analyses. |
exports:read | read | Read export status and files. |
exports:create | write | Create exports. |
webhooks:manage | write | Manage webhooks. |
A key limited to certain areas must state the area it asks for: bbox as a query parameter on feature requests, and a bbox member in the body of imagery searches, analyses and exports. A box that reaches outside the areas of the key is refused with 403.
Keep the secret key on the server side. It is shown once, when the key is issued; if it may have been exposed, ask us to replace it and the old one stops working at once. Requests that cannot be authenticated return 401; requests from an unregistered address, without the needed permission or outside the areas of the key return 403.
Collections
A collection is one layer of the scene for a given region: terrain, imagery, buildings, road network, vegetation or semantics. Collections follow OGC API Features.
/collectionsLists the collections your key can read.
/collections/{collectionId}Returns one collection with its extent, coordinate reference systems, source and last observation date.
{
"id": "buildings",
"title": "Buildings",
"extent": {
"spatial": { "bbox": [[-31.3, 12.0, 63.4, 71.2]] },
"temporal": { "interval": [["2024-01-01T00:00:00Z", null]] }
},
"source": "Described per feature in properties.source",
"links": [
{ "rel": "items", "href": "https://api.twinearth.io/v1/collections/buildings/items" }
]
}Features
Features are the objects inside a collection: a building, a road segment, a parcel of vegetation. Each one keeps a stable identity across the 2D map, the 3D scene and every export.
/collections/{collectionId}/itemsReturns features as a GeoJSON FeatureCollection.
/collections/{collectionId}/items/{featureId}Returns a single feature.
| Parameter | Type | Description |
|---|---|---|
bbox | number[4] | Bounding box as west, south, east, north. |
datetime | string | An instant or an interval in RFC 3339, for example 2025-01-01T00:00:00Z/... |
limit | integer | Number of features per page. |
cursor | string | Opaque cursor taken from the next link of the previous page. |
r = call("GET", "/v1/collections/buildings/items?bbox=28.95,41.00,29.02,41.05&limit=100", access_key=ACCESS_KEY, secret_key=SECRET_KEY){
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"id": "bld_8f3a2c",
"geometry": { "type": "Polygon", "coordinates": [[[28.9712, 41.0123], [28.9715, 41.0123], [28.9715, 41.0126], [28.9712, 41.0126], [28.9712, 41.0123]]] },
"properties": {
"height_m": 21.4,
"source": "Named in the collection metadata",
"observed": "2026-03-14",
"version": 7
}
}
],
"links": [{ "rel": "next", "href": "https://api.twinearth.io/v1/collections/buildings/items?cursor=..." }]
}Map tiles
Vector and raster tiles follow OGC API Tiles and work with common web map libraries.
/collections/{collectionId}/tiles/{tileMatrixSetId}/{z}/{y}/{x}Returns one tile. WebMercatorQuad is available for every collection.
// MapLibre GL JS
map.addSource("twinearth-roads", {
type: "vector",
tiles: ["https://api.twinearth.io/v1/collections/roads/tiles/WebMercatorQuad/{z}/{y}/{x}?f=mvt"],
});Tile requests accept the same bearer token. For browser maps, proxy tile requests through your own server so that the key is never exposed.
3D scene
The 3D scene is delivered as 3D Tiles, the open standard read by CesiumJS, Cesium for Unreal and other 3D engines.
/scenes/{sceneId}/tileset.jsonReturns the root tileset for a scene. Child tiles are resolved relative to it.
// CesiumJS
const tileset = await Cesium.Cesium3DTileset.fromUrl(
"https://your-proxy.example/twinearth/scenes/istanbul-core/tileset.json"
);
viewer.scene.primitives.add(tileset);Scenes can also be exported as OpenUSD and, where suitable road data exists, as OpenDRIVE. See Exports.
Imagery catalogue
Imagery is catalogued with STAC and stored as Cloud Optimized GeoTIFF, so a client can read only the window it needs.
/stac/searchSearches imagery by area, date and collection.
{
"collections": ["imagery"],
"bbox": [28.95, 41.00, 29.02, 41.05],
"datetime": "2026-01-01T00:00:00Z/2026-06-30T23:59:59Z",
"limit": 10
}Each item lists its assets, their licence and the observation date. Asset links are signed and expire.
Satellite analyses
Analyses run asynchronously. You submit a job for an area and a period, then read the result when it is ready or receive a webhook. The available types match the analyses listed on the Satellite analysis section; availability depends on sensor, revisit and region.
/analysesCreates an analysis job.
/analyses/{analysisId}Returns the status of a job and, when complete, links to its outputs.
r = call("POST", "/v1/analyses", access_key=ACCESS_KEY, secret_key=SECRET_KEY, body={
"type": "change-detection",
"bbox": [28.95, 41.00, 29.02, 41.05],
"area": { "type": "Polygon", "coordinates": [[[28.95,41.00],[29.02,41.00],[29.02,41.05],[28.95,41.05],[28.95,41.00]]] },
"from": "2025-06-01",
"to": "2026-06-01"
}){
"id": "an_41c9",
"type": "change-detection",
"status": "queued",
"created": "2026-12-05T09:12:44Z",
"links": [{ "rel": "self", "href": "https://api.twinearth.io/v1/analyses/an_41c9" }]
}Status moves through queued, running, succeeded or failed. Automated findings are candidates until an expert has reviewed them; they do not replace an official assessment.
Exports
An export packages a selected area and set of layers into files for GIS, simulation or offline work.
/exportsCreates an export job.
/exports/{exportId}Returns the status of the export and signed download links when it is ready.
| Parameter | Type | Description |
|---|---|---|
area | GeoJSON geometry | The area to export. |
collections | string[] | Layers to include. |
format | string | geopackage, geojson, geoparquet, cog, 3dtiles, openusd or opendrive. |
Offline packages are offered where the data rights of the sources allow it.
Webhooks
Webhooks notify your system when something you care about changes, so you do not need to poll.
| Parameter | Type | Description |
|---|---|---|
analysis.succeeded | event | An analysis job finished and its outputs are ready. |
analysis.failed | event | An analysis job could not be completed. |
export.ready | event | An export is ready to download. |
change.detected | event | A change candidate was recorded inside a monitored area. |
{
"id": "evt_7d21",
"type": "analysis.succeeded",
"created": "2026-12-05T09:31:02Z",
"data": { "analysisId": "an_41c9" }
}Each delivery is signed. Verify the signature header against your webhook secret before acting on the payload, and answer with a 2xx status quickly; failed deliveries are retried.
Errors
Errors use standard HTTP status codes and a JSON body in the problem details format.
{
"type": "https://api.twinearth.io/problems/area_not_allowed",
"title": "The requested area is outside the areas this key may read.",
"status": 403,
"code": "area_not_allowed"
}| Parameter | Type | Description |
|---|---|---|
400 | Bad request | A parameter is missing or malformed. |
401 | Unauthorised | The request could not be authenticated: unknown or inactive key, wrong signature, a timestamp too far from now, or a nonce used before. |
403 | Forbidden | The address is not registered for the key, the key lacks the permission, or the area is outside its areas. |
404 | Not found | The collection, feature or job does not exist. |
429 | Too many requests | The rate limit of your package was reached; retry after the interval in the Retry-After header. |
5xx | Server error | Retry with backoff; contact us if it persists. |
Versioning and support
The version is part of the path. Changes that would break an existing client are released under a new version; additions such as new fields or new collections are made within the current one, so clients should ignore fields they do not recognise.
The machine-readable OpenAPI definition and the limits of your package are provided with your API key. For integration questions, contact the technical team.