SUNAT Peru RUC Scraper & Consulta RUC API | Taxpayer Data avatar

SUNAT Peru RUC Scraper & Consulta RUC API | Taxpayer Data

Pricing

from $11.54 / 1,000 results

Go to Apify Store
SUNAT Peru RUC Scraper & Consulta RUC API | Taxpayer Data

SUNAT Peru RUC Scraper & Consulta RUC API | Taxpayer Data

Scrape Peru SUNAT by RUC or company name (razon social). Consulta RUC data: estado, condicion, tipo contribuyente, direccion fiscal, CIIU, comprobantes, padrones, legal representatives, branches and worker counts. KYB and company verification for Peru. Export JSON, CSV, Excel.

Pricing

from $11.54 / 1,000 results

Rating

5.0

(1)

Developer

Scrapers Lat

Scrapers Lat

Maintained by Community

Actor stats

0

Bookmarked

4

Total users

0

Monthly active users

12 days ago

Last modified

Share

SUNAT Peru RUC & Taxpayer Registry Scraper

SUNAT Peru RUC Scraper & Consulta RUC API

The most complete SUNAT scraper and Consulta RUC API for Peru. Look up any Peruvian taxpayer by RUC or by company name (razon social) and get the full SUNAT taxpayer sheet as clean JSON, CSV or Excel: status, tax address, CIIU economic activity, invoicing and accounting systems, special registries (padrones), plus legal representatives, branch locations and reported worker counts on demand. Built for KYB, company verification, lead generation and due diligence in Peru.

Keywords: SUNAT scraper, SUNAT API, consulta RUC, RUC lookup API, verificar RUC, razon social por RUC, ficha RUC SUNAT, padron SUNAT, Peru company registry data, KYB Peru, company data Peru.

📥 Input · 📤 Output · 💰 Pricing · ▶️ Examples

Apify Coverage Output Billing

Here is one real result, with the fields the actor returns (legal-representative and branch lists trimmed for readability):

{
"razonSocial": "SUPERMERCADOS PERUANOS SOCIEDAD ANONIMA 'O ' S.P.S.A.",
"ruc": "20100070970",
"estado": "ACTIVO",
"condicion": "HABIDO",
"tipoContribuyente": "SOCIEDAD ANONIMA",
"nombreComercial": "SUPERMERCADOS PERUANOS",
"direccion": "CAL.MORELLI NRO. 181 INT. P-2",
"departamento": "LIMA",
"provincia": "LIMA",
"distrito": "SAN BORJA",
"ciiu": "4711",
"actividadEconomica": "VENTA AL POR MENOR EN COMERCIOS NO ESPECIALIZADOS CON PREDOMINIO DE LA VENTA DE ALIMENTOS, BEBIDAS O TABACO",
"actividadesSecundarias": [
{ "ciiu": "4719", "actividadEconomica": "OTRAS ACTIVIDADES DE VENTA AL POR MENOR EN COMERCIOS NO ESPECIALIZADOS" },
{ "ciiu": "6810", "actividadEconomica": "ACTIVIDADES INMOBILIARIAS REALIZADAS CON BIENES PROPIOS O ARRENDADOS" }
],
"sistemaEmisionComprobante": "MECANIZADO",
"sistemaContabilidad": "COMPUTARIZADO",
"actividadComercioExterior": "SIN ACTIVIDAD",
"comprobantesPago": "FACTURA BOLETA DE VENTA LIQUIDACION DE COMPRA NOTA DE CREDITO NOTA DE DEBITO GUIA DE REMISION - REMITENTE COMPROBANTE DE RETENCION",
"comprobantesElectronicos": "BOLETA (desde 01/01/2013),FACTURA (desde 01/01/2013),GUIA (desde 25/08/2021)",
"emisorElectronicoDesde": "2013-01-01",
"afiliadoPleDesde": "2011-09-08",
"padrones": "Incorporado al Regimen de Agentes de Retencion de IGV (R.S.037-2002) a partir del 01/06/2002",
"fechaInscripcion": "1992-10-09",
"fechaInicioActividades": "1979-06-01",
"numeroTrabajadores": 0,
"numeroPensionistas": 0,
"numeroPrestadoresServicio": 2,
"periodoTrabajadores": "2026-07",
"trabajadoresHistorial": [
{ "periodo": "2026-07", "trabajadores": 0, "pensionistas": 0, "prestadoresServicio": 2 },
{ "periodo": "2026-06", "trabajadores": 0, "pensionistas": 0, "prestadoresServicio": 1 }
],
"url": "https://e-consultaruc.sunat.gob.pe/cl-ti-itmrconsruc/jcrS00Alias?accion=consPorRuc&nroRuc=20100070970",
"representanteLegal": [
{ "tipoDocumento": "DNI", "numeroDocumento": "09342569", "nombre": "SHIMIZU MITSUMASU MISAEL", "cargo": "APODERADO", "fechaDesde": "2013-04-08" },
{ "tipoDocumento": "DNI", "numeroDocumento": "41145464", "nombre": "CALMELL DEL SOLAR MONASI JAVIER MANUEL", "cargo": "APODERADO", "fechaDesde": "2015-11-27" }
],
"establishments": [
{ "code": "0236", "type": "LO. L. COMERCIAL", "address": "MZA. A LOTE. 13 P.J. VILLA EL SALVADOR LIMA - LIMA - VILLA EL SALVADOR", "economicActivity": null }
],
"observedAt": "2026-09-04T14:00:00.000Z",
"error": null
}

