Population
GET /contesto/popolazione
Demographics of the census area around the point: residents, age bands, households and nationalities.
Example Request
curl --location 'https://sandbox-context.realitycs.it/contesto/popolazione?latitudine=43.32215&longitudine=11.3259&raggio=250' \
--header 'Authorization: Bearer <token>'
Request Fields
| Field | Required | Default | Description | Type | Example | Notes |
|---|---|---|---|---|---|---|
latitudine | yes | Latitude of the point | number | 43.32215 | ||
longitudine | yes | Longitude of the point | number | 11.3259 | ||
raggio | optional | 500 | Search radius around the point, in metres | number | 250 | From 1 to 1000 |
JSON keys in the response:
Every entry is an object with a qt value and a desc human readable label in Italian, keyed by its ISTAT census code. Keys ending in _perc are percentages, the others are absolute counts.
| Key | Description |
|---|---|
p1 | Resident population |
p14_p15_perc | Population aged 0 - 9, in percentage |
p16_p17_perc | Population aged 10 - 19, in percentage |
p18_p19_p20_perc | Population aged 20 - 34, in percentage |
p21_p22_p23_p24_p25_perc | Population aged 35 - 59, in percentage |
p26_p27_p28_perc | Population aged 60 - 74, in percentage |
p29_perc | Population aged over 74, in percentage |
pf1 | Resident households |
pf3_perc | Households of 1 member, in percentage |
pf4_perc | Households of 2 members, in percentage |
pf5_perc | Households of 3 members, in percentage |
pf6_perc | Households of 4 members, in percentage |
pf7_perc | Households of 5 members, in percentage |
pf8_perc | Households of 6 or more members, in percentage |
it_perc | Italian residents, in percentage |
st_perc | Foreign residents, in percentage |
st9_perc | Foreign residents from Europe, in percentage |
st10_perc | Foreign residents from Africa, in percentage |
st11_perc | Foreign residents from America, in percentage |
st12_perc | Foreign residents from Asia, in percentage |
st13_perc | Foreign residents from Oceania, in percentage |
Render without hardcoding the keys
Because every entry carries its own desc, the whole block can be displayed by iterating over it, without mapping the census codes one by one. Use the table above when you need to pick a specific indicator.
Percentages of foreign residents
st9_perc to st13_perc are shares of the foreign resident population, not of the total: they add up to 100 among themselves. st_perc gives the weight of foreigners on the whole area, and it_perc is its complement.
The radius snaps to census areas
These figures come from census sections, so raggio selects which sections are included rather than drawing an exact circle. Two nearby points can return the same numbers, and a small change in the radius may leave the result unchanged.
Example Response
{
"contesto": {
"popolazione": {
"it_perc": {
"desc": "italiani residenti percentuale",
"qt": 94.44
},
"p1": {
"desc": "popolazione residente",
"qt": 389
},
"p14_p15_perc": {
"desc": "popolazione eta 0 - 9 anni percentuale",
"qt": 7.54
},
"p16_p17_perc": {
"desc": "popolazione eta 10 - 19 anni percentuale",
"qt": 6.54
},
"p18_p19_p20_perc": {
"desc": "popolazione eta 20 - 34 anni percentuale",
"qt": 16.71
},
"p21_p22_p23_p24_p25_perc": {
"desc": "popolazione eta 35 - 59 anni percentuale",
"qt": 35.25
},
"p26_p27_p28_perc": {
"desc": "popolazione eta 60 - 74 anni percentuale",
"qt": 19.73
},
"p29_perc": {
"desc": "popolazione eta > 74 anni percentuale",
"qt": 14.23
},
"pf1": {
"desc": "famiglie residenti",
"qt": 215
},
"pf3_perc": {
"desc": "famiglie 1 componente percentuale",
"qt": 56.17
},
"pf4_perc": {
"desc": "famiglie 2 componenti percentuale",
"qt": 20.21
},
"pf5_perc": {
"desc": "famiglie 3 componenti percentuale",
"qt": 12.21
},
"pf6_perc": {
"desc": "famiglie 4 componenti percentuale",
"qt": 9.94
},
"pf7_perc": {
"desc": "famiglie 5 componenti percentuale",
"qt": 1.38
},
"pf8_perc": {
"desc": "famiglie 6+ componenti percentuale",
"qt": 0.08
},
"st10_perc": {
"desc": "stranieri africa percentuale",
"qt": 6.18
},
"st11_perc": {
"desc": "stranieri america percentuale",
"qt": 23.16
},
"st12_perc": {
"desc": "stranieri asia percentuale",
"qt": 11.59
},
"st13_perc": {
"desc": "stranieri oceania percentuale",
"qt": 0
},
"st9_perc": {
"desc": "stranieri europa percentuale",
"qt": 59.07
},
"st_perc": {
"desc": "stranieri residenti percentuale",
"qt": 5.56
}
}
}
}