Entities#
The current or historical state of aircraft, flights, vehicles, people, stands and runways.
The entity object#
Attributes#
identity IDrequiredtype:key. The key is stable for the life of the entity.objectstringrequired- Always
entity. typeenumrequired- One of
aircraft,flight,vehicle,person,stand,runway,taxiway,area,airport. labelstringrequired- A display name: registration, flight number, stand name.
positionobject | nullrequired- Last known position at
at. Null for entities without one, such as flights.Child attributes
latnumberrequiredlonnumberrequired
distance_mnumber- Distance from
near, in metres. Present only on spatial queries with a point. attributesobjectrequired- Type-specific state. See the shared model for the attributes of each type.
observed_attimestamprequired- Time of the latest observation that contributed to this state.
provenanceobjectrequired- For each attribute, the ID of the observation it came from.
Entity object
{
"id": "stand:C2",
"object": "entity",
"type": "stand",
"label": "C2",
"position": {
"lat": 13.69214,
"lon": 100.75388
},
"attributes": {
"status": "open",
"occupied_by": "aircraft:8851a4",
"allocated_to": "flight:TG403-20261123",
"allocation_from": "2026-11-23T01:20:00Z",
"allocation_until": "2026-11-23T03:25:00Z",
"next_allocation": "flight:EK385-20261123"
},
"observed_at": "2026-11-23T02:41:07Z",
"provenance": {
"occupied_by": "obs_2Rn8Wd4yF6pe",
"allocated_to": "obs_6Wm2Ct8hR4sd",
"next_allocation": "obs_0Yb5Qz7gL3ne"
}
}
List entities#
GET/v1/airports/{airport}/entities
Returns entities at one instant. Filter by type, and by distance from a point
with near and radius. With near, results are ordered by distance and each
entity carries distance_m; otherwise they are ordered by ID.
Path parameters#
airportICAO coderequired- The airport's ICAO code.
Query parameters#
typecomma-separated enums- Comma-separated entity types to include. Omit for all types the key may read. Values:
aircraft,flight,vehicle,person,stand,runway,taxiway,area,airport. nearstring- A point as
lat,lonin WGS 84 decimal degrees. Requiresradius. radiusnumber- Distance from
nearin metres, from 1 to 20000. Requiresnear. attimestamp- The instant to read, RFC 3339 in UTC. Omit for now.
known_attimestamp- Read only what had been received by this instant. Omit to use everything received so far, including late and corrected observations.
limitinteger- Page size, from 1 to 500. Default
100. cursorstring- The
next_cursorfrom the previous page. Other parameters must not change between pages. Cursors expire after one hour.
Response#
200 A page of entities at at. data holds entity objects.
objectstringrequired- Always
list. airportICAO coderequired- An ICAO airport code.
attimestamprequired- The instant the page describes. Every page of one query uses the same instant.
revisionintegerrequired- The airport revision the page was read at.
dataarray of objectsrequired-
Child attributes
identity IDrequiredtype:key. The key is stable for the life of the entity.objectstringrequired- Always
entity. typeenumrequired- One of
aircraft,flight,vehicle,person,stand,runway,taxiway,area,airport. labelstringrequired- A display name: registration, flight number, stand name.
positionobject | nullrequired- Last known position at
at. Null for entities without one, such as flights.Child attributes
latnumberrequiredlonnumberrequired
distance_mnumber- Distance from
near, in metres. Present only on spatial queries with a point. attributesobjectrequired- Type-specific state. See the shared model for the attributes of each type.
observed_attimestamprequired- Time of the latest observation that contributed to this state.
provenanceobjectrequired- For each attribute, the ID of the observation it came from.
next_cursorstring | nullrequiredcursor to fetch the next page. Null on the last page.const res = await fetch("https://api.surfacelens.app/v1/airports/VTBS/entities?type=aircraft&near=13.69214,100.75388&radius=600", {
headers: { Authorization: `Bearer ${process.env.SURFACELENS_KEY}` },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const page = await res.json();
Response200
{
"object": "list",
"airport": "VTBS",
"at": "2026-11-23T02:58:41Z",
"revision": 48213377,
"data": [
{
"id": "aircraft:8851a4",
"object": "entity",
"type": "aircraft",
"label": "HS-THB",
"position": {
"lat": 13.69212,
"lon": 100.75391
},
"distance_m": 3.6,
"attributes": {
"registration": "HS-THB",
"icao24": "8851a4",
"aircraft_type": "A359",
"callsign": "THA403",
"flight": "flight:TG403-20261123",
"stand": "stand:C2",
"movement": "parked",
"heading_deg": 312,
"ground_speed_kt": 0
},
"observed_at": "2026-11-23T02:58:39.800Z",
"provenance": {
"position": "obs_7Kc2Lq9vT0ma",
"stand": "obs_2Rn8Wd4yF6pe",
"flight": "obs_5Hv1Xb7sM3jk"
}
},
{
"id": "aircraft:76cd51",
"object": "entity",
"type": "aircraft",
"label": "9V-SMF",
"position": {
"lat": 13.69331,
"lon": 100.75302
},
"distance_m": 160.2,
"attributes": {
"registration": "9V-SMF",
"icao24": "76cd51",
"aircraft_type": "A359",
"callsign": "SIA709",
"flight": "flight:SQ709-20261123",
"stand": "stand:C4",
"movement": "taxi",
"heading_deg": 221,
"ground_speed_kt": 9
},
"observed_at": "2026-11-23T02:58:40.600Z",
"provenance": {
"position": "obs_9Pd4Nc2wQ8ra",
"stand": "obs_1Tg6Vh3kZ5mb",
"flight": "obs_4Ls8Jq0eY2xc"
}
}
],
"next_cursor": null
}
Search entities by area#
POST/v1/airports/{airport}/entities/search
Returns entities inside an area at one instant. The area is a circle, a GeoJSON polygon, or an airfield feature such as a runway or apron. Use this operation when the area is too large for a query string. It reads data and is safe to retry.
Path parameters#
airportICAO coderequired- The airport's ICAO code.
Request body#
withinCircle | Polygon | Airfield featurerequired- The area. Exactly one of the three shapes.
Variants
Circle
pointobjectrequired- WGS 84 decimal degrees.
Child attributes
latnumberrequiredlonnumberrequired
radius_mnumberrequired
Polygon
polygonobjectrequired- A GeoJSON Polygon, longitude first.
Airfield feature
featureentity IDrequiredtype:key. The key is stable for the life of the entity.buffer_mnumber- Grow the feature's outline by this many metres. Default
0.
typesarray of enumsattimestamp- RFC 3339 in UTC, with up to millisecond precision.
known_attimestamp- RFC 3339 in UTC, with up to millisecond precision.
limitinteger- Default
100. cursorstring
Response#
200 A page of entities inside the area. data holds entity objects.
objectstringrequired- Always
list. airportICAO coderequired- An ICAO airport code.
attimestamprequired- The instant the page describes. Every page of one query uses the same instant.
revisionintegerrequired- The airport revision the page was read at.
dataarray of objectsrequired-
Child attributes
identity IDrequiredtype:key. The key is stable for the life of the entity.objectstringrequired- Always
entity. typeenumrequired- One of
aircraft,flight,vehicle,person,stand,runway,taxiway,area,airport. labelstringrequired- A display name: registration, flight number, stand name.
positionobject | nullrequired- Last known position at
at. Null for entities without one, such as flights.Child attributes
latnumberrequiredlonnumberrequired
distance_mnumber- Distance from
near, in metres. Present only on spatial queries with a point. attributesobjectrequired- Type-specific state. See the shared model for the attributes of each type.
observed_attimestamprequired- Time of the latest observation that contributed to this state.
provenanceobjectrequired- For each attribute, the ID of the observation it came from.
next_cursorstring | nullrequiredcursor to fetch the next page. Null on the last page.const res = await fetch("https://api.surfacelens.app/v1/airports/VTBS/entities/search", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SURFACELENS_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
within: {
feature: "runway:02R-20L",
buffer_m: 75,
},
types: ["vehicle", "person"],
at: "2026-11-23T02:58:41Z",
}),
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const page = await res.json();
import httpx, os
res = httpx.post(
"https://api.surfacelens.app/v1/airports/VTBS/entities/search",
headers={"Authorization": f"Bearer {os.environ['SURFACELENS_KEY']}"},
json={
"within": {
"feature": "runway:02R-20L",
"buffer_m": 75,
},
"types": ["vehicle", "person"],
"at": "2026-11-23T02:58:41Z",
},
)
res.raise_for_status()
page = res.json()
Response200
{
"object": "list",
"airport": "VTBS",
"at": "2026-11-23T02:58:41Z",
"revision": 48213377,
"data": [
{
"id": "vehicle:FM-07",
"object": "entity",
"type": "vehicle",
"label": "Follow-me 07",
"position": {
"lat": 13.68342,
"lon": 100.74251
},
"attributes": {
"vehicle_type": "follow_me",
"operator": "AOT",
"movement": "moving",
"heading_deg": 18,
"ground_speed_kt": 22,
"runway_clearance": "runway:02R-20L"
},
"observed_at": "2026-11-23T02:58:40.100Z",
"provenance": {
"position": "obs_8Fe3Mr6tB1qa",
"runway_clearance": "obs_3Gu7Kp1nD9wz"
}
}
],
"next_cursor": null
}
Retrieve an entity#
GET/v1/airports/{airport}/entities/{entity}
Returns one entity's state at at, or now if at is omitted.
Path parameters#
airportICAO coderequired- The airport's ICAO code.
entityentity IDrequired- The entity ID, such as
aircraft:8851a4orstand:C2.
Query parameters#
attimestamp- The instant to read, RFC 3339 in UTC. Omit for now.
known_attimestamp- Read only what had been received by this instant. Omit to use everything received so far, including late and corrected observations.
Response#
200 The entity. Returns entity object.
Response200
{
"id": "stand:C2",
"object": "entity",
"type": "stand",
"label": "C2",
"position": {
"lat": 13.69214,
"lon": 100.75388
},
"attributes": {
"status": "open",
"occupied_by": "aircraft:8851a4",
"allocated_to": "flight:TG403-20261123",
"allocation_from": "2026-11-23T01:20:00Z",
"allocation_until": "2026-11-23T03:25:00Z",
"next_allocation": "flight:EK385-20261123"
},
"observed_at": "2026-11-23T02:41:07Z",
"provenance": {
"occupied_by": "obs_2Rn8Wd4yF6pe",
"allocated_to": "obs_6Wm2Ct8hR4sd",
"next_allocation": "obs_0Yb5Qz7gL3ne"
}
}