The representanteLegal, establishments and trabajadoresHistorial lists are trimmed above for readability. A real run returns the full lists (this taxpayer returns 15 legal representatives and 1018 branch locations). Every value shown is exactly as returned. observedAt is a representative ISO timestamp.

Table of contents

What it does

The actor looks up each search term in the SUNAT Peru taxpayer registry (Consulta RUC), resolves each match to its full taxpayer sheet, and writes one normalized record per taxpayer to the run's dataset. An 11-digit numeric term is treated as a direct RUC lookup; any other text is a company-name search that returns every matching taxpayer. With withDetails on it also fetches the legal representatives and reported worker counts; with withBranches on it fetches every registered branch location. Missing source values are returned as null.

Data covers public SUNAT registry records for Peruvian taxpayers. Field values are returned in Spanish exactly as SUNAT publishes them, so they match the official registry without translation.

Why this actor

  • Two ways to search. Look up by exact RUC or by company name (razon social). Most SUNAT tools only accept a RUC number.
  • Every field the registry exposes. Status, condition, taxpayer type, trade name, full fiscal address split into department, province and district, primary and secondary CIIU activities, invoicing and accounting systems, foreign-trade flag, authorized and electronic vouchers, PLE affiliation, special registries (padrones), and both inscription and activity-start dates.
  • Deep KYB add-ons. Full legal representatives (representantes legales) with document, role and start date, every branch location (establecimientos anexos), and reported worker counts (trabajadores, pensionistas and prestadores de servicio) with monthly history.
  • Clean, typed output. Dates normalized to YYYY-MM-DD, null for absent values, ready for JSON, CSV or Excel.
  • Honest billing. Pay per taxpayer, no charge on failure, spend cap respected.

Compare with other SUNAT actors

CapabilityThis actorTypical RUC-only scraper
Look up by RUC numberYesYes
Look up by company name (razon social)YesNo
Status, condition, taxpayer typeYesPartial
Fiscal address split (department, province, district)YesAddress only
Primary CIIU activityYesYes
Secondary CIIU activitiesYesNo
Invoicing and accounting systemsYesNo
Electronic vouchers, emisor and PLE datesYesNo
Special registries (padrones)YesNo
Legal representatives (representantes legales)YesNo
Branch locations (establecimientos anexos)YesNo
Worker counts with monthly historyYesNo
JSON, CSV, Excel exportYesYes
No charge on failure, spend capYesVaries

This actor accepts every input other SUNAT RUC scrapers accept (a list of RUC numbers plus a result cap) and returns every field they return, plus name search and the enrichment fields above.

