Look up a RUC: GET /ruc/{id}

Returns the SUNAT reduced registry data for one RUC. Each lookup costs 1 credit.

GET https://consultaruc-api.karvesol.com/ruc/{id}

Authentication

Header Authorization: Bearer <api_key>. Without a valid key the API returns 401.

Parameter

NameInDescription
idpath11-digit RUC, digits only.

200 response

A JSON object with these fields:

FieldTypeDescription
rucnumberThe RUC you looked up.
razon_socialstring or nullLegal name of the taxpayer.
estadostring or nullTaxpayer status according to SUNAT (for example ACTIVO, BAJA DEFINITIVA, SUSPENSION TEMPORAL).
condicionstring or nullAddress condition according to SUNAT (for example HABIDO, NO HABIDO).
direccionstring or nullRegistered address.
ubigeostring or null6-digit ubigeo code.
distritostring or nullDistrict of the registered address.
provinciastring or nullProvince of the registered address.
departamentostring or nullDepartment of the registered address.
es_agente_retencionbooleantrue if the RUC is listed as an IGV withholding agent.

Keep in mind:

  • Data is returned as SUNAT publishes it. Some estado and condicion texts are abbreviated or truncated at the source (for example NO HALLADO SE MUDO D) and are not completed.
  • direccion, ubigeo, distrito, provincia and departamento only come for RUCs starting with 20 (companies). For other RUCs they are null, because SUNAT does not publish them.
  • A field with no data comes as null.

Example (fictional data)

{
  "ruc": 20100000008,
  "razon_social": "EMPRESA DE EJEMPLO S.A.C.",
  "estado": "ACTIVO",
  "condicion": "HABIDO",
  "direccion": "AV. EJEMPLO 123",
  "ubigeo": "150101",
  "distrito": "LIMA",
  "provincia": "LIMA",
  "departamento": "LIMA",
  "es_agente_retencion": false
}

Status codes

CodeWhenBody
200The RUC exists.The JSON above.
400id is not 11 digits or not numeric.{"error": "…"}
401Missing or invalid key.{"error": "no autorizado"}
404The RUC is not in the registry.{"error": "RUC no encontrado"}
429You exceeded the per-minute limit or the Free plan quota.{"error": "…"} and a Retry-After header
503The registry is briefly unavailable.{"error": "padrón no disponible"}

More detail, including what consumes credits, in errors and limits.