PHPackages                             gfarias/laravel-previ-scraper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. gfarias/laravel-previ-scraper

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

gfarias/laravel-previ-scraper
=============================

Extractor de indicadores previsionales y tramos de renta (previred/sii)

v1.1.0(5y ago)10438[1 issues](https://github.com/GuillermoFarias/laravel-previ-scraper/issues)MITPHPPHP ^7.3|^8.0

Since Apr 24Pushed 3y ago2 watchersCompare

[ Source](https://github.com/GuillermoFarias/laravel-previ-scraper)[ Packagist](https://packagist.org/packages/gfarias/laravel-previ-scraper)[ Docs](https://github.com/gfarias/laravel-previ-scraper)[ RSS](/packages/gfarias-laravel-previ-scraper/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Laravel PreviScraper
====================

[](#laravel-previscraper)

Indicadores previsionales Chile 🇨🇱
----------------------------------

[](#indicadores-previsionales-chile-)

[![Codacy Badge](https://camo.githubusercontent.com/9546e186f76ec269d7f85025e820d98a47b3fe71f34c81ab4998857d81cd793b/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3532383664616331663237393438613862353835646230313232393136373430)](https://app.codacy.com/gh/GuillermoFarias/laravel-previ-scraper?utm_source=github.com&utm_medium=referral&utm_content=GuillermoFarias/laravel-previ-scraper&utm_campaign=Badge_Grade_Settings)[![tests](https://github.com/GuillermoFarias/laravel-previ-scraper/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/GuillermoFarias/laravel-previ-scraper/actions/workflows/tests.yml)[![codecov](https://camo.githubusercontent.com/26e97ff3f3155748d0d52196cc77608d4b40ac5dd62b25c7db2b119f1cac1881/68747470733a2f2f636f6465636f762e696f2f67682f4775696c6c65726d6f4661726961732f6c61726176656c2d70726576692d736372617065722f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d48564753535a4b514f43)](https://codecov.io/gh/GuillermoFarias/laravel-previ-scraper)[![CodeFactor](https://camo.githubusercontent.com/afca5f952afd1d1e651846b645685fb2969e704fa81d0d453154b8175491fef4/68747470733a2f2f7777772e636f6465666163746f722e696f2f7265706f7369746f72792f6769746875622f6775696c6c65726d6f6661726961732f6c61726176656c2d70726576692d736372617065722f6261646765)](https://www.codefactor.io/repository/github/guillermofarias/laravel-previ-scraper)[![StyleCI](https://camo.githubusercontent.com/cb30ace740ea31a506a09a1787c683e816312926d15d930e7fa3e4e8f11cd0d5/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3336313132343134382f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/361124148?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/340b81e3410201d3763e2f89a186246c6c9ce17ab41ffb9abc15225a6f1a2524/68747470733a2f2f706f7365722e707567782e6f72672f676661726961732f6c61726176656c2d70726576692d736372617065722f76)](//packagist.org/packages/gfarias/laravel-previ-scraper)[![Total Downloads](https://camo.githubusercontent.com/b76fe654826466388f31544ee4fdbd091aed35dd25f15e7361cb3840b0ece4f7/68747470733a2f2f706f7365722e707567782e6f72672f676661726961732f6c61726176656c2d70726576692d736372617065722f646f776e6c6f616473)](//packagist.org/packages/gfarias/laravel-previ-scraper)[![License](https://camo.githubusercontent.com/4389010049a1ad7c45f06ef10d8a687dea59a976fcce222b7605ae6fc5f4db97/68747470733a2f2f706f7365722e707567782e6f72672f676661726961732f6c61726176656c2d70726576692d736372617065722f6c6963656e7365)](//packagist.org/packages/gfarias/laravel-previ-scraper)

Indicadores previsionales desde Previred y tramos de impuesto desde SII

> Los datos se obtienen utilizando *[web scraping](https://es.wikipedia.org/wiki/Web_scraping#:~:text=Web%20scraping%20o%20raspado%20web,un%20navegador%20en%20una%20aplicaci%C3%B3n.)* ([Previred](https://www.previred.com/web/previred/indicadores-previsionales) - [Sii](https://www.sii.cl/valores_y_fechas/impuesto_2da_categoria/impuesto2021.htm))

Instalación
-----------

[](#instalación)

Corre el siguiente comando en la terminal:

```
composer require gfarias/laravel-previ-scraper
```

Cómo se usa
-----------

[](#cómo-se-usa)

Puedes utilizar el provider e inyectarlo directo en los métodos ejecutados por el framework:

```
public function handle(PreviScraper $previScraper): void {
    $sii = $previScraper->sii();
    print_r($sii->all());
}
```

o instanciar directamente PreviScraper :

```
$previScraper = new Gfarias\PreviScraper\PreviScraper();
$previred = $previScraper->previred();
$sii = $previScraper->sii();

print_r($previred->all());
print_r($sii->all());
```

Sii - Impuesto segunda categoría
--------------------------------

[](#sii---impuesto-segunda-categoría)

> Soporta desde el año 2013+

métodoretorno`getTramosMensuales()`array`getTramosQuincenales()`array`getTramosSemanales()`array`getTramosDiarios()`array`all()`arrayCada método entrega un arreglo con el conjunto de tramos disponibles en SII, a su vez, cada tramo contiene los siguientes datos:

nombretipo de datodescripciónperiodostring\[`mensual`,`quincenal`, `semanal`, `diario`\]desdefloatrenta mínima del tramohastafloatrenta tope del tramofactorfloatfactor de cálculodescuentofloatCantidad a rebajarimpuestofloatTasa de Impuesto Efectiva, máxima por cada tramo de RentaEn resumen, es una fiel representación de la web de SII

[![image](https://user-images.githubusercontent.com/11460907/115970244-25129780-a50f-11eb-82c0-05a878f2f421.png)](https://user-images.githubusercontent.com/11460907/115970244-25129780-a50f-11eb-82c0-05a878f2f421.png)

### Ejemplos de uso

[](#ejemplos-de-uso)

Obtener indicadores mensuales del periodo Enero 2021

```
$previScraper = new PreviScraper();
$indicadoresMensuales = $previScraper->sii(5, 2021)->getIndicadoresMensuales();
print_r($indicadoresMensuales);
```

El output de estos indicadores sería:

```
Array
(
    [0] => Array
        (
            [periodo] => mensual
            [desde] => 0
            [hasta] => 680022
            [factor] => 0
            [descuento] => 0
            [impuesto] => 0
        )

    [1] => Array
        (
            [periodo] => mensual
            [desde] => 680022.01
            [hasta] => 1511160
            [factor] => 0.04
            [descuento] => 27200.88
            [impuesto] => 2.2
        )

    [2] => Array
        (
            [periodo] => mensual
            [desde] => 1511160.01
            [hasta] => 2518600
            [factor] => 0.08
            [descuento] => 87647.28
            [impuesto] => 4.52
        )

    [3] => Array
        (
            [periodo] => mensual
            [desde] => 2518600.01
            [hasta] => 3526040
            [factor] => 0.135
            [descuento] => 226170.28
            [impuesto] => 7.09
        )

    [4] => Array
        (
            [periodo] => mensual
            [desde] => 3526040.01
            [hasta] => 4533480
            [factor] => 0.23
            [descuento] => 561144.08
            [impuesto] => 10.62
        )

    [5] => Array
        (
            [periodo] => mensual
            [desde] => 4533480.01
            [hasta] => 6044640
            [factor] => 0.304
            [descuento] => 896621.6
            [impuesto] => 15.57
        )

    [6] => Array
        (
            [periodo] => mensual
            [desde] => 6044640.01
            [hasta] => 15615320
            [factor] => 0.35
            [descuento] => 1174675.04
            [impuesto] => 27.48
        )

    [7] => Array
        (
            [periodo] => mensual
            [desde] => 15615320.01
            [hasta] => 0
            [factor] => 0.4
            [descuento] => 1955441.04
            [impuesto] => 27.48
        )

)
```

Previred
--------

[](#previred)

> Por ahora solo soporta el periodo actual en el sitio de previred, una buena implementación sería un lector PDF para obtener datos de períodos anteriores

métodoretorno`getUF()`float`getUTM()`float`getRentaTopeImponibleAfp()`float`getRentaTopeImponibleIps()`float`getRentaTopeImponibleCesantia()`float`getRentaMinimaImponibleDependiente()`float`getRentaMinimaImponibleMenores()`float`getRentaMinimaImponibleParticulares()`float`getSeguroCesantia()``\Gfarias\PreviScraper\CesantiaSupport``getTopeApvMensual()`float`getTopeAPVAnual()`float`getAfpCapital()``\Gfarias\PreviScraper\AfpSupport``getAfpCuprum()``\Gfarias\PreviScraper\AfpSupport``getAfpHabitat()``\Gfarias\PreviScraper\AfpSupport``getAfpPlanVital()``\Gfarias\PreviScraper\AfpSupport``getAfpProVida()``\Gfarias\PreviScraper\AfpSupport``getAfpModelo()``\Gfarias\PreviScraper\AfpSupport``getAfpUno()``\Gfarias\PreviScraper\AfpSupport``getAsignacionTramoAMonto()`float`getAsignacionTramoBMonto()`float`getAsignacionTramoCMonto()`float`getAsignacionTramoA()`float`getAsignacionTramoB()`float`getAsignacionTramoC()`float`getAsignacionTramoD()`float`all()`array### `CesantiaSupport` Datos específicos del seguro de cesantía

[](#cesantiasupport-datos-específicos-del-seguro-de-cesantía)

métodoretorno`getIndefinidoEmpleador()`float`getIndefinidoTrabajador()`float`getPlazoFijoEmpleador()`float`getIndefinidoSobre11Empleador()`float`getCasaParticularEmpleador()`float`toArray()`array### `AfpSupport` Datos específicos de cada AFP

[](#afpsupport-datos-específicos-de-cada-afp)

métodoretorno`getNombre()`string`getCodigo()`string`getPorcentajeDependiente()`float`getPorcentajeSis()`float`getPorcentajeIndependiente()`float`toArray()`array### Ejemplo de uso

[](#ejemplo-de-uso)

```
$previScraper = new PreviScraper();
$previred = $previScraper->previred();
$rentaTopeImponible = $previred->getRentaTopeImponibleCesantia();
$porcentajeSisAfpHabitat = $previred->getAfpHabitat()->getPorcentajeSis();
$aporteCesantiaEmpleadorPlazoFijo = $previred->getSeguroCesantia()->getPlazoFijoEmpleador();
```

❤️

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1844d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/789535?v=4)[Gfarias](/maintainers/Gfarias)[@gfarias](https://github.com/gfarias)

---

Top Contributors

[![GuillermoFarias](https://avatars.githubusercontent.com/u/11460907?v=4)](https://github.com/GuillermoFarias "GuillermoFarias (73 commits)")[![codacy-badger](https://avatars.githubusercontent.com/u/23704769?v=4)](https://github.com/codacy-badger "codacy-badger (1 commits)")

---

Tags

laravelchilesiipreviredindidcadoresprevisionales

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gfarias-laravel-previ-scraper/health.svg)

```
[![Health](https://phpackages.com/badges/gfarias-laravel-previ-scraper/health.svg)](https://phpackages.com/packages/gfarias-laravel-previ-scraper)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[nedwors/navigator

A Laravel package to ease defining navigation menus

433.1k](/packages/nedwors-navigator)[xefi/faker-php-laravel

Faker php integration with laravel

1915.1k](/packages/xefi-faker-php-laravel)[dcblogdev/laravel-junie

Install pre-configured guides for Jetbrains Junie

392.5k](/packages/dcblogdev-laravel-junie)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