Use cases

  • KYB and onboarding in Peru. Verify a supplier or customer RUC, confirm it is ACTIVO and HABIDO, and capture the legal representatives for compliance files.
  • Lead generation. Turn a list of company names into structured taxpayer records with activity, location and size signals.
  • Due diligence and credit risk. Read taxpayer type, foreign-trade activity, worker counts and branch footprint to size a counterparty.
  • Data enrichment. Append razon social, CIIU, address and status to an internal CRM keyed by RUC.
  • Market research. Build sector lists (retail, mining, banking, telecom) by company-name search.

Quickstart

Open the actor, paste this into the input, and press Run. It looks up one RUC and returns its full taxpayer sheet with legal representatives and worker counts.

{
"maxTaxpayers": 10,
"withDetails": true,
"withBranches": false,
"searchTerms": ["20100070970"]
}

Pass an 11-digit RUC for a direct lookup, or a company name (for example SUPERMERCADOS PERUANOS) to return every matching taxpayer. Add several terms to collect them in one run.

Input reference

FieldTypeRequiredDefaultDescription
searchTermsstring[]yes["20100070970"]RUC tax IDs (11 digits) or company names to look up. An 11-digit numeric term is a direct RUC lookup; any other text is a company-name search returning every matching taxpayer.
maxTaxpayersintegerno10Maximum number of taxpayer records to collect across all search terms. Range 1 to 1000000.
withDetailsbooleannotrueAlso fetch the legal representatives (representantes legales) and reported worker counts (trabajadores, pensionistas, prestadores de servicio) for each taxpayer. Paid add-on: requires a paid Apify plan.
withBranchesbooleannofalseAlso fetch every registered branch location (establecimientos anexos): internal code, establishment type, full address, and economic activity. Large companies can have thousands. Paid add-on: requires a paid Apify plan.
useProxybooleannofalseRoute requests through Apify Residential proxy in Peru. Enable only if SUNAT starts blocking the run; direct requests normally work.

Output reference

One dataset item per taxpayer. Types: string, number, object[], or null when the source value is absent. Fields marked (details) require withDetails; establishments requires withBranches.

FieldTypeDescription
razonSocialstringRegistered legal name.
rucstring11-digit RUC tax ID.
estadostringRegistry status (for example ACTIVO, BAJA).
condicionstringDomicile condition (for example HABIDO, NO HABIDO).
tipoContribuyentestringTaxpayer type (for example SOCIEDAD ANONIMA).
nombreComercialstringTrade name, or null.
direccionstringRegistered tax address.
departamentostringDepartment (region).
provinciastringProvince.
distritostringDistrict.
ciiustringPrimary CIIU economic-activity code.
actividadEconomicastringPrimary economic activity description.
actividadesSecundariasobject[]Secondary activities, each {ciiu, actividadEconomica}.
sistemaEmisionComprobantestringInvoice issuance system.
sistemaContabilidadstringAccounting system.
actividadComercioExteriorstringForeign-trade activity status.
comprobantesPagostringAuthorized payment vouchers.
comprobantesElectronicosstringElectronic voucher types with start dates.
emisorElectronicoDesdestringDate the taxpayer became an electronic issuer (YYYY-MM-DD), or null.
afiliadoPleDesdestringDate affiliated to the electronic ledger (PLE), or null.
padronesstringSpecial taxpayer registries the RUC belongs to (for example agente de retencion/percepcion), or null.
fechaInscripcionstringRegistry inscription date (YYYY-MM-DD).
fechaInicioActividadesstringActivity start date (YYYY-MM-DD).
numeroTrabajadoresnumberReported workers in the latest period, or null (details).
numeroPensionistasnumberReported pensioners in the latest period, or null (details).
numeroPrestadoresServicionumberReported service providers in the latest period, or null (details).
periodoTrabajadoresstringPeriod of the latest worker snapshot (for example 2026-07) (details).
trabajadoresHistorialobject[]Monthly worker history, each {periodo, trabajadores, pensionistas, prestadoresServicio} (details).
urlstringPublic SUNAT consulta URL for the RUC.
representanteLegalobject[]Legal representatives, each {tipoDocumento, numeroDocumento, nombre, cargo, fechaDesde} (details).
establishmentsobject[]Branch locations, each with internal code, type, address, and activity (branches). Empty when withBranches is off.
observedAtstringISO 8601 timestamp of when the record was collected.
errorstringnull on success. On a failed lookup, an item with a populated error field is written instead.

