Reference codebooks · lookupReferencePeIneiUbigeo
OpenAPI

Peru district geography codebook

GET 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.

Machine-readable source contract · Source documentation

Authentication required. REST requests use a Latinfo API key. The interactive console builds the authorization header and does not store the key.

Parameters

codestringpathrequired

Use 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.
Content-Type: application/json

Response fields

ubigeo string required
departamento string required

Published department name.

provincia string required

Published province name.

distrito string required

Published district name.

latitude string required

District reference latitude; not the company coordinates.

longitude string required

District 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
No response body documented.
401Missing or invalid API key
No response body documented.
404Code not in this reference snapshot
No response body documented.
429Request limit exceeded
No response body documented.
503Reference source unavailable
No response body documented.
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.