Peru district geography codebook
https://api.latinfo.dev/pe/inei/ubigeo/{code}
A district code and administrative hierarchy with reference coordinates. Use the six-digit UBIGEO district code. Preserve leading zeros. Coordinates locate the district reference point, not a company establishment.
Source contract
- Publisher
- INEI; augmented codebook by Jose M. Castagnetto
- Coverage
- Peruvian districts in the augmented UBIGEO codebook.
- Record meaning
- A district code and administrative hierarchy with reference coordinates.
- Identifier
- Use the six-digit UBIGEO district code. Preserve leading zeros.
- Accepted pattern
^\d{6}$- Cardinality
one- License
- Reuse permission has not been verified. Public access is not a reuse license.
Known limitations
- Coordinates locate the district reference point, not a company establishment.
Parameters
codestringpathrequiredUse the six-digit UBIGEO district code. Preserve leading zeros.
Example: 130101
Request example
curl https://api.latinfo.dev/pe/inei/ubigeo/130101 \
-H "Authorization: Bearer $LATINFO_API_KEY"
Responses
200Codebook entry; values and identifiers remain strings.
application/jsonResponse fields
ubigeo string requireddepartamento string requiredPublished department name.
provincia string requiredPublished province name.
distrito string requiredPublished district name.
latitude string requiredDistrict reference latitude; not the company coordinates.
longitude string requiredDistrict reference longitude; not the company coordinates.
Response schema
{
"type": "object",
"required": [
"ubigeo",
"departamento",
"provincia",
"distrito",
"latitude",
"longitude"
],
"additionalProperties": false,
"properties": {
"ubigeo": {
"type": "string"
},
"departamento": {
"type": "string",
"description": "Published department name."
},
"provincia": {
"type": "string",
"description": "Published province name."
},
"distrito": {
"type": "string",
"description": "Published district name."
},
"latitude": {
"type": "string",
"description": "District reference latitude; not the company coordinates."
},
"longitude": {
"type": "string",
"description": "District reference longitude; not the company coordinates."
}
}
}400Invalid code format
401Missing or invalid API key
404Code not in this reference snapshot
429Request limit exceeded
503Reference source unavailable
Example JSON
Illustrative schema example. This is not a live response.
{
"ubigeo": "string",
"departamento": "string",
"provincia": "string",
"distrito": "string",
"latitude": "string",
"longitude": "string"
}Provenance and limitations
Coverage varies by country and public source. A missing field is not evidence that the underlying fact does not exist. Public registries may be delayed or contain source errors; inspect the returned evidence and source date before relying on a result.