Run via API and CLI

Start a run and read the dataset. Replace <TOKEN> with your Apify API token.

Run synchronously and get dataset items in one call:

curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~sunat-scraper/run-sync-get-dataset-items?token=<TOKEN>" \
-H "Content-Type: application/json" \
-d '{"searchTerms":["20100070970"],"withDetails":true}'

Start a run asynchronously:

curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~sunat-scraper/runs?token=<TOKEN>" \
-H "Content-Type: application/json" \
-d '{"searchTerms":["SUPERMERCADOS PERUANOS"],"maxTaxpayers":50,"withBranches":true}'

Apify CLI:

apify call scrapers_lat/sunat-scraper \
--input '{"searchTerms":["20100070970"]}'

Fetch results

Every run writes to a dataset. Fetch items as JSON, CSV, or Excel by changing format:

# JSON
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=json"
# CSV
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=csv"
# Paginate large datasets
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&offset=1000&limit=1000"

<DATASET_ID> is returned as defaultDatasetId in the run object. Use offset and limit to page through large result sets. clean=true drops empty and internal fields.

Billing and limits

  • Pay per result. You are charged per taxpayer returned (result event). See the pricing tab for the current per-result price.
  • Details add-on. When withDetails or withBranches is on, each taxpayer whose enrichment sheet is fetched charges a small details event on top of the result price. That one add-on covers legal representatives, worker counts and every branch location for the taxpayer.
  • No charge on failure. If a lookup fails, the actor writes an item with a populated error field and does not charge for it. Empty runs cost nothing.
  • Spend cap respected. Set maxTotalChargeUsd on the run; once reached, the actor stops emitting and charging further billable results and add-ons.
  • Free Apify plans are capped at 10 taxpayers per run, and the details and branches add-ons require a paid plan. Upgrade for higher volume and enrichment.

FAQ and troubleshooting

A run returned 0 records. Why? The RUC does not exist, or the company-name search matched nothing. Confirm the 11-digit RUC, or try a shorter name fragment. Zero-result runs are not charged.

How do I look up by name instead of RUC? Pass any non-numeric text in searchTerms (for example SUPERMERCADOS PERUANOS). Every matching taxpayer is returned, up to maxTaxpayers.

How do I get legal representatives, worker counts and branches? Keep withDetails on for legal representatives and worker counts, and turn withBranches on for every registered branch location. Both are paid add-ons on a paid Apify plan.

Why are field values in Spanish? The values are returned exactly as SUNAT publishes them, so they match the official registry without translation.

Do I need the proxy? No. Direct requests normally work. Enable useProxy only if SUNAT starts blocking the run.

Is this an official SUNAT tool? No. This actor is independent and has no affiliation with SUNAT or the Peruvian government. It reads only data that is publicly available on the SUNAT RUC consultation service.

More scrapers at scrapers.lat

Built and maintained by scrapers.lat, where we publish scrapers for US and Latin American public platforms: company registries, government data, finance, e-commerce and more. Browse the catalog or request a custom scraper at scrapers.lat.

Independent tool, not affiliated with SUNAT or the Peruvian government. Accesses only publicly available RUC registry data.


SUNAT Peru RUC & Taxpayer Registry Scraper

SUNAT Peru: Scraper de RUC y API de Consulta RUC

El scraper de SUNAT y API de Consulta RUC mas completo para el Peru. Busca cualquier contribuyente peruano por RUC o por nombre de la empresa (razon social) y obten la ficha RUC completa de SUNAT como JSON, CSV o Excel limpio: estado, domicilio fiscal, actividad economica CIIU, sistemas de emision y contabilidad, padrones, ademas de representantes legales, establecimientos anexos y numero de trabajadores cuando lo necesites. Pensado para KYB, verificacion de empresas, generacion de leads y debida diligencia en el Peru.

Palabras clave: scraper SUNAT, API SUNAT, consulta RUC, consultar RUC SUNAT, verificar RUC, razon social por RUC, ficha RUC SUNAT, padron SUNAT, datos de empresas del Peru, KYB Peru, registro de empresas Peru.

