Locations v1 / Demografie
Demographics of an area
⭐ The total population, the number of localities and the density within a radius (km) around a point — „how many people around this coordinate".
GET
https://oneapi.ro/api/locations/v1/analiza-zona
Query parameters
NameTypeDescriptionAccepted values
latrequired
number
The latitude of the centre.
-90 – 90
lngrequired
number
The longitude of the centre.
-180 – 180
raza_kmrequired
number
The radius, in km.
0.1 – 200
How it behaves
- ⭐ „How many people around this coordinate?" — total population, number of localities and density within a radius.
What it is for
- Market research: how many inhabitants fall within X km of a candidate site for a shop, pharmacy or pickup point.
- Sizing a service area (courier, family doctor) around a fixed point.
- A quick audience estimate for a geo-targeted campaign, starting from a coordinate.
Response structure
FieldTypeDescription
data.centru
object
An echo of the point received (
lat/lng).
data.centru.lat
number
Latitude (WGS 84).
data.centru.lng
number
Longitude (WGS 84).
data.raza_km
number
The radius of the circle analysed, in km (an echo of the request).
data.nr_localitati
integer
How many localities have their centroid inside the circle.
data.populatie_totala
integer
The summed population (RPL2021) of the localities inside.
data.suprafata_kmp
number
The area of the circle (π·radius²), not the sum of the localities' areas.
data.densitate
number | null
populatie_totala / suprafata_kmp (inhabitants per km²).
meta.actualizat
object
Prospețimea datelor pe domenii (dată ISO 8601).
Response examples
GEThttps://oneapi.ro/api/locations/v1/analiza-zona?lat=46.77&lng=23.59&raza_km=2
{
"data": {
"centru": {
"lat": 46.77,
"lng": 23.59
},
"raza_km": 2,
"nr_localitati": 0,
"populatie_totala": 0,
"suprafata_kmp": 12.57,
"densitate": 0
},
"meta": {
"actualizat": {
"administrativ": "2026-08-15T16: 39: 14+03: 00",
"populatie": "2026-08-15T16: 40: 07+03: 00"
}
}
}
GEThttps://oneapi.ro/api/locations/v1/analiza-zona?lat=44.43&lng=26.10&raza_km=1
{
"data": {
"centru": {
"lat": 44.43,
"lng": 26.1
},
"raza_km": 1,
"nr_localitati": 5,
"populatie_totala": 1425404,
"suprafata_kmp": 3.14,
"densitate": 453950.3
},
"meta": {
"actualizat": {
"administrativ": "2026-08-15T16: 39: 14+03: 00",
"populatie": "2026-08-15T16: 40: 07+03: 00"
}
}
}
GEThttps://oneapi.ro/api/locations/v1/analiza-zona?lat=47.16&lng=27.60&raza_km=5
{
"data": {
"centru": {
"lat": 47.16,
"lng": 27.6
},
"raza_km": 5,
"nr_localitati": 4,
"populatie_totala": 281478,
"suprafata_kmp": 78.54,
"densitate": 3583.9
},
"meta": {
"actualizat": {
"administrativ": "2026-08-15T16: 39: 14+03: 00",
"populatie": "2026-08-15T16: 40: 07+03: 00"
}
}
}
Error codes
| Code | Slug | When it occurs |
|---|---|---|
| 401 | neautentificat | Token missing, invalid, expired or revoked. |
| 403 | feature_indisponibil | The current plan does not include the feature the route depends on. |
| 422 | parametri_invalizi | lat/lng/raza_km is missing. |
| 429 | cota_depasita | The plan's monthly quota has been exceeded (see Retry-After). |
All errors share the same shape. eroare.cod is stable and is the value you should branch on in code — not the text in mesaj, which may change.
{
"eroare": {
"cod": "parametri_invalizi",
"mesaj": "lat/lng/raza_km is missing.",
"detalii": {
"lat": [
"The value sent does not satisfy the parameter rule."
]
}
}
}