Everything about a spot
const url = 'https://api.uavcrew.ai/v1/location?lat=1&lon=1&layers=airspace%2Ctfr&alt_ft=400&radius_nm=5';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.uavcrew.ai/v1/location?lat=1&lon=1&layers=airspace%2Ctfr&alt_ft=400&radius_nm=5' \ --header 'Authorization: Bearer <token>'Return what is known about one spot: every layer, or only the layers asked for.
Each layer answers on its own with a status. Only ok carries data;
unavailable and not_built mean nothing is known, never that the
spot is clear. The response is data, not a go/no-go decision.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Latitude (WGS84).
Latitude (WGS84).
Longitude (WGS84).
Longitude (WGS84).
Height of interest in feet above ground.
Height of interest in feet above ground.
How far around the spot to look for nearby features, in nautical miles.
How far around the spot to look for nearby features, in nautical miles.
Responses
Section titled “Responses”Successful Response
object
object
Latitude in decimal degrees (WGS84).
Longitude in decimal degrees (WGS84).
Height of interest in feet AGL, as asked.
How far around the spot nearby features were searched.
The time the answer is for (UTC).
The layers asked for, keyed by name, in a fixed order.
object
One layer’s answer for the spot.
object
ok: data is the answer, and an empty list there means nothing was found. unavailable: the source could not be read, so nothing is known. not_built: this layer is planned but not available yet. Treat anything but ok as unknown, never as clear.
The layer’s answer. Null unless status is ok.
Example
{ "layers": { "additionalProperty": { "status": "ok" } }}Validation Error
object
object
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}