📥 Entrada · 📤 Salida · 💰 Precios · ▶️ Ejemplos

Apify Cobertura Salida Facturacion

Este es un resultado real, con los campos que devuelve el actor (las listas de representantes legales y anexos estan recortadas para facilitar la lectura):

{
"razonSocial": "SUPERMERCADOS PERUANOS SOCIEDAD ANONIMA 'O ' S.P.S.A.",
"ruc": "20100070970",
"estado": "ACTIVO",
"condicion": "HABIDO",
"tipoContribuyente": "SOCIEDAD ANONIMA",
"nombreComercial": "SUPERMERCADOS PERUANOS",
"direccion": "CAL.MORELLI NRO. 181 INT. P-2",
"departamento": "LIMA",
"provincia": "LIMA",
"distrito": "SAN BORJA",
"ciiu": "4711",
"actividadEconomica": "VENTA AL POR MENOR EN COMERCIOS NO ESPECIALIZADOS CON PREDOMINIO DE LA VENTA DE ALIMENTOS, BEBIDAS O TABACO",
"actividadesSecundarias": [
{ "ciiu": "4719", "actividadEconomica": "OTRAS ACTIVIDADES DE VENTA AL POR MENOR EN COMERCIOS NO ESPECIALIZADOS" },
{ "ciiu": "6810", "actividadEconomica": "ACTIVIDADES INMOBILIARIAS REALIZADAS CON BIENES PROPIOS O ARRENDADOS" }
],
"sistemaEmisionComprobante": "MECANIZADO",
"sistemaContabilidad": "COMPUTARIZADO",
"actividadComercioExterior": "SIN ACTIVIDAD",
"comprobantesPago": "FACTURA BOLETA DE VENTA LIQUIDACION DE COMPRA NOTA DE CREDITO NOTA DE DEBITO GUIA DE REMISION - REMITENTE COMPROBANTE DE RETENCION",
"comprobantesElectronicos": "BOLETA (desde 01/01/2013),FACTURA (desde 01/01/2013),GUIA (desde 25/08/2021)",
"emisorElectronicoDesde": "2013-01-01",
"afiliadoPleDesde": "2011-09-08",
"padrones": "Incorporado al Regimen de Agentes de Retencion de IGV (R.S.037-2002) a partir del 01/06/2002",
"fechaInscripcion": "1992-10-09",
"fechaInicioActividades": "1979-06-01",
"numeroTrabajadores": 0,
"numeroPensionistas": 0,
"numeroPrestadoresServicio": 2,
"periodoTrabajadores": "2026-07",
"trabajadoresHistorial": [
{ "periodo": "2026-07", "trabajadores": 0, "pensionistas": 0, "prestadoresServicio": 2 },
{ "periodo": "2026-06", "trabajadores": 0, "pensionistas": 0, "prestadoresServicio": 1 }
],
"url": "https://e-consultaruc.sunat.gob.pe/cl-ti-itmrconsruc/jcrS00Alias?accion=consPorRuc&nroRuc=20100070970",
"representanteLegal": [
{ "tipoDocumento": "DNI", "numeroDocumento": "09342569", "nombre": "SHIMIZU MITSUMASU MISAEL", "cargo": "APODERADO", "fechaDesde": "2013-04-08" },
{ "tipoDocumento": "DNI", "numeroDocumento": "41145464", "nombre": "CALMELL DEL SOLAR MONASI JAVIER MANUEL", "cargo": "APODERADO", "fechaDesde": "2015-11-27" }
],
"establishments": [
{ "code": "0236", "type": "LO. L. COMERCIAL", "address": "MZA. A LOTE. 13 P.J. VILLA EL SALVADOR LIMA - LIMA - VILLA EL SALVADOR", "economicActivity": null }
],
"observedAt": "2026-09-04T14:00:00.000Z",
"error": null
}

Las listas representanteLegal, establishments y trabajadoresHistorial estan recortadas arriba. Una ejecucion real devuelve las listas completas (este contribuyente devuelve 15 representantes legales y 1018 establecimientos anexos). Cada valor mostrado es tal como se devuelve. observedAt es una marca de tiempo ISO representativa.

