latinfo 0.5.3 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +100 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Latinfo
|
|
2
|
+
|
|
3
|
+
Tax registry API for Latin America. One request, one response, no infrastructure.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g latinfo
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick start
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Login with GitHub
|
|
15
|
+
latinfo login
|
|
16
|
+
|
|
17
|
+
# Lookup by RUC
|
|
18
|
+
latinfo ruc 20100047218
|
|
19
|
+
|
|
20
|
+
# Lookup by DNI (converts to RUC automatically)
|
|
21
|
+
latinfo dni 12345678
|
|
22
|
+
|
|
23
|
+
# Search by company name
|
|
24
|
+
latinfo search "banco de credito"
|
|
25
|
+
|
|
26
|
+
# JSON output (for scripts and AI agents)
|
|
27
|
+
latinfo ruc 20100047218 --json
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## What you get
|
|
31
|
+
|
|
32
|
+
- RUC lookup in ~80ms from any location
|
|
33
|
+
- DNI to RUC conversion with check digit validation
|
|
34
|
+
- Company name search with ranked results, prefix autocomplete, and LATAM abbreviation handling (S.A.C., E.I.R.L., S.R.L.)
|
|
35
|
+
- 18M+ records from Peru's SUNAT official registry, updated daily
|
|
36
|
+
- All data sourced from official government registries. Public records, no scraping.
|
|
37
|
+
- Free: 1M requests/month. No credit card. Self-hosting 18M records requires a database server with enough RAM for full-text search indexes, a daily import pipeline, and ongoing maintenance.
|
|
38
|
+
|
|
39
|
+
## API
|
|
40
|
+
|
|
41
|
+
Base URL: `https://api.latinfo.dev`
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
GET /pe/ruc/:ruc → Lookup by RUC (11 digits)
|
|
45
|
+
GET /pe/dni/:dni → Lookup by DNI (8 digits, converts to RUC)
|
|
46
|
+
GET /pe/search?q=... → Search by company name
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
curl -H "Authorization: Bearer YOUR_API_KEY" \
|
|
51
|
+
https://api.latinfo.dev/pe/ruc/20100047218
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Your API key is stored in `~/.latinfo/config.json` after `latinfo login`.
|
|
55
|
+
|
|
56
|
+
## SDK
|
|
57
|
+
|
|
58
|
+
```typescript
|
|
59
|
+
import { latinfo } from 'latinfo';
|
|
60
|
+
|
|
61
|
+
const client = latinfo('YOUR_API_KEY');
|
|
62
|
+
|
|
63
|
+
const company = await client.ruc('20100047218');
|
|
64
|
+
console.log(company.razon_social); // BANCO DE CREDITO DEL PERU
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Response fields
|
|
68
|
+
|
|
69
|
+
| Field | Description | Example |
|
|
70
|
+
|-------|------------|---------|
|
|
71
|
+
| `ruc` | RUC number (11 digits) | 20100047218 |
|
|
72
|
+
| `razon_social` | Business name | BANCO DE CREDITO DEL PERU |
|
|
73
|
+
| `estado` | Tax status | ACTIVO |
|
|
74
|
+
| `condicion` | Condition | HABIDO |
|
|
75
|
+
| `ubigeo` | Location code | 150114 |
|
|
76
|
+
| `tipo_via` | Street type | JR. |
|
|
77
|
+
| `nombre_via` | Street name | CENTENARIO |
|
|
78
|
+
| `numero` | Street number | 156 |
|
|
79
|
+
|
|
80
|
+
## What you don't have to do
|
|
81
|
+
|
|
82
|
+
You don't download 364MB from SUNAT. You don't parse Latin1 with escaped pipe delimiters. You don't write a check digit algorithm. You don't build a search index that handles S.A.C. and E.I.R.L. You don't set up a daily import pipeline. You don't manage servers.
|
|
83
|
+
|
|
84
|
+
We do all of that. Daily. For free.
|
|
85
|
+
|
|
86
|
+
## Pricing
|
|
87
|
+
|
|
88
|
+
- **Free**: 1M requests/month
|
|
89
|
+
- **Pro**: 10M requests/month — $1/month
|
|
90
|
+
|
|
91
|
+
## Countries
|
|
92
|
+
|
|
93
|
+
- **Peru** (SUNAT) — RUC, DNI, company name search. 18M+ records, updated daily.
|
|
94
|
+
- Brazil, Mexico, Colombia, Argentina, Chile — in development.
|
|
95
|
+
|
|
96
|
+
## Links
|
|
97
|
+
|
|
98
|
+
- Website: [latinfo.dev](https://latinfo.dev)
|
|
99
|
+
- API docs: [api.latinfo.dev/openapi.json](https://api.latinfo.dev/openapi.json)
|
|
100
|
+
- Email: [hola@latinfo.dev](mailto:hola@latinfo.dev)
|
package/package.json
CHANGED