positionstack · Schema
Location
A single geocoded location result returned by the positionstack API.
GeocodingReverse GeocodingMapsLocationAddress ValidationapilayerPublic APIs
Properties
| Name | Type | Description |
|---|---|---|
| latitude | number | |
| longitude | number | |
| type | string | |
| name | string | |
| number | stringnull | |
| postal_code | stringnull | |
| street | stringnull | |
| confidence | number | |
| region | stringnull | |
| region_code | stringnull | |
| county | stringnull | |
| locality | stringnull | |
| administrative_area | stringnull | |
| neighbourhood | stringnull | |
| country | string | |
| country_code | string | |
| continent | stringnull | |
| label | string | |
| map_url | stringnull | |
| distance | numbernull | Distance in meters from query coordinates (reverse only). |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://api-evangelist.github.io/positionstack/json-schema/positionstack-location-schema.json",
"title": "Location",
"description": "A single geocoded location result returned by the positionstack API.",
"type": "object",
"required": ["latitude", "longitude", "label", "country", "country_code"],
"properties": {
"latitude": { "type": "number", "minimum": -90, "maximum": 90 },
"longitude": { "type": "number", "minimum": -180, "maximum": 180 },
"type": {
"type": "string",
"enum": ["address", "venue", "street", "neighbourhood", "borough", "locality", "county", "macrocounty", "region", "macroregion", "country", "coarse", "postalcode"]
},
"name": { "type": "string" },
"number": { "type": ["string", "null"] },
"postal_code": { "type": ["string", "null"] },
"street": { "type": ["string", "null"] },
"confidence": { "type": "number", "minimum": 0, "maximum": 1 },
"region": { "type": ["string", "null"] },
"region_code": { "type": ["string", "null"] },
"county": { "type": ["string", "null"] },
"locality": { "type": ["string", "null"] },
"administrative_area": { "type": ["string", "null"] },
"neighbourhood": { "type": ["string", "null"] },
"country": { "type": "string" },
"country_code": { "type": "string", "pattern": "^[A-Z]{3}$" },
"continent": { "type": ["string", "null"] },
"label": { "type": "string" },
"map_url": { "type": ["string", "null"], "format": "uri" },
"distance": { "type": ["number", "null"], "description": "Distance in meters from query coordinates (reverse only)." }
}
}