Tabla de contenidos

Que hace

El actor busca cada termino en el registro de contribuyentes de SUNAT (Consulta RUC), resuelve cada coincidencia a su ficha completa y escribe un registro normalizado por contribuyente en el dataset de la ejecucion. Un termino numerico de 11 digitos se trata como busqueda directa por RUC; cualquier otro texto es una busqueda por nombre que devuelve todos los contribuyentes coincidentes. Con withDetails activo tambien obtiene los representantes legales y el numero de trabajadores; con withBranches activo obtiene cada establecimiento anexo registrado. Los valores ausentes en la fuente se devuelven como null.

Los datos corresponden a registros publicos de SUNAT de contribuyentes peruanos. Los valores se devuelven en espanol tal como los publica SUNAT, para que coincidan con el registro oficial sin traduccion.

Por que este actor

  • Dos formas de buscar. Busca por RUC exacto o por nombre de la empresa (razon social). La mayoria de las herramientas de SUNAT solo aceptan un numero de RUC.
  • Todos los campos que expone el registro. Estado, condicion, tipo de contribuyente, nombre comercial, domicilio fiscal completo dividido en departamento, provincia y distrito, actividades CIIU principal y secundarias, sistemas de emision y contabilidad, actividad de comercio exterior, comprobantes autorizados y electronicos, afiliacion al PLE, padrones y las fechas de inscripcion e inicio de actividades.
  • Complementos KYB profundos. Representantes legales completos con documento, cargo y fecha, cada establecimiento anexo, y el numero de trabajadores, pensionistas y prestadores de servicio con historial mensual.
  • Salida limpia y tipada. Fechas normalizadas a YYYY-MM-DD, null para valores ausentes, listo para JSON, CSV o Excel.
  • Facturacion honesta. Pago por contribuyente, sin cargo en caso de fallo, con limite de gasto respetado.

Comparativa con otros actores de SUNAT

CapacidadEste actorScraper tipico solo por RUC
Busqueda por numero de RUCSiSi
Busqueda por nombre (razon social)SiNo
Estado, condicion, tipo de contribuyenteSiParcial
Domicilio fiscal dividido (departamento, provincia, distrito)SiSolo direccion
Actividad CIIU principalSiSi
Actividades CIIU secundariasSiNo
Sistemas de emision y contabilidadSiNo
Comprobantes electronicos, fechas de emisor y PLESiNo
PadronesSiNo
Representantes legalesSiNo
Establecimientos anexosSiNo
Numero de trabajadores con historial mensualSiNo
Exportar a JSON, CSV, ExcelSiSi
Sin cargo en caso de fallo, limite de gastoSiVaria

Este actor acepta toda entrada que aceptan otros scrapers de RUC de SUNAT (una lista de numeros de RUC y un limite de resultados) y devuelve todos los campos que ellos devuelven, ademas de la busqueda por nombre y los campos de enriquecimiento anteriores.

Casos de uso

  • KYB y onboarding en el Peru. Verifica el RUC de un proveedor o cliente, confirma que esta ACTIVO y HABIDO, y captura los representantes legales para cumplimiento.
  • Generacion de leads. Convierte una lista de nombres de empresas en registros estructurados con actividad, ubicacion y senales de tamano.
  • Debida diligencia y riesgo crediticio. Lee el tipo de contribuyente, la actividad de comercio exterior, el numero de trabajadores y la red de anexos para dimensionar a una contraparte.
  • Enriquecimiento de datos. Agrega razon social, CIIU, direccion y estado a un CRM interno indexado por RUC.
  • Investigacion de mercado. Construye listas por sector (retail, mineria, banca, telecomunicaciones) con la busqueda por nombre.

Inicio rapido

Abre el actor, pega esto en la entrada y presiona Run. Busca un RUC y devuelve su ficha completa con representantes legales y numero de trabajadores.

{
"maxTaxpayers": 10,
"withDetails": true,
"withBranches": false,
"searchTerms": ["20100070970"]
}

