Peru: company identifier formats (RUC)

Shape, check digit, accepted and refused examples and the API call for RUC in Peru. Every example on this page is run through the same validators as the free identifier validator, so a value shown as accepted is a value the validator accepts.

RUC (Registro Único de Contribuyentes)

FieldValue
RegisterOECE open contracting data (partial list of state suppliers)
ShapeN{11}
Check digitEnforced. 11 digits starting 20 (a legal entity). Modulo 11: the first ten digits are weighted 5,4,3,2,7,6,5,4,3,2; check = 11 minus the sum mod 11 (10 reads 0, 11 reads 1). The check digit is enforced. Spaces, dots, hyphens and a leading RUC are ignored.
Worked example (accepted)20100001498
Normalised form20100001498
Also accepted as input20 100001498 · RUC 20100001498
A one-character slip20100001499 is refused
Regex (normalised form)^20[0-9]{9}$
API callGET /companies/search?country=PE&company_number=20100001498
VAT numberThe register data holds no VAT number for this identifier.

Notes and scope

The data is a partial list of the legal entities that sold to the Peruvian state since 2003, from the OECE open contracting data, not a company register. A RUC starting 10, 15 or 17 belongs to a natural person and is refused; a company that never sold to the state is absent. There is no VAT number in the data, so a vat search is refused. Updated monthly, with a lag.

Call it from code

curl "https://api.prometiam.com/functions/v1/risk-api/companies/search?country=PE&company_number=20100001498" \
  -H "Authorization: Bearer YOUR_API_KEY"

Shape notation: N digit · L letter · X digit or letter · C check digit or character · {n} repeat n times.

A valid shape and check digit prove that a number is well-formed, not that a company holds it. Only a lookup in the register answers that.

Source and credit

Register data that the API serves for Peru carries this credit:

Contains data from the Organismo Especializado para las Contrataciones Públicas Eficientes (OECE) of Peru, the legal entities that sold to the Peruvian state since 2003, published through the Open Contracting Data Registry (https://data.open-contracting.org/en/publication/135) under the Creative Commons Attribution 4.0 (CC BY 4.0) licence. Adapted by Prometiam (legal entities only, one record per company); not Peru's company register and not an official extract.

Related pages

Sign up · API documentation

The free trial lasts 14 days and includes 500 credits. A card is required and nothing is charged during the trial; it then continues as Starter (EUR 9.99/month) unless you cancel.

Frequently asked questions

How is the RUC checked?
11 digits starting 20 (a legal entity). Modulo 11: the first ten digits are weighted 5,4,3,2,7,6,5,4,3,2; check = 11 minus the sum mod 11 (10 reads 0, 11 reads 1). The check digit is enforced. Spaces, dots, hyphens and a leading RUC are ignored.