Pasa un RUC de 11 digitos para una busqueda directa, o un nombre de empresa (por ejemplo SUPERMERCADOS PERUANOS) para devolver todos los contribuyentes coincidentes. Agrega varios terminos para recopilarlos en una sola ejecucion.

Referencia de entrada

CampoTipoRequeridoPredeterminadoDescripcion
searchTermsstring[]si["20100070970"]RUC (11 digitos) o nombres de empresas a buscar. Un termino numerico de 11 digitos es una busqueda directa por RUC; cualquier otro texto es una busqueda por nombre que devuelve todos los contribuyentes coincidentes.
maxTaxpayersintegerno10Numero maximo de registros a recopilar entre todos los terminos. Rango 1 a 1000000.
withDetailsbooleannotrueTambien obtiene los representantes legales y el numero de trabajadores, pensionistas y prestadores de servicio de cada contribuyente. Complemento de pago: requiere un plan de pago de Apify.
withBranchesbooleannofalseTambien obtiene cada establecimiento anexo registrado: codigo interno, tipo, direccion completa y actividad economica. Las empresas grandes pueden tener miles. Complemento de pago: requiere un plan de pago de Apify.
useProxybooleannofalseEnruta las solicitudes por el proxy Residencial de Apify en Peru. Activalo solo si SUNAT empieza a bloquear la ejecucion; las solicitudes directas normalmente funcionan.

Referencia de salida

Un elemento del dataset por contribuyente. Tipos: string, number, object[], o null cuando el valor de origen esta ausente. Los campos marcados (details) requieren withDetails; establishments requiere withBranches.

CampoTipoDescripcion
razonSocialstringNombre legal registrado.
rucstringRUC de 11 digitos.
estadostringEstado del registro (por ejemplo ACTIVO, BAJA).
condicionstringCondicion del domicilio (por ejemplo HABIDO, NO HABIDO).
tipoContribuyentestringTipo de contribuyente (por ejemplo SOCIEDAD ANONIMA).
nombreComercialstringNombre comercial, o null.
direccionstringDomicilio fiscal registrado.
departamentostringDepartamento (region).
provinciastringProvincia.
distritostringDistrito.
ciiustringCodigo CIIU de actividad economica principal.
actividadEconomicastringDescripcion de la actividad economica principal.
actividadesSecundariasobject[]Actividades secundarias, cada una {ciiu, actividadEconomica}.
sistemaEmisionComprobantestringSistema de emision de comprobantes.
sistemaContabilidadstringSistema de contabilidad.
actividadComercioExteriorstringEstado de actividad de comercio exterior.
comprobantesPagostringComprobantes de pago autorizados.
comprobantesElectronicosstringTipos de comprobantes electronicos con fechas de inicio.
emisorElectronicoDesdestringFecha en que paso a emisor electronico (YYYY-MM-DD), o null.
afiliadoPleDesdestringFecha de afiliacion al PLE, o null.
padronesstringPadrones a los que pertenece el RUC (por ejemplo agente de retencion/percepcion), o null.
fechaInscripcionstringFecha de inscripcion en el registro (YYYY-MM-DD).
fechaInicioActividadesstringFecha de inicio de actividades (YYYY-MM-DD).
numeroTrabajadoresnumberTrabajadores reportados en el ultimo periodo, o null (details).
numeroPensionistasnumberPensionistas reportados en el ultimo periodo, o null (details).
numeroPrestadoresServicionumberPrestadores de servicio reportados en el ultimo periodo, o null (details).
periodoTrabajadoresstringPeriodo de la ultima foto de trabajadores (por ejemplo 2026-07) (details).
trabajadoresHistorialobject[]Historial mensual de trabajadores, cada uno {periodo, trabajadores, pensionistas, prestadoresServicio} (details).
urlstringURL publica de consulta de SUNAT para el RUC.
representanteLegalobject[]Representantes legales, cada uno {tipoDocumento, numeroDocumento, nombre, cargo, fechaDesde} (details).
establishmentsobject[]Establecimientos anexos, cada uno con codigo interno, tipo, direccion y actividad (branches). Vacio cuando withBranches esta apagado.
observedAtstringMarca de tiempo ISO 8601 de cuando se recopilo el registro.
errorstringnull en caso de exito. Ante una busqueda fallida, se escribe un elemento con el campo error.

Ejecutar via API y CLI

Inicia una ejecucion y lee el dataset. Reemplaza <TOKEN> por tu token de API de Apify.

Ejecucion sincrona con los items del dataset en una sola llamada:

curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~sunat-scraper/run-sync-get-dataset-items?token=<TOKEN>" \
-H "Content-Type: application/json" \
-d '{"searchTerms":["20100070970"],"withDetails":true}'

Iniciar una ejecucion asincrona:

curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~sunat-scraper/runs?token=<TOKEN>" \
-H "Content-Type: application/json" \
-d '{"searchTerms":["SUPERMERCADOS PERUANOS"],"maxTaxpayers":50,"withBranches":true}'

Apify CLI:

apify call scrapers_lat/sunat-scraper \
--input '{"searchTerms":["20100070970"]}'

Obtener resultados

Cada ejecucion escribe en un dataset. Obten los items como JSON, CSV o Excel cambiando format:

# JSON
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=json"
# CSV
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=csv"
# Paginar datasets grandes
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&offset=1000&limit=1000"

<DATASET_ID> se devuelve como defaultDatasetId en el objeto de la ejecucion. Usa offset y limit para paginar. clean=true elimina campos vacios e internos.

Facturacion y limites

  • Pago por resultado. Se cobra por contribuyente devuelto (evento result). Consulta la pestana de precios para el precio actual por resultado.
  • Complemento de detalles. Cuando withDetails o withBranches esta activo, cada contribuyente cuya ficha de enriquecimiento se obtiene cobra un pequeno evento details sobre el precio por resultado. Ese unico complemento cubre representantes legales, numero de trabajadores y todos los establecimientos anexos del contribuyente.
  • Sin cargo en caso de fallo. Si una busqueda falla, el actor escribe un elemento con el campo error y no lo cobra. Las ejecuciones vacias no tienen costo.
  • Limite de gasto respetado. Configura maxTotalChargeUsd en la ejecucion; al alcanzarlo, el actor deja de emitir y cobrar resultados y complementos.
  • Los planes gratuitos de Apify estan limitados a 10 contribuyentes por ejecucion, y los complementos de detalles y anexos requieren un plan de pago. Mejora tu plan para mayor volumen y enriquecimiento.

Preguntas frecuentes

Una ejecucion devolvio 0 registros. Por que? El RUC no existe, o la busqueda por nombre no coincidio con nada. Confirma el RUC de 11 digitos, o prueba un fragmento de nombre mas corto. Las ejecuciones sin resultados no se cobran.

Como busco por nombre en lugar de por RUC? Pasa cualquier texto no numerico en searchTerms (por ejemplo SUPERMERCADOS PERUANOS). Se devuelve cada contribuyente coincidente, hasta maxTaxpayers.

Como obtengo representantes legales, numero de trabajadores y anexos? Manten withDetails activo para representantes legales y numero de trabajadores, y activa withBranches para cada establecimiento anexo. Ambos son complementos de pago en un plan de pago de Apify.

Por que los valores estan en espanol? Los valores se devuelven tal como los publica SUNAT, para que coincidan con el registro oficial sin traduccion.

Necesito el proxy? No. Las solicitudes directas normalmente funcionan. Activa useProxy solo si SUNAT empieza a bloquear la ejecucion.

Es una herramienta oficial de SUNAT? No. Este actor es independiente y no tiene afiliacion con SUNAT ni con el gobierno peruano. Solo lee datos que estan disponibles publicamente en el servicio de consulta RUC de SUNAT.

Scrapers relacionados

Mas scrapers en scrapers.lat

Creado y mantenido por scrapers.lat, donde publicamos scrapers para plataformas publicas de EE. UU. y America Latina: registros de empresas, datos gubernamentales, finanzas, e-commerce y mas. Explora el catalogo o solicita un scraper a medida en scrapers.lat.

Herramienta independiente, sin afiliacion con SUNAT ni con el gobierno peruano. Accede solo a datos del registro RUC disponibles publicamente.